Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Boost in Scatter chart

I see that Boost works much faster when it comes to chart a large number or points. While it works for me, I mean I do see performance improvement, when I am checking a number of pints being rendered it's not even close to the original data. In my case I need to render all data points. Am I wrong about Boost? By boosting it does drop some points. Is that correct?

Thanks
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Boost in Scatter chart

Hi,

Thanks for the question.

The boost module does not remove points from the original data so it's hard to tell what's wrong.

Could you replicate your example and send me a demo in jsfiddle?

Then I'll be able to help you with fixing this problem.

Best regards,
Jakub
Jakub
Highcharts Developer
Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Re: Boost in Scatter chart

In this example:
https://jsfiddle.net/k5crgu7y/
Load event:
if Boost is disabled it shows 1000000 points, if enabled then just 3.
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Boost in Scatter chart

Hi,

When Boost is enabled, chart.series.points is just a graphical representation of points currently visible on the plot which represent the bigger dataset of points which cannot be shown in its entire form (that's what Boost is about - if three points are super close to each other they'll be replaced with one which best represent these three, but you still have access to all the data).

In the chart.events.load you have access to the entire chart object & you can take a look at chart.series.xData or chart.series.points which Boost loads asynchronously (parallel to the load function). Here's the demo: https://jsfiddle.net/BlackLabel/bzstp5ue/

Could you tell me what you're trying to achieve with the number of points? I'll try to help you solve your problem.

Best regards,
Jakub
Jakub
Highcharts Developer
Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Re: Boost in Scatter chart

I have two charts: line chart with two time series and a scatter chart. When I select some points in the line chart, I want to highlight them in the scatter chart. The problem is that the scatter chart is a summary of these two series where x is series 1 Y values and y is series 2 Y values. Since the scatter chart does not have all the points at a given time I dont know how to handle point selection for points coming from the line chart. What is even harder is to take pint selection from the scatter chart to the line chart.
Also, I dont think your example is running.
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Boost in Scatter chart

Hi,

I'm very sorry, but I'm not sure how to help you. It would be very helpful if you could send me a demo or a graphical representation of what you're trying to achieve.

Reproduce your example in the jsfiddle and we will work from that.

Regards,
Jakub
Jakub
Highcharts Developer
Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Re: Boost in Scatter chart

Here is what I need to achieve. Points in the scatter are based on Y values from the line chart. When I select something on the scatter, I need to show yellow areas on the line chart. If I would use Boost, how would I know which points on the line chart to highlight?
Attachments
Untitled.jpg
Untitled.jpg (92.71 KiB) Viewed 1123 times
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Boost in Scatter chart

Hi,

Could you tell me how exactly are you creating the scatter chart?

By default, points in a Boost chart have only the necessary properties: x, y, color and a few more. You can add an additional id property which could enable you to identify which point corresponds to points in the line chart, but it requires some work.

Maybe you'll find these articles about Boost limitations helpful:
- https://www.highcharts.com/docs/advance ... ost-module
- https://github.com/highcharts/highcharts/issues/5999

I would need to know more about how you're creating these charts to help.

Regards,
Jakub
Jakub
Highcharts Developer
Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Re: Boost in Scatter chart

Initially I have two series in the line chart: Y1 and Y2. Data for scatter is the following:
Y1.y -> scatter.x and Y2.y -> scatter.y
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Boost in Scatter chart

Hi,

1. plotOptions.series.point.events.click does not work in Boost by default, but there's a quick workaround.

Take a look at this demo: https://jsfiddle.net/BlackLabel/6t187jdo/
Here you have a Github issue: https://github.com/highcharts/highcharts/issues/14067

This way you can track the points on the scatter chart that you've clicked & perform some kind of operation on your line chart.

2. To show a yellow area on the line chart you can use the xAxis.plotBands.

Here's a simple demo: https://jsfiddle.net/BlackLabel/0rvbyx4s/

Regards,
Jakub
Jakub
Highcharts Developer
Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Re: Boost in Scatter chart

Not sure what you are showing with the last example. what I need is to be able to take a selected point from the scatter to the line chart. If a selected point on the scatter does not have an index, how would I get which a corresponding point on the line chart.
Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Re: Boost in Scatter chart

Before even sending the selected point over the line chart I have to SELECT a point. How can I select a point on a scatter chart there are no points? Something like this is not working: series.points[0].select(true, true)
Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Re: Boost in Scatter chart

How does this Halo workaround get into place?
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Boost in Scatter chart

Hi,

1. I've sent you the last example to show you how to color the area on a chart which is what you're trying to achieve in the line chart.

2. You need to write a custom point.select function as there is no function like that provided with Boost.

3. Adding an id to a point in Boost requires you to modify some functions from the Boost module. Here's how to do it: https://jsfiddle.net/BlackLabel/j3sc4wtr/

With that, you can add id to your point and add some custom logic connected with it.

4. The points in Boost are not clickable, but when you enable the halo and put it to the front, you can track clicks. That is a workaround that allows you to check if a point was clicked.

Regards,
Jakub
Jakub
Highcharts Developer
Zolotoy
Posts: 270
Joined: Tue Apr 14, 2020 10:06 am

Re: Boost in Scatter chart

Basically, I need two things. I need to draw an area on a scatter like zooming in and then show the points under that selection as selected. I have everything is working except that in the Boost Mode and can't show points being selected. Will your workaround with point.select work for that?

Return to “Highcharts Usage”