oxyplot-xamarin icon indicating copy to clipboard operation
oxyplot-xamarin copied to clipboard

Increasing TitleFontSize on Axis overlaps the axis labels

Open baverbud opened this issue 8 years ago • 1 comments

If I set TitleFontSize = 24 on the axis, the title overlaps the tick labels. At commit 24ac93a4cb8f71f996f17073bf57f9da44efd366. Using Xamarin.Forms on Android.

Xamarin.Forms version 2.2.0.45 Android SDK: 23 rev 3 Device: Motorola Nexus 6 running Android 6.0.

Sample code:

       var plotModel = new PlotModel { Title = $"Last {list.Count - i} Trips", TitleFontSize = 48 };

        CategoryAxis bottomAxis = new CategoryAxis { Position = AxisPosition.Bottom, Title = "Trip", TitleFontSize = 36, IsPanEnabled = false, IsZoomEnabled = false, GapWidth = 0.2 };
        plotModel.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Maximum = 100, Minimum = 0, Title = "Score", TitleFontSize = 36, IsPanEnabled = false, IsZoomEnabled = false });
        plotModel.Axes.Add(bottomAxis);

        var series1 = new ColumnSeries() { StrokeThickness = 0 };

        string[] dates = new string[list.Count - i];

        while (i < list.Count)
        {                
            dates[series1.Items.Count] = list[i].StartTime;
            series1.Items.Add(new ColumnItem { Value = list[i].Score * 100});
            i++;
        }

        bottomAxis.ItemsSource = dates;
        plotModel.Series.Add(series1);

Example image attached. screenshot_20160610-125137

baverbud avatar Jun 10 '16 19:06 baverbud

I guess this is a general issue that could be posted at https://github.com/oxyplot/oxyplot/issues

objorke avatar Jun 15 '16 03:06 objorke