cancel
Showing results for 
Search instead for 
Did you mean: 

[Viz] Get number of visible points in VizFrame

Former Member
0 Kudos

Hello,

i am using a VizFrame line chart to display a rather big amount of data. Because the performance gets bad when zooming out too much, I would like to know if there is a way to find out how many data points are currently visible. So that i could say something like: "current visible data points > 1000 means zooming out is blocked". The user would be then only able to scroll to left or right.

I know this is not perfect but in my case it would still be better than just decreasing the total amount of data points.

Best Regards,
Henrik

Accepted Solutions (1)

Accepted Solutions (1)

This could be done like:

jQuery('.v-datapoint').length

You probably want to narrow down a bit more before using the above like:

jQuery('#' + this.getView().byId('vizFrameID').getId()).find(jQuery('.v-datapoint')) 

This is how we access and validate the data points in our OPA5 tests.

Former Member
0 Kudos

Thanks a lot! This allowed me building custom zooming buttons and preventing the user too zoom out too far.

Answers (1)

Answers (1)

former_member232384
Participant
0 Kudos

How about using Time Axis for huge datasets.

Former Member
0 Kudos

We are actually using a time axis but when having around 10000 data points and being zoomed out completely so that all points have to be rendered, the performance gets bad.