[Android] Fitting y-axis labels into graph canvas


#1

Currently, the y-axis label for my column series graph gets cut off at the top against certain ranges.  Is there a way to fit everything within the canvas of the graph so that everything is clearly visible? Basically, I want the value 350 to also fully appear on the y-axis and not clip it off with something like yAxis.setTickMarkClippingModeHigh(…)

y-axis cut off


#2

Hello graphicsnewb,

By default, the chart series will be drawn to fill as much of the plot area as possible, which is why you are seeing the behavior you describe. shinobicharts offers a number of ways in which you can prevent your upper tick mark label (in this case, on your y axis} being partially obscured. 

Firstly, you can ask the chart attempt to show a data range of your choosing. You can do this by setting a default range (crucially) before you load your data. Alternatively, after your data has been loaded you can request that the chart display a given range. In both cases this would be done on your axis and you would most likely choose a range which was slightly greater at its upper boundary than your data. 

Another option you have is to set an upper range padding on your y axis. You would need to provide a value that is just great enough to prevent the upper tick mark label (on the y axis) being partially obscured.

Finally, a further option you have is to set the high clipping mode of the tick marks and labels (on your y axis) so that any tick mark label will never be partially obscured.

Details of these various methods can be found in our api docs which can be found here:

https://www.shinobicontrols.com/docs/ShinobiControls/ShinobiChartsAndroid/1.7.2/Premium/Normal/apidocs/docs/reference/com/shinobicontrols/charts/package-summary.html

I hope that you find this helpful.

Thanks,

Kai.