关于amCharts中的Y轴刻度

时间:2016-08-17 08:02:19

标签: amcharts

我正面临垂直轴上的比例问题,如2,4,6,8,10等或5,10,15,20。我已经在一个轴上实现了这一点(名称为ppm,以ppm为单位),但如何在第二个y轴上实现此目的?

var chart = AmCharts.makeChart("chartdiv", {
    "type": "serial",
        "theme": "light",

        "id": "SweepGraph",
        "legend": {
            "marginTop": 150,
            "useGraphSettings": true
        },
        "synchronizeGrid": synchronizeGridFlag,
        "dataProvider": SortedChartData,
        "valueAxes": [{
            "id": "BaseNumber",
            "axisColor": "#0000ff",
            "axisThickness": 2,
            "axisAlpha": 1,
            "position": "right",
            "title": "BaseNumber in mgKOH/g",
            "minimum" : BaseNumberMinimum,
            "maximum": BaseNumberMaximum,
            "autoGridCount": false,
            "gridCount": 100,
            "synchronizationMultiplier": ironLabelFrequency,
            "strictMinMax": true,
            //"synchronizationMultiplier": BaseNumberLabelFrequency
        }, {
            "id": "Iron",
            "maximum": IronMaximum,
            "minimum": IronMinimum,
            "minMaxMultiplier": 0,
            "precision": 0,
            "synchronizationMultiplier": ironLabelFrequency,
            "synchronizeWith": "BaseNumber",
            "strictMinMax": true,
            "axisAlpha": 1,
            "axisColor": "#ff0000",
            "axisThickness": 2,
            "gridCount": 100,
            "gridThickness": 0,
            "minHorizontalGap": 0,
            "minVerticalGap": 0,
            "title": "Iron in ppm"
        }],
        "graphs": AmCharts.parseJSON(graphData),
        "chartScrollbar": {},
        "chartCursor": {
            "cursorPosition": "pointer",
            "oneBalloonOnly": true,
            "valueZoomable":true
        },
        "guides":GlobalSweepGuides,
        "categoryField": "FeedRate",
        "categoryAxis": {
            "gridPosition": "start",
            "title": "ACC Value in (g/Kw/h)/(%wt)",
            "axisColor": "#DADADA",
            "minorGridEnabled": true,
            "autoGridCount": false,
            "gridCount": 12
        },
        "export": {
            "enabled": true,
            "menu": [],
            "libs": {
                "path": "http://www.amcharts.com/lib/3/plugins/export/libs/"
            },
            "position": "bottom-right"
        }
});

这是jsFiddle网址:https://jsfiddle.net/HARSHAD557/jgz289fw/

请解决此问题。

0 个答案:

没有答案