我用Angular框架创建了一个项目,并使用了Highcharts X-range,但我无法通过附加如图所示的错误来完成它... x1c 0d1xHTML:
打字稿:
请懂的人告诉我怎么修.非常感谢,
bgibtngc1#
要加载xrange系列,您需要加载xrange模块。
import Xrange from 'highcharts/modules/xrange'; Xrange(Highcharts);
partialFill对象不正确,您可以在API文档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应用编程接口:https://api.highcharts.com/highcharts/series.xrange.data.partialFill
1条答案
按热度按时间bgibtngc1#
要加载xrange系列,您需要加载xrange模块。
partialFill对象不正确,您可以在API文档data.partialFill.amount中看到它们的外观。
演示:https://stackblitz.com/edit/highcharts-angular-basic-line-7km3p6?file=src%2Fapp%2Fapp.component.ts
应用编程接口:https://api.highcharts.com/highcharts/series.xrange.data.partialFill