Basically I have a chart with multiple bar series. The independent value for all the series are the same. So the chart’s xaxes are rendered with stacked of same independent values.
If I want to make all series (except for the first one) xaxes’ labels to not visible, how can i do that in the xaml declaration?
Can anyone please give me assistance on this?
Update:
I have come across example with the following code:
<toolkit:Chart x:Name="myChart" Width="600" Height="400">
<toolkit:LineSeries
Title="Tasks"
ItemsSource="{Binding}"
IndependentValueBinding="{Binding Month}"
DependentValueBinding="{Binding Task}">
</toolkit:LineSeries>
<toolkit:LineSeries
Title="Benefits"
ItemsSource="{Binding}"
IndependentValueBinding="{Binding Month}"
DependentValueBinding="{Binding Benefits}">
</toolkit:LineSeries>
<toolkit:Chart.Axes>
<toolkit:LinearAxis Orientation="Y" Location="Left" Title="First" />
<toolkit:LinearAxis Orientation="Y" Location="Right" Title="Second" />
</toolkit:Chart.Axes>
</toolkit:Chart>
If you plot the above code, you will see that both series will base the Y values from the left one. How can we change it so that first series will be plotted against Y values on the left and second series to be plotted against Y values on the right.
is that possible?
Thanks.
I think you can achieve what you want using the
DependentRangeAxisproperties of theLineSeriesobjects.First, give each Y-axis an
x:Name, for exampleTaskAxisandBenefitsAxis.Then, you can tell a LineSeries to use an axis by adding to it the property
or
as appropriate.
The full XAML of the chart then becomes
Another approach is to move the
Axisobjects inside the LineSeries. A demonstration of how to do this can be found here.