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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

WinRT SideBySideSeriesPlacement issue when series have hourly data

Thread ID:

Created:

Updated:

Platform:

Replies:

124346 Jun 2,2016 09:15 AM UTC Jun 3,2016 12:13 PM UTC Xamarin.Forms 1
loading
Tags: SfChart
Ahmet Cihat Ünaldi
Asked On June 2, 2016 09:15 AM UTC

Hi,

When SideBySideSeriesPlacement set to false and any type of series are added with hourly data, WinRT displays a meaningless chart.
When series have daily data, it works correctly. Android and iOS also display the chart correctly.
The screenshots are at the attachment and the sample code is below.

Thanks,
Ahmet

Xaml Code:

  <chart:SfChart x:Name="chart" HeightRequest="300" WidthRequest="500" 
                 HorizontalOptions="Center" VerticalOptions="Center" 
                 SideBySideSeriesPlacement="False">
    
    <chart:SfChart.PrimaryAxis>
      <chart:DateTimeAxis IntervalType="Hours" Interval="1">
          <chart:DateTimeAxis.LabelStyle>
            <chart:ChartAxisLabelStyle LabelFormat="HH:mm" />
          </chart:DateTimeAxis.LabelStyle>
        </chart:DateTimeAxis>
    </chart:SfChart.PrimaryAxis>
    
    <chart:SfChart.SecondaryAxis>
      <chart:NumericalAxis />
    </chart:SfChart.SecondaryAxis>

    <chart:ColumnSeries x:Name="column2" Color="Green"/>
    <chart:ColumnSeries x:Name="column1" Color="Red"/>
  </chart:SfChart>

Xaml.cs Code:

InitializeComponent();

Random rand = new Random();
var start = DateTime.Now.Date;

var source1 = new List<ChartDataPoint>();
var source2 = new List<ChartDataPoint>();

for (var i = 0; i < 7; i++)
{
    source1.Add(new ChartDataPoint(start.AddHours(i), rand.Next(10, 30)));
    source2.Add(new ChartDataPoint(start.AddHours(i), rand.Next(40, 60)));
}

column1.ItemsSource = source1;
column2.ItemsSource = source2;

Attachment: SideBySide_ce639d9b.zip

Santhiya Arulsamy [Syncfusion]
Replied On June 3, 2016 12:13 PM UTC

Hi Ahmet,

Sorry for the inconveinence caused.

We have confirmed this is this as a defect. We have logged a defect report and the fix for this issue will be available in our upcoming volume release 2, which will be available by the mid of June.

Thanks,
Santhiya A

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

;