Closed andrejshapal closed 1 year ago
As ususally, found how to resolve when already asked for help.
This option fixes issue:
return option = { animation: false,
Sure, chart not animated.
Maybe you still can take a look and problem can be in plugin.
@andrejshapal, could you try Apache ECharts 4.5.0?
We removed clearing the chart, which was an issue with Streaming, and I am thinking that it may lead to this issue with animation enabled.
@andrejshapal, have you had a chance to test on 4.5.0?
I plan to release a new version today, and I want to ensure it's not an issue with v5.
@andrejshapal Also, if you use Canvas render in the panel options, please test with SVG renderer.
Another community member had a similar ghosting issue resolved using an SVG renderer.
@mikhail-vl SVG did not fix issue. 4.5.0 did.
@andrejshapal I found this old issue in the Apache EChart: https://github.com/apache/echarts/issues/6202.
Thank you for confirming the problem with v5. One of the changes we made is to replace clear()
and the default merge option to not Merge with removed clear()
for streaming.
I could not reproduce the issue using your code so far to confirm the fix. Could you try the possible fix in the signed CI artifact on your QA? https://github.com/VolkovLabs/volkovlabs-echarts-panel/actions/runs/5836485857
@asimonok, please take a look if I am missing anything.
@mikhail-vl The 5.1.0 version did not resolve an issue. Neither from pipeline, neither from grafana library.
Also, I doublechecked and on the same environment and in 4.5.0 issue did not persist. The bug you refered to looks a bit different. In their case the data is getting drawn over the old data. In my case I found the following correlation:
Initial value: 2075 Rendered value: -42075 Expected value: 2071 (2075-2071)2075 => -42075
Initial value: 900 Rendered value: 145900 Expected value: 755 (900-755)2075 => 145900
So, basically, it shows
@andrejshapal Thank you for testing.
I found the same correlation that the difference is displayed in front of the initial value. It was an idea that the previous elements were not cleaned properly before the animation started.
We will continue the investigation next week.
Hi @andrejshapal
I was able to reproduce the issue. The problem is passing string values. Method Number.toFixed
returns string - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed
So passing numbers instead of strings fixes the issue.
Please look at the comment to see more details - https://github.com/VolkovLabs/volkovlabs-echarts-panel/pull/209#issuecomment-1676835718
Please adjust the code by passing data as numbers instead of string
mobile.push([parseInt((sum_mob / count_mob).toFixed(0)), data.series[i].refId, parseInt((sum_mob / count_mob).toFixed(0))])
desktop.push([parseInt((sum_desk / count_desk).toFixed(0)), data.series[i].refId, parseInt((sum_desk / count_desk).toFixed(0))])
Please let us know if the issue still exists for you after changes.
@asimonok Hello. I can confirm issue is fixed by converting values to int.
Hello, Issue is reproduced as on grafana v9, as on latest v10. We use latest plugin v5.0.0. We did not notice this issue previously.
My panel setting:
https://github.com/VolkovLabs/volkovlabs-echarts-panel/assets/96792836/a18ff432-3c4c-4d6d-ab54-731335cf5b90
What is hapenning: After refresh, the echart panel shows some data which is not present anywehere (I was checking every step of calculation in every loop). After some actions to rerender panel, the data back to correct state.
Steps to reproduce:
Expected result: Panel is rendered after data is loaded and calculated.