【问题标题】:AM charts plots on the wong positionAMcharts 绘制机翼位置图
【发布时间】:2020-05-22 06:00:53
【问题描述】:

Am 图表在错误的 y 轴位置上绘制了一些线。请参阅下面的代码和快照。

我的图表:

[{"bullet":"none","labelsEnabled":false,"dashLength":0,"lineThickness":3,"title":[["Tonnes Milled"]],"valueField":"TonnesMilled","balloonText":"[[value]]","valueAxis":"LeftAxis","numberFormatter":{"precision":2,"decimalSeparator":".","thousandsSeparator":","},"lineColorField":"Color"},{"bullet":"none","labelsEnabled":false,"dashLength":0,"lineThickness":3,"title":[["Total Magalies Water PPM"]],"valueField":"TotalMagaliesWaterPPM","balloonText":"[[value]]","valueAxis":"LeftAxis","numberFormatter":{"precision":2,"decimalSeparator":".","thousandsSeparator":","},"lineColorField":"Color"},{"bullet":"none","labelsEnabled":false,"dashLength":0,"lineThickness":3,"title":[["Water Average Daily Consumption"]],"valueField":"WaterAverageDailyConsumption","balloonText":"[[value]]","valueAxis":"LeftAxis","numberFormatter":{"precision":2,"decimalSeparator":".","thousandsSeparator":","},"lineColorField":"Color"},{"bullet":"none","labelsEnabled":false,"dashLength":0,"lineThickness":3,"title":[["Water Consumption M3/ton"]],"valueField":"WaterConsumptionM3Ton","balloonText":"[[value]]","valueAxis":"LeftAxis","numberFormatter":{"precision":2,"decimalSeparator":".","thousandsSeparator":","},"lineColorField":"Color"}]

我的数据:

[{"TotalMagaliesWaterPPM":236458,"WaterAverageDailyConsumption":7627.677419354839,"WaterConsumptionM3Ton":0,"Date":"Jan - 2019","TonnesMilled":0,"DateConverted":true},{"TotalMagaliesWaterPPM":236459,"WaterAverageDailyConsumption":8444.964285714286,"WaterConsumptionM3Ton":0,"Date":"Feb - 2019","TonnesMilled":0,"DateConverted":true},{"TotalMagaliesWaterPPM":236460,"WaterAverageDailyConsumption":7627.741935483871,"WaterConsumptionM3Ton":0,"Date":"Mar - 2019","TonnesMilled":0,"DateConverted":true},{"TotalMagaliesWaterPPM":236461,"WaterAverageDailyConsumption":7882.033333333334,"WaterConsumptionM3Ton":0,"Date":"Apr - 2019","TonnesMilled":0,"DateConverted":true},{"TotalMagaliesWaterPPM":236462,"WaterAverageDailyConsumption":7627.806451612903,"WaterConsumptionM3Ton":0,"Date":"May - 2019","TonnesMilled":0,"DateConverted":true}]

主要注意蓝线:

示例

另一个示例

【问题讨论】:

    标签: angularjs amcharts


    【解决方案1】:

    问题是您的日期格式。您尝试提供日期 MMM - YYYY 格式,但图表不知道这一点,并将它们全部呈现为 2019 年 1 月。检查:

    Formatting dates on category axis | amCharts3

    【讨论】:

    • 问题是我的 amChartOptions 设置选项。我为我的所有图表使用 1 个指令动态指令...所以我用于堆叠条形图的 stackType 属性弄乱了我的折线图,我必须找到一种方法将此属性仅应用于我的堆积条形图没有它影响一切...我要给你竖起大拇指,谢谢你的帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-24
    • 1970-01-01
    • 1970-01-01
    • 2020-11-25
    • 1970-01-01
    相关资源
    最近更新 更多