Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Draw vertical line in BarChart and show/hide them with DA

Jegor WielerJul 30 2024

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

This post has been answered by Oleh Tyshchenko on Jul 30 2024
Jump to Answer
Comments
Post Details
Added on Jul 30 2024
3 comments
930 views