- Home
- Forum
- Xamarin.Forms
- how can I "pad" the area around the chart data?
how can I "pad" the area around the chart data?
I'm having an issue where the very first and very last data points in my simple chart are render just off the left/right of the chart - I've attached an image showing what I mean - the last item on the right there should be "75" but it's rendered just off the chart, you can't scroll over any further to see it.
Just poking around trying to figure how how I can get the data points all visible here...
thanks
Just poking around trying to figure how how I can get the data points all visible here...
thanks
SIGN IN To post a reply.
7 Replies
JL
Jeff Lindborg
August 22, 2016 02:26 AM UTC
YP
Yuvaraj Palanisamy
Syncfusion Team
August 22, 2016 06:33 AM UTC
Hi Jeff Lindborg,
Please refer the following code snippet to set the PlotOffset for axis. We have also prepared a sample for your reference and you can find the sample from the below link.
Code Snippet:
|
C#:
chart.PrimaryAxis.PlotOffset = 20;
chart.SecondaryAxis.PlotOffset = 20;
XAML:
<chart:SfChart.PrimaryAxis>
<chart:DateTimeAxis PlotOffset="20"/>
</chart:SfChart.PrimaryAxis>
<chart:SfChart.SecondaryAxis>
<chart:NumericalAxis PlotOffset="20"/>
</chart:SfChart.SecondaryAxis> |
Please let us know if you have any further queries regarding this issue.
Thanks,
Yuvaraj.
JL
Jeff Lindborg
August 22, 2016 01:36 PM UTC
cool - setting the offset for the primary axis to 30 seems to do the trick - a little odd when you zoom in/out the last reading can still slip off the end of the graph as you zoom in further but it's not a deal breaker.
thanks
thanks
YP
Yuvaraj Palanisamy
Syncfusion Team
August 23, 2016 11:57 AM UTC
Hi Jeff Lindborg,
We are not able to reproduce the reported issue while setting ‘PlotOffset’ value for primary axis at our end and we have prepared a sample for your reference. Please update us the modified sample to reproduce the issue which will be helpful for providing further assistance on this.
Thanks,
Yuvaraj
JL
Jeff Lindborg
August 23, 2016 04:15 PM UTC
you probably just need more data - I'm not doing anything tricky - just allowing resizing along the x axis - I've attached a zip with a short MP4 video showing this on Android - the video is a little fuzzy but you can see the last value on the right (138) drifting off the edge as I zoom in and back on as I zoom back out.
Attachment: ChartPad_3afa0e2a.zip
Attachment: ChartPad_3afa0e2a.zip
JL
Jeff Lindborg
August 23, 2016 04:32 PM UTC
also, doing more testing with iOS - this issue seems specific to Android - my phone and pad as well as emulators. Testing my iphone and iPad the last value always "sticks" to the offset from the end as it should as I zoom in and out.
YP
Yuvaraj Palanisamy
Syncfusion Team
August 24, 2016 01:56 PM UTC
Hi Jeff,
We have tested in Nexus 5X, Moto E devices and we are not able to reproduce the reported issue. We have recorded a video of this and attached for your reference.
Can you please make sure whether you are able to reproduce this issue in the attached sample (with more data points).
Also, can you provide the following details.
1. Essential Studio version
2. Android Device and OS versions
Please let us know if you need further assistance on this.
Thanks,
Yuvaraj
SIGN IN To post a reply.
- 7 Replies
- 2 Participants
-
JL Jeff Lindborg
- Aug 22, 2016 02:24 AM UTC
- Aug 24, 2016 01:56 PM UTC