fix charting issue (#9094)

* fix charting issue

* fix charting issue 2

* revert version bump
This commit is contained in:
Alan Ren
2020-02-07 17:42:58 -08:00
committed by GitHub
parent 1a2381cc7c
commit 8c61538a27
3 changed files with 7 additions and 7 deletions

View File

@@ -88,7 +88,7 @@
"devDependencies": {
"7zip": "0.0.6",
"@types/applicationinsights": "0.20.0",
"@types/chart.js": "^2.7.31",
"@types/chart.js": "2.7.57",
"@types/chokidar": "2.1.3",
"@types/cookie": "^0.3.3",
"@types/graceful-fs": "4.1.2",

View File

@@ -163,8 +163,8 @@ export class Graph implements IInsight {
this.chartjs.config.type = this.options.type;
// we don't want to include lables for timeSeries
this.chartjs.data.labels = this.originalType === 'timeSeries' ? [] : labels;
this.chartjs.config.options = this.transformOptions(this.options);
this.chartjs.update(0);
this.chartjs.options = this.transformOptions(this.options);
this.chartjs.update({ duration: 0 });
} else {
this.chartjs = new chartjs.Chart(this.canvas.getContext('2d'), {
data: {

View File

@@ -192,10 +192,10 @@
dependencies:
applicationinsights "*"
"@types/chart.js@^2.7.31":
version "2.7.48"
resolved "https://registry.yarnpkg.com/@types/chart.js/-/chart.js-2.7.48.tgz#db7b6d6ed33659f97ee49181f22c980bb0790a7b"
integrity sha512-U8paSPZGkW2WrHf8sgJj7s9MhfRgSz7wfU3CN73JVrcGJ13jGiqiXyr3Bg/4UFl4cbN3S8avHTsbtzYBrnWeVg==
"@types/chart.js@2.7.57":
version "2.7.57"
resolved "https://registry.yarnpkg.com/@types/chart.js/-/chart.js-2.7.57.tgz#6f4f7a588de48c2f82e67608b8e1f01e91be38f7"
integrity sha512-kVYcxX7PdTcUrmd2Q0UjN1U0YDO1FfZ8QCDvahGmI3gvwySZYwtcRANiduOI3st6Va2T/yBBLsoHt+Gl3O7Ztw==
"@types/chokidar@2.1.3":
version "2.1.3"