SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on where you can earn rep for your questions!


I am trying the SciChart evaluation version and still can’t figure out how to display a candlestick chart.

The SciChartSurface is placed at the root of a user control, which in turn shown as a tab in the main window:

<UserControl x:Class="Pipstudio.Datacenter.ChartWindow"
             d:DesignHeight="300" d:DesignWidth="300" xmlns:ams="" Loaded="UserControl_Loaded">

    <SciChart:SciChartSurface Name="sciChart" SciChart:ThemeManager.Theme="Chrome">

        <!-- Declare RenderableSeries -->

        <!-- Create an X Axis -->
                    <SciChart:DoubleRange Min="0.0" Max="0.2"/>

        <!-- Create a Y Axis with GrowBy -->
                    <SciChart:DoubleRange Min="0.1" Max="0.1"/>



The data points are manually appended in the Loaded event handler of the user control like this:

  var dataSeriesSet = new DataSeriesSet&lt;DateTime, double&gt;();
  sciChart.DataSet = dataSeriesSet;

  var series = dataSeriesSet.AddSeries();

  series.Append(new DateTime(2011, 1, 1), 1050, 1070, 1040, 1040);
  series.Append(new DateTime(2011, 1, 2), 1040, 1040, 1010, 1020);
  series.Append(new DateTime(2011, 1, 3), 1020, 1040, 1000, 1010);
  series.Append(new DateTime(2011, 1, 4), 1050, 1100, 1050, 1080);
  series.Append(new DateTime(2011, 1, 5), 1070, 1130, 1070, 1110);
  series.Append(new DateTime(2011, 1, 6), 1120, 1160, 1110, 1150); 

I expect to see 6 candles on the chart, but the result is quite different (see attachment). I have no idea why the samples work and mine doesn’t.

Any help would be appreciated. Thanks in advance.

  • You must to post comments

Hi TTega, thanks for taking the time to make this post!

SciChart has two modes for axis ranging:



  • Full Auto: you set Axis.AutoRange to true and SciChart will zoom to fit new data as it is appended. In this mode you cannot set the Axis.VisibleRange as auto will override it.
  • Manual (Default): you set Axis.AutoRange to false, but you are responsible for setting VisibleRange or zooming to extents as new data is appended
  • The default mode is manual. In this case, after appending your data, you can either set the VisibleRange yourself or call ZoomExtents() on the SciChartSurface. e.g.

    Option 1: To Zoom to Extents:

    // Will cause SciChart to Zoom 
    // to fit in the X and Y direction

    Option 2: To specify an X-range manually

    // Set the XAxis range
    sciChart.XAxis.VisibleRange = new DateRange(
       new DateTime(2011, 01, 01), 
       new DateTime(2011, 1, 06));
    // Zoom Extents in Y direction only 

    Option 3: To specify X and Y ranges manually

    // Set the XAxis range
    sciChart.XAxis.VisibleRange = new DateRange(
       new DateTime(2011, 01, 01), 
       new DateTime(2011, 1, 06));
    // Zoom Extents in Y direction only 
    sciChart.YAxis.VisibleRange = new DoubleRange(
       1000, 1150);

    Option 4: Let SciChart AutoRange for you

    sciChart.XAxis.AutoRange = true;
    sciChart.YAxis.AutoRange = true;

    Let me know if this helps!

    • ttega
      Andrew,Thank you very much for quick reply.Information on how to automatically/manually set the visible range was very helpful.Since I could get it work by calling ZoomExtents(), I'm gonna try to fine-tune the chart appearance. :)
    • You must to post comments

    When using AutoRange is there any way of adding a margin? I’m currently showing a square wave on my chart and it would look better if it was not zoomed all the way to the extents on the window. See image attched.



    • You must to post comments
    Showing 2 results
    Your Answer

    Please first to submit.