Hi,

Besides using visualMap component mentioned in Wenli's reply.

There are two other ways to set different colors on specific data points.

1. Use callback function for series.itemStyle.color[1]
2. Set itemStyle.color in the specific data item[1]

In your case, I think using callback function or visualMap-piecewise
<https://echarts.apache.org/en/option.html#visualMap-piecewise>
component Wenli mentioned are
both OK.

[1]. https://echarts.apache.org/en/option.html#series-bar.itemStyle.color
[2].
https://echarts.apache.org/en/option.html#series-bar.data.itemStyle.color


Regards.


On Tue, Nov 5, 2019 at 2:20 PM Ayaskant Swain <ayaskant.sw...@gmail.com>
wrote:

> Hi Team,
>
> I have query regarding the Bar charts supported by e-charts. Our
> requirement is to plot an incoming data points against time.
>
> Time will be on X-axis & Data Value will be on Y-Axis. Our requirement is
> to show red color only in specific data points. That is if the data value
> exceeds a particular value (example 80) show it as red bar while rest of
> the bars will be shown as green.
>
> I saw the below 2 charts on your website. But here the colors for any
> specific category is homogeneous. We need a mix of 2 colors:
>
> https://echarts.apache.org/examples/en/editor.html?c=bar-gradient
> https://echarts.apache.org/examples/en/editor.html?c=bar1
>
> Is it possible to achieve that in e-charts?
>
> Thanks
> Ayaskant
>


-- 
Yi Shen
Apache ECharts(incubating) PPMC

Reply via email to