No, this is not possible (I am the author of amCharts). I would suggest creating two lines, one above another. One could have full data and another one, which is above, only the data which needs to be in a different color.
AmCharts Negative Base Line Trend
-
03-06-2022 - |
Question
Within a AmCharts Line Chart (Javascript) there is a setting to change the colour of the line to be different when it is negative as opposed to it being positive. Quite handy.
There is also a setting to change the base negative value from 0 to something else, say -20 or 150.
What I have is 2 line graphs, one a target line (straight gradient of 1:4) and the other is output production.
Does anyone know if there is a way to have the negativeBase value be something other than a flat number? say a formula or something like that? I would like the product line to change colour depending if it is above or below the target gradient line.
Sorry no current JS Fiddle as the production data is for a private firm.
Solution
OTHER TIPS
you can use something like this
var var1=somevalue;
var var2=someothervalue;
now you can use formula in the negative base
"negativeBase": var1*var2,