cancel
Showing results for 
Search instead for 
Did you mean: 

Api to change measure in dynamic reference line

Alebarba
Explorer
0 Kudos
118

Hi,

how can i change measure in dynamic reference line with api?

is it possibile?

Thanks

View Entire Topic
umasaral
Active Participant
0 Kudos

// Assuming you have a reference to your visualization
const viz = /* your visualization reference */;
const newMeasure = 'SUM(Sales)'; // Example of the new measure

// Update the reference line
viz.setReferenceLine({
measure: newMeasure,
label: 'Updated Sales Reference',
lineType: 'dashed',
color: '#FF5733',
});

// Refresh the visualization to apply changes
viz.refresh();

 

Note: The newMeasure and other parameters according to your needs