Hello everyone,
i'm trying to draw a vertical line in a bar chart and show/hide it with a button, with a dynamic action.
I have managed to draw a vertical line in my Chart (image 1) with the help of the javascript Chart initialization code…
function( options ){
var refObjects = [{text: (apex.item(’P3_ITEM”).getValue()), type: “line”, value: 'KW22, 2024', color: “#19e6d8”, displayInLegend: “on”, lineWidth: 3, location: “front”, lineStyle: “dashed”, shortDesc: “DESCRIPTION”},];
options.xAxis.referenceObjects = refObjects;
return options;
}
But now I want to show/hide this line dynamically when I click a button.
I don't really know how to address this line/series with a dynamic action.
Does anyone have an idea how I can address the series with a dynamic action or an alternative how I can implement my use case?
I would be very grateful for any advice!
Image 1

Oracle Apex Version: 23.2.6
Best Regards
Jegor