Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How to Decrease the Height and Width of Syncfusion Multiple Axis Chart?

$
0
0

i am using this code and chart is showing but height and width is not adjusting i want to show this chart on half screen but chart is showing on full screen and i am not able to set height and width of the chart and syncfusion chart has property height and width request but still this property is not working..

<?xml version="1.0" encoding="utf-8" ?>

<chart:SfChart x:Name="sfchart">
    <chart:SfChart.Title>
        <chart:ChartTitle Text= "Revenue of Company"/>
    </chart:SfChart.Title>

    <chart:SfChart.PrimaryAxis >
        <chart:CategoryAxis>
            <chart:CategoryAxis.Title>
                <chart:ChartAxisTitle Text="Year"/>
            </chart:CategoryAxis.Title>
        </chart:CategoryAxis>
    </chart:SfChart.PrimaryAxis>

    <chart:SfChart.SecondaryAxis>
        <chart:NumericalAxis >
            <chart:NumericalAxis.Title>
                <chart:ChartAxisTitle Text="Revenue(in millions)"/>
            </chart:NumericalAxis.Title>

            <chart:NumericalAxis.LabelStyle>
                <chart:ChartAxisLabelStyle LabelFormat="$##"/>
            </chart:NumericalAxis.LabelStyle>
        </chart:NumericalAxis>
    </chart:SfChart.SecondaryAxis>

    <chart:SfChart.Series>
        <chart:ColumnSeries x:Name="series1"
                            XBindingPath="Year" YBindingPath="Production" Label="Revenue" EnableTooltip ="true"/>
        <chart:SplineSeries x:Name="series2" Color="Red"
                            XBindingPath="Year" YBindingPath="Production" Label="Customers" EnableTooltip ="true">
            <chart:SplineSeries.YAxis>
                <chart:NumericalAxis  ShowMajorGridLines = "false"
                                      OpposedPosition="true">
                    <chart:NumericalAxis.Title>
                        <chart:ChartAxisTitle Text ="Number of Customers"/>
                    </chart:NumericalAxis.Title>
                </chart:NumericalAxis>
            </chart:SplineSeries.YAxis>
        </chart:SplineSeries>
    </chart:SfChart.Series>

    <chart:SfChart.Legend>
        <chart:ChartLegend ToggleSeriesVisibility = "true"/>
    </chart:SfChart.Legend>

</chart:SfChart>

if there is another method to show multiple axis chart please suggest me..


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>