How to minimize gaps around Baidu e-cards

I am trying to enable Baidu echarts (which look really good). However, there are many gaps around the actual chart, when no one sets the title and does not use their toolbar. Is there a way for the graph / chart to use more canvas?

My current solution is to add an additional container inside the container, and then set its width and height to be larger in the fields that I want to delete, and offset them by setting the "top" and "left" to negative values โ€‹โ€‹of the corresponding fields. Not elegant and, more importantly, not durable, but it works at the moment.

+5
source share
4 answers

You can use the properties defined on the grid (x, y, x2 and y2). These properties are listed in the documentation: http://echarts.baidu.com/doc/doc-en.html#Grid

+5
source

Adding values โ€‹โ€‹to a topic grid object, for example:

var theme = { grid: { x: 40, y: 20, x2: 40, y2: 20 } } 
+2
source

In ECharts 3, you can use the options grid.left , grid.top , grid.right and / or grid.bottom . According to the documentation, the left and right defaults to 10%, and above and below - 60 (pixels).

Documentation: https://ecomfe.imtqy.com/echarts-doc/public/en/option.html#grid .

+1
source

in Echart u can make a chart / chart with a chart combination, and thre can have too many configurations for each section of the chart, for example, legend, etc ... just look at their api documantation on your website and Example page (Combination )

0
source

Source: https://habr.com/ru/post/1211601/


All Articles