Chart for WinRT
Plot Area

The data is plotted in the plot area of the chart. The Plot area is the part of the plot limited by axes and containing all plot elements (bars, columns, lines etc.). Previously, the chart could have only one plot area but now it's possible to have several ones in the same chart.

Usually plot areas are created automatically based on Axis.PlotareaIndex property. By default it's 0 and the new plot area is not created for the additional axis. Axis is just added for example, at the left of main y-axis or at the bottom of the main x-axis. But if you set Axis.PlotAreaIndex = 1 the new axis is added on the same line as the main axis. For x-axis the auxiliary axis will be at the right and for y-axis - at the top.

The following example illustrates the new axis added on the same line as the main axis:

<Chart:C1Chart x:Name="chart" >

       <Chart:C1Chart.View>

         <Chart:ChartView>

           <!-- Main axes  -->

           <Chart:ChartView.AxisX>

             <Chart:Axis Min="0" Max="100" Title="x1" />

           </Chart:ChartView.AxisX>

           <Chart:ChartView.AxisY>

             <Chart:Axis Min="0" Max="100" Title="y1" />

           </Chart:ChartView.AxisY>

 

           <!-- Auxiliary axis at the right of main x-axis -->

           <Chart:Axis x:Name="x2" Title="x2" PlotAreaIndex="1"

              AxisType="X" Min="0" Max="10" />

 

           <!-- Auxiliary axis at the top of main x-axis -->

           <Chart:Axis x:Name="y2" Title="y2" PlotAreaIndex="1"

              AxisType="Y" Min="0" Max="10" />

 

         </Chart:ChartView>

       </Chart:C1Chart.View>

     </Chart:C1Chart>

 

To add the data you need to specify the name of the axis (DataSeries.AxisX/AxisY) and the data will be plotted along the auxiliary axis.

 

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback