something like
LegendItem Newseries = new LegendItem();
LegendItem newcell = new LegendCell(LegendCellType.Text, "New sheet = " + chart.Series[0].LegendText, ContentAlignment.BottomCenter); //Error
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted May 7, 2014, 6:06 AM EDT
Failing that I think you'd need to try and use the Legend.Position property to get the first Legend on top of the second.
Farhan ShariffRank #2,004 · 725 reputationPosted May 7, 2014, 6:09 AM EDT
VulpesRank #55 · 29.2K reputationPosted May 7, 2014, 7:20 AM EDT
LegendItem Newseries = new LegendItem();
LegendCell newcell = new LegendCell(LegendCellType.Text, "New sheet = " + chart1.Series[0].LegendText, ContentAlignment.BottomCenter);
newcell.Font = new Font("Georgia", 16);
newcell.ForeColor = Color.Orange;
newcell.BackColor = Color.Black;
Newseries.Cells.Add(newcell);
Farhan ShariffRank #2,004 · 725 reputationPosted May 8, 2014, 1:48 AM EDT
http://imgur.com/ju3gCyY
But as you said I used Legends.Position property which solved the problem