diego711
Posts: 21
Joined: Wed Jan 18, 2023 6:22 pm

Ending area gradient at crosshair in 'areaspline' chart

Hi everyone!

I was wondering if what's seen in this picture is doable.
Captura de pantalla 2023-01-18 152613.png
Captura de pantalla 2023-01-18 152613.png (78.68 KiB) Viewed 365 times
I mean ending the area gradient at the crosshair on hover. I already have the gradient applied to each series (type='areaspline' chart) but the area is the entire series.

Found nothing similar online and I can't think of a way to accomplish this.

Thanks!
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Ending area gradient at crosshair in 'areaspline' chart

Hello,

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

I don't think there is an easy way to achieve something like this only via the Highcharts API, but you can program it using the renderer. See my proposition in the demo below.

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

If I may clarify any issues/matters I am available at your convenience.
Best regards!
Dawid Draguła
Highcharts Developer
diego711
Posts: 21
Joined: Wed Jan 18, 2023 6:22 pm

Re: Ending area gradient at crosshair in 'areaspline' chart

Fantastic! Worked like a charm.

Thank you so much!
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Ending area gradient at crosshair in 'areaspline' chart

You're welcome!

In case of any further questions, feel free to contact us again.
Regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Stock”