In this article you will learn how to remove highlighted region. In the previous article you have learnt about how to add region on X or Y axis.
View of Highlighted Region :
To remove the region from a chart there are 2 ways :
- By applying remove code externally
- By removing existing code
To apply code will require Javascript. You will have to specify region’s classes based on that region will get remove. Also you have the flexibility to remove selected region by mentioning those classes.
Javascript Code :
- To remove all region
hi_container.set("postExecution", function () {
Hdi.c3chart.regions.remove(
{classes: ['regionX1', 'regionY2','regionX1', 'regionY2']}
// here you need to specify all the regions class to remove
);
});
2. To remove selected region
hi_container.set("postExecution", function () {
Hdi.c3chart.regions.remove(
{classes: ['regionY2','regionX1']} // you need to specify selected region class to remove
);
});
On executing the code, regions get removed.
Output
For more info, contact us at demo@helicalinsight.com