apexcharts / Blazor-ApexCharts

A blazor wrapper for ApexCharts.js
https://apexcharts.github.io/Blazor-ApexCharts
MIT License
784 stars 91 forks source link

Bad perfomance Syncronized Charts with brush #426

Closed Domivan closed 5 months ago

Domivan commented 6 months ago

Syncronized Charts with brush works with very low performance when there are markers on the main chart (Value) Already at a series of > 100 points, a strong drop in performance is noticeable. Please tell me the solution to the problem.

Domivan commented 6 months ago

I discovered that the problem is related to the presence of the ApexPointTooltip tag If you override tooltips on a chart, it will always render with markers whether you want it to or not. And then the performance of Brush Chart drops.

joadan commented 6 months ago

Hi,

My understanding is that markers are required for a line chart in order to have a custom tooltip in apexcharts.js. This is why the wrapper automatically adds them, https://github.com/apexcharts/Blazor-ApexCharts/blob/cb8961d2423a63216afe21a3d0eed15c46e49555/src/Blazor-ApexCharts/ApexChart.razor.cs#L612

Domivan commented 6 months ago

That's right, and that's the problem. Here's the marker and the built-in tooltip that only appears when you hover over the mouse, right? image We need the same behavior for custom tooltips. Or solve the performance issue with markers enabled. I believe the problem correlates with the previously identified issue 1778

joadan commented 5 months ago

hi,

If you want a custom tooltip for a line with no markers then you will have to do it with javascript. Please see sample here: https://apexcharts.github.io/Blazor-ApexCharts/features/tooltip-javascript

Or solve the performance issue with markers enabled. I believe the problem correlates with the previously identified issue 1778

Please note that apexcharts.js is creating the chart using svg each object in the chart is an svg element. The more elements you add the more work the browser has to do, and I'm afraid that we don't see any magic solution to this.