echarts Apply series gradient to value axis

0yg35tkg  于 5个月前  发布在  Echarts
关注(0)|答案(8)|浏览(67)

What problem does this feature solve?

Colour axis labels to match series gradient style (from visualMap).
| Before | After (mockup) |
| ------------ | ------------ |
|

|

|

Although it is possible to colour each label one by one on a category axis, it is not possible to apply colours to a value axis.

What does the proposed API look like?

yAxis.textStyle.color.type = 'linear' , etc.

9udxz4iz

9udxz4iz1#

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

vvppvyoh

vvppvyoh3#

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org . Please attach the issue link if it's a technical questions.

If you are interested in the project, you may also subscribe our mail list .

Have a nice day! 🍵

zu0ti5jz

zu0ti5jz4#

Visual map works on series data only, but not axis. If you wish to make a similar result, you may try to set axisLabel.color with a callback where the color is depended on the index.

eufgjt7s

eufgjt7s5#

But the callback doesn't know what the colour should be, considering the axis has a dynamic scale and no access to the gradient interpolation algorithm.

oxcyiej7

oxcyiej76#

This is not a support issue, this is a new feature. Is it planned?

zf2sa74q

zf2sa74q7#

Perhaps supporting gradient color on the labels can solve this issue.

pod7payv

pod7payv8#

@pissang If you mean manually applying a gradient then no, that will not help. Since the scale is dynamic (can change), the client will not know how to apply the gradient to the scale itself. The charting library knows the scale and needs to apply it according to the portion of the visualMap that is visible.

相关问题