tuhinkarmakar3882 commented on issue #20868:
URL: https://github.com/apache/echarts/issues/20868#issuecomment-2774140174

   @helgasoft Interesting finding! Let's hope for the that the changes gets 
merged. Until then, we'll have to use such workaround.
   
   The example code that you provided, uses ECharts to render a dual-grid 
logarithmic bar chart that distinguishes positive and negative values. It first 
imports the ECharts library, selects an HTML element with the id "main," and 
initializes the chart instance.
   
   A set of sample data and category labels is defined. A helper function 
computes the closest power of 10 for each data point to determine a suitable 
starting value for the logarithmic y-axes. The data is then split into two 
arrays: one for positive values and one for negative values (converted to their 
absolute values for proper logarithmic scaling).
   
   The configuration defines two grids and matching axes. The top grid (with a 
hidden x-axis) displays positive values using a standard logarithmic scale, 
while the bottom grid displays negative values on an inverted logarithmic scale 
with custom tooltips and labels that prepend a minus sign. Finally, the chart 
is rendered by applying this configuration to the initialized ECharts instance.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to