I have a chart with 4 series, each with their own Y axis - each series is a different measurement. I use the legend tick boxes to show or hide individual series and allow the user to select whether the y axes are SideBySide or Stacked.
I use the LegendItem CheckedChanged event to hide the series' axis when the series is hidden, using the code below:
private void chartControl_LegendItem_CheckedChanged(object sender, EventArgs e)
{
for (int i = 0 ; i < _chart.Legend.Items.Length ; i++)
{
_chart.Series[i].YAxis.IsVisible = _chart.Legend.Items[i].IsChecked;
}
}
However, when a series, and its axis is hidden, a blank area is left, as shown in the attached image.
I have two questions:
1) How can I hide the blank area?
2) Is it possible to adjust how much vertical space (percentage?) is taken by each axis when they are shown SideBySide? Or is it a fixed percentage, i.e. 4 axes = 25% per axis.
Thanks,
Paul
BlankArea_b9fd2a05.jpg