I want to have some global styling for Apexcharts based on their type. Say bar charts should be solid blue color with no stroke, while area charts should have semi-transparent background and 2px stroke. Currently I have a global options object that looks like this:
//
// chart.js
//
window.Apex = {
fill: {
opacity: 0.2,
type: 'solid',
},
stroke: {
curve: 'straight',
width: 2,
},
};
(I have removed what's unnecessary here). You can see it live at https://codepen.io/yevsim/pen/MWJJRBG. As you can see bars have also inherited semi-transparent background color and 2px stroke which I don't want them to. My first idea was to keep those fill and stoke options in plotOptions for area charts, however this doesn't seem to affect anything because those properties don't exist there according to the docs: https://apexcharts.com/docs/options/plotoptions/area/.
I know I can specify those options individually for every chart, however I hope there is a way to set them globally on a per chart type basis.