Hi,
I am trying to display SfChart with column series inside the fragment. Somehow, the X-axis is not shown from its beginning.
I think it is due to the fact that I have ActionBar above the fragment.
How can I display the full chart without having it cropped?
Here is the code I am using:
chart = view.FindViewById<SfChart>(Resource.Id.barChartCategoryTypes);
chart.Title.Text = "Cash flow by type";
chart.Legend.Visibility = Visibility.Visible;
chart.VerticalScrollBarEnabled = true;
chart.HorizontalScrollBarEnabled = true;
CategoryAxis primaryAxis = new CategoryAxis();
primaryAxis.Title.Text = "Month";
chart.PrimaryAxis = primaryAxis;
//Initializing Secondary Axis
NumericalAxis secondaryAxis = new NumericalAxis();
secondaryAxis.Title.Text = "Amount";
chart.SecondaryAxis = secondaryAxis;
var dataModel = Statistics.Statistics.ColumnChartData(account);
ColumnSeries areaSeries1 = new ColumnSeries()
{
DataSource = dataModel[0],
TooltipEnabled = true,
AnimationEnabled = true,
AnimationDuration = 0.2,
Label = "Income",
};
chart.Series.Add(areaSeries1);
ColumnSeries areaSeries2 = new ColumnSeries()
{
DataSource = dataModel[1],
TooltipEnabled = true,
AnimationEnabled = true,
AnimationDuration = 0.2,
Label = "Expenses",
};
chart.Series.Add(areaSeries2);
DataModel is implemented as mentioned in your documentation.
This is the screenshot of the issue I am having.
Thanks in advance.