Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Multiple series on same chart with different Y Axis - Range

$
0
0
Hi,

The Chart control is part of the Toolkit Plus edition.

This is not possible, but if you want to tweek it, here's a potential solution :

Starting at v3.0, the axis will have a new property "IntersectMinValue" which can be set to true or false. For example the Y Axis :
-IntersectMinValue == true means it will intersect the X Axis at the X Axis minimum Value.
-IntersectMinValue == false means it will intersect the X Axis at the X Axis maximum Value.

You will have to create two charts of exactly the same size and position them one over the other with proper offset.

Ex :
<Grid>
      <xctk:Chart ShowLegend="False"
                  Width="800"
                  Height="600"
                  HorizontalAlignment="Left">
        <xctk:Chart.Areas>
            <xctk:Area>
              <xctk:Area.XAxis>
                  <xctk:Axis ShowArrow="False"
                            ShowAxisLabel="False"
                            ShowTickLabels="False"
                            ScaleMode="Manual"
                            CustomRangeStart="0"
                            CustomRangeEnd="26"
                            TicksCount="13" />
              </xctk:Area.XAxis>
              <xctk:Area.YAxis>
                  <xctk:Axis ShowArrow="False"
                            ScaleMode="Manual"
                            CustomRangeStart="-20"
                            CustomRangeEnd="15"
                            TicksCount="7"
                            ShowGridLines="False"
                            Title="Value Y1"/>
              </xctk:Area.YAxis>
              <xctk:Area.Series>
                  <xctk:Series x:Name="_series"
                              DefaultInterior="Blue">
                    <xctk:Series.Layout>
                        <xctk:LineLayout />
                    </xctk:Series.Layout>
                  </xctk:Series>
              </xctk:Area.Series>
            </xctk:Area>
        </xctk:Chart.Areas>
      </xctk:Chart>

      <xctk:Chart ShowLegend="False"
                  Margin="64,0,0,0"
                  Width="800"
                  Height="600"
                  HorizontalAlignment="Left">
        <xctk:Chart.Areas>
            <xctk:Area>
              <xctk:Area.XAxis>
                  <xctk:Axis ShowArrow="False"
                            ShowAxis="False"
                            ShowTicks="False"
                            ScaleMode="Manual"
                            CustomRangeStart="0"
                            CustomRangeEnd="26"
                            TicksCount="13"
                            Title="Value X"/>
              </xctk:Area.XAxis>
              <xctk:Area.YAxis>
                  <xctk:Axis IntersectMinValue="False"
                            ShowArrow="False"
                            ScaleMode="Manual"
                            CustomRangeStart="0"
                            CustomRangeEnd="300"
                            TicksCount="6"
                            ShowGridLines="False"
                            Title="Value Y2" />
              </xctk:Area.YAxis>
              <xctk:Area.Series>
                  <xctk:Series x:Name="_series2"
                              DefaultInterior="Red">
                    <xctk:Series.Layout>
                        <xctk:LineLayout />
                    </xctk:Series.Layout>
                  </xctk:Series>
              </xctk:Area.Series>
            </xctk:Area>
        </xctk:Chart.Areas>
      </xctk:Chart>
  </Grid> 
――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>