Profile Picture

editable automatic legend

Posted By Daniel Csimszi 11 Years Ago
Author
Message
Daniel Csimszi
questionmark Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 61, Visits: 35
Hi,

I try to let the user to edit the text of the legend, but I still would like that it adds automatic with the color and so on. I tried to retrieve the legends by index from the legend list and just edit its title, but it does not seems to be working as there are no items in the legend list.

Is it any way to do it similar to that, or do I need to create all of the legends manually?

This is the code of my legend:
m_Legend = new NLegend();
m_Legend.Mode = LegendMode.Automatic;

m_Chart.DisplayOnLegend = m_Legend;
m_Legend.Visible = true;
m_Legend.Dock = DockStyle.Bottom;
m_Legend.Data.ExpandMode = (LegendExpandMode)1;
Array values = Enum.GetValues(typeof(ContentAlignment));
m_Legend.FitAlignment = (ContentAlignment)values.GetValue(7);


nChartControl1.Panels.Add(m_Legend);

Retrieve the Legend:
NLegendItemCellData legend = (NLegendItemCellData)m_Legend.Data.Items[index];


Anything I am missing?

Thank you,
Daniel




Similar Topics


Reading This Topic