Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Linechart support for deciaml values
posted

Hi,

Basically we want to provide zooming functionality on line chart. But while redrawing chart after selecting particular area, our chart may going to contain decimal values for x-axis. But if we tried to set decimal value to unit parameter, line chart stops working. So we decide that we will explore scatter line chart and try to perform zooming on that.

We want your suggestion for this : By using scatter line chart whether we are going on right track or not ? Or some other options for fulfilling our requirements like zooming,decimal values on x-axis etc . are available ?

 One more thing can you please provide us some example of scatter line chart which are having x-axis value set to time values ?

Thanks in advance

  • 739
    posted

    Hi,

    The scatter line chart supports X data time axis and the following sample shows how date time axis can be used. This sample also shows how date time labels could be formatted. The scatter chart is the best chart time for zooming, and this chart type supports date time axis. If you want to zoom and set minimum and maximum values for X axis (double type), ToOADate()method should be used to convert DateTime to double. Also Unit value has to be set manually. Unfortunatly, XamChart does not support zooming in this version.Thanks,
    GoranS

     

    <!-- Chart -->

    <igCA:XamChart Name="ScatterLineChart2D" View3D="False" >

    <!-- Legend -->

    <igCA:XamChart.Legend>

    <igCA:Legend Visible="True"/>

    </igCA:XamChart.Legend>

    <!-- Series -->

    <igCA:XamChart.Series>

    <igCA:Series Stroke="Black" ChartType="ScatterLine">

    <igCA:Series.DataPoints>

    <igCA:DataPoint>

    <igCA:DataPoint.ChartParameters>

    <igCA:ChartParameter Type="ValueX" Value="2/5/63"/>

    <igCA:ChartParameter Type="ValueY" Value="8"/>

    </igCA:DataPoint.ChartParameters>

    </igCA:DataPoint>

    <igCA:DataPoint>

    <igCA:DataPoint.ChartParameters>

    <igCA:ChartParameter Type="ValueX" Value="2/6/63"/>

    <igCA:ChartParameter Type="ValueY" Value="3"/>

    </igCA:DataPoint.ChartParameters>

    </igCA:DataPoint>

    <igCA:DataPoint>

    <igCA:DataPoint.ChartParameters>

    <igCA:ChartParameter Type="ValueX" Value="2/7/63"/>

    <igCA:ChartParameter Type="ValueY" Value="9"/>

    </igCA:DataPoint.ChartParameters>

    </igCA:DataPoint>

    <igCA:DataPoint>

    <igCA:DataPoint.ChartParameters>

    <igCA:ChartParameter Type="ValueX" Value="2/10/63"/>

    <igCA:ChartParameter Type="ValueY" Value="6"/>

    </igCA:DataPoint.ChartParameters>

    </igCA:DataPoint>

    <igCA:DataPoint>

    <igCA:DataPoint.ChartParameters>

    <igCA:ChartParameter Type="ValueX" Value="2/11/63"/>

    <igCA:ChartParameter Type="ValueY" Value="7"/>

    </igCA:DataPoint.ChartParameters>

    </igCA:DataPoint>

    <igCA:DataPoint>

    <igCA:DataPoint.ChartParameters>

    <igCA:ChartParameter Type="ValueX" Value="2/11/63"/>

    <igCA:ChartParameter Type="ValueY" Value="3"/>

    </igCA:DataPoint.ChartParameters>

    </igCA:DataPoint>

    </igCA:Series.DataPoints>

    </igCA:Series>

    </igCA:XamChart.Series>

    <!-- Axes Style-->

    <igCA:XamChart.Axes>

    <igCA:Axis AxisType="PrimaryX">

    <igCA:Axis.Label>

    <igCA:Label FontSize="14" Format="{}{0:dd/MMM/yy}"/>

    </igCA:Axis.Label>

    <igCA:Axis.MajorGridline>

    <igCA:Mark Stroke="#FFEADEFF"/>

    </igCA:Axis.MajorGridline>

    </igCA:Axis>

    <igCA:Axis AxisType="PrimaryY">

    <igCA:Axis.Label>

    <igCA:Label FontSize="14"/>

    </igCA:Axis.Label>

    <igCA:Axis.Stripes>

    <igCA:Stripe Fill="#FFEADEFF" Stroke="#FFEADEFF" StrokeThickness="0"/>

    </igCA:Axis.Stripes>

    </igCA:Axis>

    <igCA:Axis AxisType="PrimaryZ" >

    <igCA:Axis.Label>

    <igCA:Label FontSize="14" Visible="False" Foreground="#00000000"/>

    </igCA:Axis.Label>

    </igCA:Axis>

    </igCA:XamChart.Axes>

    </igCA:XamChart>