diff --git a/types/chartist/chartist-tests.ts b/types/chartist/chartist-tests.ts index 863fdb33be..622e284436 100644 --- a/types/chartist/chartist-tests.ts +++ b/types/chartist/chartist-tests.ts @@ -535,3 +535,32 @@ new Chartist.Line('.ct-chart', { ] ] }, {}) + +new Chartist.Line('.ct-chart', { + labels: [new Date(143134652600), new Date(143384652600)], + series: [ + { + name: 'remaining', + data: [ + { x: new Date(143134652600), y: 53 }, + { x: new Date(143334652600), y: 40 }, + { x: new Date(143354652600), y: 45 }, + { x: new Date(143356652600), y: 41 }, + { x: new Date(143366652600), y: 40 }, + { x: new Date(143368652600), y: 38 }, + { x: new Date(143378652600), y: 34 }, + { x: new Date(143568652600), y: 32 }, + { x: new Date(143569652600), y: 18 }, + { x: new Date(143579652600), y: 11 } + ] + }, { + name: 'stories', + data: [ + { x: new Date(143134652600), y: 53 }, + { x: new Date(143334652600), y: 30 }, + { x: new Date(143384652600), y: 30 }, + { x: new Date(143568652600), y: 10 } + ] + } + ] +}, {}) diff --git a/types/chartist/index.d.ts b/types/chartist/index.d.ts index 86cc44667d..8437ee0272 100644 --- a/types/chartist/index.d.ts +++ b/types/chartist/index.d.ts @@ -99,7 +99,7 @@ declare namespace Chartist { interface IChartistSeriesData { name?: string; value?: number; - data?: Array; + data?: Array | Array<{ x: number | Date, y: number }>; className?: string; meta?: any; }