Skip to content

Commit

Permalink
feature: draw input as dotted line across the chart
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-giralt-len committed May 1, 2020
1 parent 689ac09 commit 3032eba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ function update_chart(input_data, possibilities) {
let ctx = $("#chart"),
datasets = [{
label: i18next.t("output.chart.input"),
data: input_data.slice(1),
data: Array(input_data.length).fill(input_data[0]),
fill: false,
borderColor: '#F7BABA',
borderDash: [20,20],
pointRadius: 0,
}, {
label: i18next.t("output.chart.minimum"),
data: possibilities[0].prices.slice(1).map(day => day.min),
Expand Down

0 comments on commit 3032eba

Please sign in to comment.