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. Image for the cookie policy date

WinRT SideBySideSeriesPlacement issue when series have hourly data

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

1 Reply

SA Santhiya Arulsamy Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon