User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: point markers disappearing after series data update

Hi,

The xAxis doesn't have labels.events in object and that would give a problem with hiding when you click legend.
I think you should write a function inside chart.events.redraw and get to the label object.

https://api.highcharts.com/highcharts/c ... nts.redraw

Live demo:
https://jsfiddle.net/BlackLabel/46pwb9ac/

Let me know how are you doing with this.
Regards.
Sebastian Hajdus
Highcharts Developer
niv123
Posts: 19
Joined: Tue Jun 01, 2021 9:28 pm

Re: point markers disappearing after series data update

Hi Sebastian,
Not really able to understand what you have mentioned, but as per the jsfiddle given,
the issue still persists.

I will mention the steps:
1. click on Legend Tokyo(Tokyo series hides from the chart)
2. click on Jan from the labels(jan label's bar gets highlighted and all other bars become lighter in opacity)
3. again click on Legend Tokyo, to be able to show it again

Expected behaviour: the Tokyo series should reappear
Actual: Tokyo series does not reappear even though the legend shows selected

https://jsfiddle.net/o7c2ysxz/2/


Kindly help!
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: point markers disappearing after series data update

Hi,

I'm explaining, look in the documentation how the labels object is built xAxis.labels don't have events property.
it's not a standard implementation, so it's hard for me to help.

https://api.highcharts.com/highcharts/xAxis.labels

Here I show you how to get to the yAxis from inside redraw events, if you wanted to try to rework the solution from your example.
https://jsfiddle.net/BlackLabel/z3magvwn/

Best regards.
Sebastian Hajdus
Highcharts Developer
niv123
Posts: 19
Joined: Tue Jun 01, 2021 9:28 pm

Re: point markers disappearing after series data update

Hi Sebastian,
dont think we can do it by redraw, can you help me with a workaround? basically to achieve the objective
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: point markers disappearing after series data update

Hi,

Sorry, I can't find the code responsible for the disappearing marker.

Regards.
Sebastian Hajdus
Highcharts Developer
miguel.picoleal
Posts: 8
Joined: Fri Mar 03, 2023 5:10 pm

Re: point markers disappearing after series data update

Hello I have a similar issue, after adding a new point to my graph when a value is over my threshold limit, I no longer see my points on my graph unless I hover over them, but the problem is that I need my points visible all the time. Here is my code and thanks in advance for the help provided.

https://jsfiddle.net/6mn9k28f/
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: point markers disappearing after series data update

Welcome to our forum and thanks for contacting us with your question miguel!

You can use yAxis.setExtremes to set the current boundaries of the yAxis.
After you add the points, simply set the extremes to dataMax and dataMin of the series.

I prepared a live demo to show you, how it can be done.

Demo: https://jsfiddle.net/BlackLabel/c0gp4sde/

Feel free to ask any further questions!
Regards
Jakub
miguel.picoleal
Posts: 8
Joined: Fri Mar 03, 2023 5:10 pm

Re: point markers disappearing after series data update

Hi Jakub,

First at all, thanks that was perfect.

I was wondering if there is a way to show the original value next to the Series label of my tooltip, and not just hardcoded it on the name property of the point(Line 60 on the code I provided). Right now it is showing 200 in the series for values that go beyond, but I was just curious, is there a way to modify that on the tooltip ?
miguel.picoleal
Posts: 8
Joined: Fri Mar 03, 2023 5:10 pm

Re: point markers disappearing after series data update

Another Question I have is, Since I am adding new points after the original ones have been rendered. Is there a way to prevent the line that connects points from generating and link up the new points added as well ? The reason I ask is because that's the current behavior I see in my React app. It might not be happening on the fiddle sample you kindly provided to me but it does on the React app.

Thanks again for the guidance, it's of big help for me.
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: point markers disappearing after series data update

Hey,

I formatted your tooltip so that it show the value of "realValue" property on the point using tooltip.formatter, now you don't need to hardcode the value in the name property.

I'm not sure what do you mean in the second question, can you please send me a screenshot of what you get in react or event better a live demo of this issue so that I will be able to help you.

Demo: https://jsfiddle.net/BlackLabel/0bgjytev/

Let me know if you have any further questions!

Best regards
Jakub
miguel.picoleal
Posts: 8
Joined: Fri Mar 03, 2023 5:10 pm

Re: point markers disappearing after series data update

Hey,

Ok this is my complete project. Basically I am working on this as a POC. In the code I set the Ymax to be a million just so I could see the peak values, but In reality what I need is to set it lower so the small data points are not dwarfed on the graph. That's ok, is a simple setup. Going back to the problem I have right now is that as you can see after the last pink point on the far right of my graph, the line connecting said points is still triggered, hence it draws itself from that last point to the other 3 red points, which is not what I want.

Is there a way to actually stop the connecting line from generating so it's not linked to my red points. As I said above, the yAxis max should be where my red points are at on the graph, then again I do not need a connecting line going to, and between them.


https://codesandbox.io/s/stoic-pine-p9f ... :8467-8474

Thanks Jakub
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: point markers disappearing after series data update

Hey,

Okey, now I get the point. If you don't want this points to connect, you can extract the red ones to a new series and they will be separated from the pink ones.
I set the series type to line but you can change it to scatter and they will display as separate points without the connection between them.

Live demo: https://codesandbox.io/s/lucid-mccarthy-umktpq

Feel free to ask any further questions!
Best regards
Jakub
miguel.picoleal
Posts: 8
Joined: Fri Mar 03, 2023 5:10 pm

Re: point markers disappearing after series data update

Jakub This is Awesome !

Big thanks for helping out accomplish this, I wish to leave a review about this forum's support

It really is being amazing.

Thanks again.
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: point markers disappearing after series data update

That's great to hear!

In case of any further questions, feel free to contact us again.

Best regards
Jakub
miguel.picoleal
Posts: 8
Joined: Fri Mar 03, 2023 5:10 pm

Re: point markers disappearing after series data update

Perhaps one more thing I would like to ask, Is there a way to trick the connecting fuchsia line going from point to point, to go now to the red points, and not the original real data points above my threshold limit ?

Obviously I would still want my red points to display the real values of them on the tooltip whenever they are hovered on. The only difference now is that I won't have the connecting fuchsia line go to the original points which way off the chart.

Here is a screenshot of what I mean by that.

https://paste.pics/328ae7d0ff2619a9ea7abf4fe4c2e0a6

Best Regards,

Return to “Highcharts Usage”