In this article we will learn about how to set the Axis Range for X and Y Axis. By default it is picked up from the data.
Default View of a generated Chart (Area Chart) based on provided data :
JavaScript Code :
hi_container.set("postExecution", function () {
Hdi.c3chart.axis.range({
min: { x: -2, y: -50 }, max: { x: 20, y: 130 } // min & max value for x & y axis is
}); // customizable
});
Output :
Output shows the updated axis range. Similarly, you can modify axis range as per your requirement using script. In addition, you can perform other chart customization using CSS and Javascript code.
For more info, contact us at support@helicalinsight.com