0

I'm using a scatter series in Shinobi Charts but points with maximum and minimum x and y values are being truncated because they're at the edge of the plot area?

How can I add a small margin to the plot area so I can clearly see the scatter points and none are truncated. I realise that I can set the range of each axis myself but that gets into nasty math to work out what a 5px margin would be over the lowest/highest values etc.

Shaik Riyaz
  • 11,204
  • 7
  • 53
  • 70
ConfusedNoob
  • 9,826
  • 14
  • 64
  • 85

1 Answers1

1

There are 2 properties on SChartAxis which can help you: rangePaddingLow and rangePaddingHigh. These values are absolute values, and in the scale of the axis.

For example, if you have an axis which has an automatic range of (0,100), then the following would update the range to (-5, 105):

axis.rangePaddingLow = @5;
axis.rangePaddingHight = @5;

As the axis scale updates, these padding values will be maintained.

sammyd
  • 883
  • 5
  • 6
  • Unfortunately, this uses raw units rather than pixels (which means I need to be very aware of the scale to set a useful margin). How can I set it to 5 pixels, where can I see the auto-calculated range? Be great if you could specify the padding in pixels thought – ConfusedNoob Dec 19 '13 at 18:42
  • I don't think that this is possible. You could contact the support team at Shinobi - they might be able to help you out with this. – sammyd Dec 19 '13 at 19:27