Hello,
I will include a file with before pictures (what I have now, the orange charts) and after pictures (what I am trying to achieve, the blue c).
Picture 1:
Hi David Bauer,
Query 1: I would like to get rid of the major axis lines for the x and y axis.
We can show or hide the axis MajorGridLines using the ShowMajorGridLines property of axis as per in the below code example.
|
<chart:NumericalAxis ShowMajorGridLines="False"/> |
https://help.syncfusion.com/xamarin/charts/axis#grid-lines-customization
Query 2: How to only keep x axis values at the bottom
but get rid of y axis values on the left.
We can hide the y axis values by setting axis IsVisible property as false
as per in below code example.
|
<chart:NumericalAxis IsVisible="False"/> |
Query 3: Keep the chart the same width but make the columns skinnier
Currently we don’t have support for fixed column width instead of that we can adjust the column width using Width property of Column series.
Already we have added this requirement to our feature request list, and you can track the status of this feature from below link. Please cast your vote to make it count.
https://www.syncfusion.com/feedback/13060/fixed-column-width-support-for-segment-in-columnseries
Query 4: Add lines in between the columns
We can show the grid lines between columns for DateTimeAxis or
NumericalAxis using the ShowMinorGridLines and MinorTicksPerInterval
property of axis as per in the below code example.
|
<chart:DateTimeAxis ShowMajorGridLines="False" ShowMinorGridLines="True" MinorTicksPerInterval="1"> |
And for CategoryAxis we can position by setting LabelPlacement
to BetweenTicks.
https://help.syncfusion.com/xamarin/charts/axis#placing-labels-between-ticks
Query 5: Make the 90% column data marker appear above the chart.
We can position the datamarker label on top of the column by using the DataMarkerPosition
and LabelPosition as per in the below code example
|
<chart:ColumnSeries ItemsSource="{Binding ColumnData}" XBindingPath="Date" YBindingPath="YValue" Width="0.5" CornerRadius="10,10,10,10" DataMarkerPosition="Top"> <chart:ColumnSeries.DataMarker> <chart:ChartDataMarker> <chart:ChartDataMarker.LabelStyle> <chart:DataMarkerLabelStyle LabelFormat="#'%'" BackgroundColor="Transparent" LabelPosition="Outer"/> </chart:ChartDataMarker.LabelStyle> </chart:ChartDataMarker> </chart:ColumnSeries.DataMarker> </chart:ColumnSeries> |
https://help.syncfusion.com/xamarin/charts/datamarker#label-position
https://help.syncfusion.com/xamarin/charts/datamarker#datamarker-position
Query 6: Get rid of major x and y axis lines that border the chart
We can customize the chart Axis line and ticks using the AxisLineStyle,
MajorTickStyle and MinorTickStyle properties.
|
<chart:DateTimeAxis.AxisLineStyle> <chart:ChartLineStyle StrokeWidth="0"/> </chart:DateTimeAxis.AxisLineStyle> <chart:DateTimeAxis.MajorTickStyle> <chart:ChartAxisTickStyle StrokeColor="Transparent"/> </chart:DateTimeAxis.MajorTickStyle> <chart:DateTimeAxis.MinorTickStyle> <chart:ChartAxisTickStyle StrokeColor="Transparent"/> </chart:DateTimeAxis.MinorTickStyle> |
https://help.syncfusion.com/xamarin/charts/axis#tick-lines-customization
https://help.syncfusion.com/xamarin/charts/axis#axis-line-customization
Query 7: Only keep y axis strings but not x axis
numbers.
|
<chart:SfChart.SecondaryAxis > <chart:NumericalAxis IsVisible="False"/> </chart:SfChart.SecondaryAxis> |
Output:
Please find the sample from the attachment below and let us know if you need any further assistance on this.
Regards,
Devakumar D