0
votes

I want to move the chart result to the left, when data only appear on a column. I'm using AmCharts

I tried this not working

categoryAxis: {
                    gridPosition: "start",
                    parseDates: false,
                    gridAlpha: 0
                },

Is there any built in function? Please advise, thank you

enter image description here

1

1 Answers

1
votes

You could add some extra data items with the category field empty:

AmCharts.makeChart("chartdiv", {
    "type": "serial",
    "dataProvider": [{
        "category": "DC",
        "europe": 2.5,
        "namerica": 2.5
    }, {
        "category": ""
    }, {
        "category": ""
    }],
    ...
});

Please check the example here https://codepen.io/team/amcharts/pen/7761bc970484780c536005c9ab79707f?editors=0010