From da303297b01731b1d0408e5320c314bde8b9f311 Mon Sep 17 00:00:00 2001 From: Angus Comrie Date: Wed, 12 Dec 2018 18:09:34 +0200 Subject: [PATCH] fixes #92 (#110) --- package.json | 2 +- .../Shared/LinePlot/PlotContainer/PlotContainerComponent.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c7944c0633..5fbb2bdec9 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "@blueprintjs/core": "^3.8.0", "@blueprintjs/icons": "^3.3.0", "@blueprintjs/select": "^3.2.1", - "chart.js": "^2.7.3", + "chart.js": "veggiesaurus/Chart.js#midpoint_step_interpolation", "chartjs-plugin-annotation": "^0.5.7", "glslify-loader": "^1.0.2", "golden-layout": "^1.5.9", diff --git a/src/components/Shared/LinePlot/PlotContainer/PlotContainerComponent.tsx b/src/components/Shared/LinePlot/PlotContainer/PlotContainerComponent.tsx index 190db1ca3e..dbe47f6d6a 100644 --- a/src/components/Shared/LinePlot/PlotContainer/PlotContainerComponent.tsx +++ b/src/components/Shared/LinePlot/PlotContainer/PlotContainerComponent.tsx @@ -278,7 +278,8 @@ export class PlotContainerComponent extends React.Component else { datasetConfig.pointRadius = 0; datasetConfig.showLine = true; - datasetConfig.steppedLine = !this.props.interpolateLines; + // @ts-ignore TODO: Remove once Chart.js types are updated + datasetConfig.steppedLine = this.props.interpolateLines ? false : "midpoint"; datasetConfig.borderWidth = 1; datasetConfig.borderColor = lineColor; }