echarts [Feature] [visualMap] add support for name on visualMap

zc0qhyus  于 5个月前  发布在  Echarts
关注(0)|答案(1)|浏览(47)

What problem does this feature solve?

I would like to have the ability to set a name on visualMaps. In a similar fashion as for the xAxis and yAxis.

This is a feature present in other visualization libraries, and a way to do something similar is to use the labels on one of the ends of the map, but this reduce flexibility and the user have to choose between have labels on both ends or have a name for the visualMap on one of the ends

What does the proposed API look like?

It would be best to keep consistency with other elements such as xAxis or yAxis, something like:

visualMap: {
    name: 'My visualMap name',
    nameLocation: 'center',
    nameTextStyle: {...},
    nameGap: 15,
    nameRotate: 0,
    ...
  }
bejyjqdl

bejyjqdl1#

You may use graphic.elements-text to draw text.

相关问题