cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Api to change measure in dynamic reference line

Alebarba
Explorer
0 Kudos
395

Hi,

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

is it possibile?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

umasaral
Contributor
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

umasaral
Contributor
0 Kudos

Yes, you can change the measure in a dynamic reference line using the API. This typically involves updating the reference line's properties with the new measure data and then refreshing the visualization. Make sure to check the API documentation for specific methods and examples related to your visualization tool.

Alebarba
Explorer
0 Kudos

Hi, umasaral can you make me code example please? thanks