0

Didn't find anything about this... Is it possible under the chart1.Name/Legend Name to add Sub-text each a own Line?

        string seriesName1 = "Newbie";
        Series ser1 = chart1.Series.Add(seriesName1);
        ser1.ChartArea = chart1.ChartAreas[0].Name;
        ser1.Name = seriesName1;
        // ser1.Legend = "Test";
        // chart1.Titles = "Test";
        // chart1.Titles = "Test";
        // chart1.Titles = "Test";

and the Legend is owerritting the Name..

What i mean

I want to add these 3 programmly added Test Titles (picture) under the Seriesname... I miss something i think. Some code tipps how i can solve this Welcome:*

Shanapoia
  • 23
  • 4
  • Well, first decide on what you want: More lines in the Legend or in the chart Title? - For the former you will need to build up a custom Legend, which is powerful but a little involved. - For the latter: You already wrote `chart1.Titles` which is a hint that [Titles](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.datavisualization.charting.chart.titles?view=netframework-4.8) is indeed a collection of [Tilte](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.datavisualization.charting.title?view=netframework-4.8).. – TaW Mar 10 '21 at 06:28
  • Legend examples: [1](https://stackoverflow.com/questions/35791944/how-to-add-data-table-with-legend-keys-to-a-ms-chart-in-c/35795254?s=2|1.8764#35795254), [2](https://stackoverflow.com/questions/35791944/how-to-add-data-table-with-legend-keys-to-a-ms-chart-in-c/35795254#35795254) – TaW Mar 10 '21 at 06:31

0 Answers0