Angular 无法使用 Highcharts X-range 系列
Angular cannot using Highcharts X-range series
我使用 Angular 框架创建了一个项目并使用了 Highcharts X-range,但我无法通过附加错误来实现,如图所示...
HTML:
打字稿:
请知道的人告诉我如何解决它。非常感谢,
要加载 xrange 系列,您需要加载模块 xrange。
import Xrange from 'highcharts/modules/xrange';
Xrange(Highcharts);
partialFill it's it's not correct with object, you can see how they look at the API documentation data.partialFill.amount.
data: [{
x: Date.UTC(2014, 10, 21),
x2: Date.UTC(2014, 11, 2),
y: 0,
partialFill: {
amount: 0.5
}
}, {
x: Date.UTC(2014, 11, 2),
x2: Date.UTC(2014, 11, 5),
y: 1
}, {
x: Date.UTC(2014, 11, 8),
x2: Date.UTC(2014, 11, 9),
y: 2
}, {
x: Date.UTC(2014, 11, 9),
x2: Date.UTC(2014, 11, 19),
y: 1
}, {
x: Date.UTC(2014, 11, 10),
x2: Date.UTC(2014, 11, 23),
y: 2
}],
演示:
https://stackblitz.com/edit/highcharts-angular-basic-line-7km3p6?file=src%2Fapp%2Fapp.component.ts
API:
https://api.highcharts.com/highcharts/series.xrange.data.partialFill
我使用 Angular 框架创建了一个项目并使用了 Highcharts X-range,但我无法通过附加错误来实现,如图所示...
HTML:
打字稿:
请知道的人告诉我如何解决它。非常感谢,
要加载 xrange 系列,您需要加载模块 xrange。
import Xrange from 'highcharts/modules/xrange';
Xrange(Highcharts);
partialFill it's it's not correct with object, you can see how they look at the API documentation data.partialFill.amount.
data: [{
x: Date.UTC(2014, 10, 21),
x2: Date.UTC(2014, 11, 2),
y: 0,
partialFill: {
amount: 0.5
}
}, {
x: Date.UTC(2014, 11, 2),
x2: Date.UTC(2014, 11, 5),
y: 1
}, {
x: Date.UTC(2014, 11, 8),
x2: Date.UTC(2014, 11, 9),
y: 2
}, {
x: Date.UTC(2014, 11, 9),
x2: Date.UTC(2014, 11, 19),
y: 1
}, {
x: Date.UTC(2014, 11, 10),
x2: Date.UTC(2014, 11, 23),
y: 2
}],
演示: https://stackblitz.com/edit/highcharts-angular-basic-line-7km3p6?file=src%2Fapp%2Fapp.component.ts
API: https://api.highcharts.com/highcharts/series.xrange.data.partialFill