New Legend.PaletteLegendMode and associated functionality in 15.1


New Legend.PaletteLegendMode and associated functionality in 15.1
Author
Message
Kevin Harrison 1
Kevin Harrison 1
Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)
Group: Forum Members
Posts: 176, Visits: 1.9K
Hi,

Thanks for adding this new feature.

I allow users to change the legend position from a shortcut menu on the chart. If they change, say, from right to top, the PaletteOrientation doesn't change automatically like a standard legend does.

I achieve the legend position change by having separate chart and legend panels and reorganising them. I could switch the PaletteOrientation myself but I cannot see how to get from the Chart Legend (NLegend chartLegend) to the elements on it to achieve this (as they were added using chart.DisplayOnLegend = chartLegend). Is there a way to do this?

Thanks

Kevin

PS there is a typo in the property NAutoLegend.PaleteScalePosition (missing t)
Replies
Kevin Harrison 1
Kevin Harrison 1
Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)
Group: Forum Members
Posts: 176, Visits: 1.9K
Thanks for the reply but you didn't answer my question. I know how to change the PaletteOrientation for a series Legend, but I asked if there was any way to get to the series legends from the chart legend.

Thanks

Kevin
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Kevin,

Currently there is no way to get the series that display on a legend, however you can easily loop through the chart/series in the control and check which ones display on that particular legend:

   List<NSeriesBase> seriesOnLegend = new List<NSeriesBase>();

   for (int i = 0; i < nChartControl1.Charts.Count; i++)
   {
    NChart chart = nChartControl1.Charts[i];

    for (int j = 0; j < chart.Series.Count; j++)
    {
     NSeriesBase series = chart.Series[j];

     NLegend curLegend = series.Legend.DisplayOnLegend;
     if (curLegend == null)
     {
      curLegend = chart.DisplayOnLegend;
     }

     if (curLegend == myLegend)
     {
      seriesOnLegend.Add(series);
     }
    }
   }

Hope this helps...


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search