skip to Main Content

How can we show red line for negative values in the following chart?

I am able to style the dots that have negative values but when I try to style the connecting line , It seems like ngx-echart does not support it!?

chart link

2

Answers


  1. The Problem is that each element displayed has it’s own styles. The Line is one element for it self so it can only have one color. So for each case you want an element behave diffrently, you have to render one just for that case.

    Alternativly (untested) you can apply a gradient color, but that seems even more complicate.

    Login or Signup to reply.
  2. You can just use a visualMap. Take a look at this official example

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search