ecomfe / echarts-gl

Extension pack for Apache ECharts, providing globe visualization and 3D plots.
BSD 3-Clause "New" or "Revised" License
2.59k stars 844 forks source link

[Bug} graphGL + title and toolbox saveAsImage #505

Open helgasoft opened 1 year ago

helgasoft commented 1 year ago

When there is a title or a graphic alongside the graph, the saved image (PNG/JPG) does not contain the graph. Minimal Reproduction

Dangdtx commented 1 year ago

When the position is set to another position for the title, the problem mentioned above will be triggered.

Dangdtx commented 1 year ago

I tried zlevel layering to achieve the effect of downloading and displaying content, but I don't quite understand that the zlevel of the title needs to be set higher than the zlevel of the graphics to work properly. According to the general rule, the zlevel of the graphics should be higher At the zlevel of the title?

helgasoft commented 1 year ago

good mention of title position - indeed, without title positioning the graph shows in the image. Not only that, but title position is the graph position origin! So for left: '30%' the graph will be shifted 30% to the right, and for top: 'bottom' there won't be any graph in the image because it will disappear under the bottom 😄

Final recommendation: if your graph size is not too big and you need title and saveAsImage, then use type: 'graph', roam:true instead of type:' graphGL'.