Show Color Range and Threshold


Dear All,

I would like to show Color Range and Threshold in the Shinobi graph, as seen from the picture below. The color range would be Red, Yellow, and Green. I use a few line series to show the color range. The question is:

How to overlay the color range and the actual line series? I try to set the opaque value in Color.argb(150, 0, 255, 0). If i use light opaque, the color is not nice, if i use full opaque, the color will overwrite the actual line series. Is there a solution?



Th code below:

LineSeriesStyle styleTWarning = seriesThresholdPRWarning.getStyle();


styleTWarning.setAreaColor(Color.argb(150, 0, 255, 0));

styleTWarning.setAreaColorGradient(Color.argb(150, 0, 255, 0));

styleTWarning.setAreaColorBelowBaseline(Color.argb(150, 0, 255, 0));

styleTWarning.setAreaColorGradientBelowBaseline(Color.argb(150, 0, 255, 0));


Hello Victor,

Thanks for your enquiry.

It looks like you’re using ShinobiCharts for Android premium. There will be an exciting new premium feature included in our upcoming release: annotations. This feature offers the facility to put objects such as text labels and bands on the chart. It will allow you to very easily create the threshold functionality which you’re looking for.

To use the new annotations, you would add 3 horizontal band annotations set to draw behind the series data. You can set the y axis range for each band annotation and the color, for example:

Horizontal band annotation 1, coloured green with a y axis range of 40 to 80.
Horizontal band annotation 2, coloured yellow with a y axis range of 80 to 120.
Horizontal band annotation 3, coloured red with a y axis range of 120 to 160.

I’ve created a small proof of concept application this morning using version 1.4 that went well and making use of annotations will be the cleanest and simplest solution. The next release is scheduled for approximately a weeks time and we’ll make sure you’re kept up to date.

I hope this is useful, if you’d like to discuss options for getting something working before then please let me know.