I am new to mobile development. I am familiar with c#.net so i started working on xamarin
. As far as now i am able to add 2 charts in it. Problems i am facing are as follows
In above image i can see the first chart but can't see the second chart full, as scroll is not working. How to enable scroll ?
As you can see in the above images when i slide the chart also does causing the axis to increase. I want to stop it.
Bellow is my code in which i have fixed my axis maximum
and minimum
values
plotModel.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Maximum = 10, Minimum = 0 });
plotModel.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Maximum = 10, Minimum = 0 });
Any help would be highly appreciated
If you want to enable scrolling try using a ScrollViewer
surrounding your plots:
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible" >
<oxy:PlotView .../>
<oxy:PlotView .../>
</ScrollViewer>
And for your axis issue, if you want your plot axes to be fixed even when zooming, you have to use AbsoluteMaximum
and AbsoluteMinimum
properties on Axis
:
plotModel.Axes.Add(new LinearAxis()
{
Position = AxisPosition.Bottom,
AbsoluteMaximum = 10,
AbsoluteMinimum = 0,
});