We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change orientation of RangeColumnSeries Chart?

Thread ID:

Created:

Updated:

Platform:

Replies:

132523 Sep 6,2017 02:49 PM UTC Sep 8,2017 09:12 AM UTC Xamarin.Forms 3
loading
Tags: SfChart
Mark
Asked On September 6, 2017 02:49 PM UTC

I'm trying to create a chart which shows a category name spanning over a period of time, and I'm using a RangeColumnSeries chart to do that. Something like this:
http://6.anychart.com/products/anychart/docs/users-guide/img/Samples/sample-range-bar-chart-y-datetime-axis.png

It works great except that I would like to flip the Primary and Secondary Axis, such that the category name is the Y axis, and my high and low values represent a date range for the X axis. For some charts I can swap the CategoryAxis and NumericalAxis, but not apparently with the RangeColumnSeries. Any ideas?

                                <chart:SfChart HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                                   
                                    <chart:SfChart.PrimaryAxis>
                                       
                                        <chart:CategoryAxis ShowMajorGridLines="False">
                                            <chart:CategoryAxis>
                                            </chart:CategoryAxis>
                                        </chart:CategoryAxis>
                                       
                                    </chart:SfChart.PrimaryAxis>
                                    <chart:SfChart.SecondaryAxis>
                                       
                                        <chart:NumericalAxis ShowMajorGridLines="False" ShowMinorGridLines="False">
                                            <chart:NumericalAxis>
                                                <chart:NumericalAxis.LabelStyle>
                                                    <chart:ChartAxisLabelStyle />
                                                </chart:NumericalAxis.LabelStyle>
                                            </chart:NumericalAxis>
                                        </chart:NumericalAxis>
                                       
                                    </chart:SfChart.SecondaryAxis>
                                    <chart:SfChart.Legend>
                                        <chart:ChartLegend DockPosition="Bottom" >
                                            <chart:ChartLegend.LabelStyle>
                                                <chart:ChartLegendLabelStyle Font="Bold,10" />
                                            </chart:ChartLegend.LabelStyle>
                                        </chart:ChartLegend>
                                    </chart:SfChart.Legend>
                                    <chart:SfChart.Series>
                                        <chart:RangeColumnSeries ItemsSource ="{Binding Charts}"
                                                                 XBindingPath="Name"
                                                                 High="EndDayHigh"
                                                                 Low="StartDayLow">
                                            <!--<chart:RangeColumnSeries.DataMarker>
                                                <chart:ChartDataMarker />
                                            </chart:RangeColumnSeries.DataMarker>-->
                                            <chart:RangeColumnSeries.ColorModel>
                                                <chart:ChartColorModel Palette="Custom" CustomBrushes="{StaticResource Colors}"/>
                                            </chart:RangeColumnSeries.ColorModel>
                                        </chart:RangeColumnSeries>
                                    </chart:SfChart.Series>
                                </chart:SfChart>

Muneesh Kumar G [Syncfusion]
Replied On September 7, 2017 11:42 AM UTC

Hi Mark, 
  
Thanks for using Syncfusion Products. 
We would like to inform you that we can able to swap XAxis and YAxis for all the series by setting IsTransposed property as true as per the below code snippet. 
  
Code Snippet [XAML]: 
  
  
<chart:RangeColumnSeries x:Name="series1" Label="Series1" 
IsTransposed="True"> 
  
  
We have prepared a sample based on this and you can find the sample under the following location: 
Please let us know if you have any queries. 
Regards, 
Muneesh Kumar G. 



Mark
Replied On September 7, 2017 03:12 PM UTC

That's perfect!

Thank you

Mark


Parthiban Sundaram [Syncfusion]
Replied On September 8, 2017 09:12 AM UTC

Hi Mark,

Thanks for the update. We are glad that the given solution has helped to achieve your requirement. Please let us know for your further assistance.

Regards,
Parthiban S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;