Relative Content

Tag Archive for javascriptecharts

ECharts: How to fix margin when resize the chart

I put a ECharts chart into a resizable div, and using a ResizeObserver to listen to the container size to change the chart size. My problem is, it seems the chart is resized by ratio. When the chart becomes larger, the margin in the left and right size also becomes larger. Is there a way to fix the margin size?

Echarts labels z index is broken when Echarts has too much data per axis

I have a echarts project with multiple series-lines with multiples axis, I use axisPointer interactivity with all xAxisIndex for have emphasis data on all graphs. But the emphasis kill the label axis depth when there is too much data.
What I found is that when I suppress 6+ line of data, the labels z index work like expected.

Echarts labels z index goes lower than lines

I control my labels with click and use multi-graphs with axisPointer with xAxisIndex to ‘all’and triggerEmphasis to true. The problem is that emphaphis axisPointer put the lines over my labels:
enter image description here

Apache ECharts how to include hovered series in tooltip with trigger axis?

I am rending a numeric line series with multiple boolean custom series on a x time axis. The boolean custom series is rendered in a way where it creates a horizontal swim lane for each boolean series and the opacity of the lane is determined by the value. Because tooltip trigger is axis, I can only see the boolean value at the time the data point exists (the beginning of the custom series rendered item). How can I include the boolean value for all boolean series in the tooltip no matter where I hover on the chart so that I can see the numeric value of the lines series as well as all the boolean series values that intersect with the hover position at a given point in time?

Updating two values in the same argument (ECHARTS)

I need to update two arguments inside series.data, the name and the value. The problem is that I can’t separate this update in a formal way. I even manage to do it, for example, by creating another echarts leaving the rest of the chart invisible and leaving only one argument in this new series.