当图表有滚动条并且我们尝试使用它时出现的问题。线条刚刚从图表中消失。使用AmChart 4
这是带有示例的 codepen: https: //codepen.io/smertelny/pen/jdyGZR
已经尝试将值从十进制更改为整数(只是删除了逗号)。没有效果。
let data = [
{
"value": 27.75,
"date": new Date(2019, 0, 31)
},
{
"value": 27.77,
"date": new Date(2019, 0, 30)
},
{
"value": 27.79,
"date": new Date(2019, 0, 29)
},
{
"value": 27.81,
"date": new Date(2019, 0, 28)
},
{
"value": 27.78,
"date": new Date(2019, 0, 27)
}
]
let chart = am4core.create("chart", am4charts.XYChart);
let xAxis = chart.xAxes.push(new am4charts.DateAxis());
let yAxis = chart.yAxes.push(new am4charts.ValueAxis())
xAxis.dataFields.category = "date";
xAxis.title.text = "Date";
let …Run Code Online (Sandbox Code Playgroud) amcharts ×1