Questions about ActiveStyle
Questions about ActiveStyle
TeeChart for NET Std Business Edition,Legend.checkboxes is out of date, prompting to use ActiveStyle, but the function can not be realized by using ActiveStyle, why is this? How to solve it?
Re: Questions about ActiveStyle
Hello, thanks for asking.
You can still use the deprecated approach 'tChart1.Legend.CheckBoxes = true", but it is very recommended to use the ActiveStyle property instead.
This is how to use the ActiveStyle property:
Here's a quick example:
This code will create a chart like this one:
Please be sure to be using the latest release build.
If there's anything else, let us know.
Regards,
Edu
You can still use the deprecated approach 'tChart1.Legend.CheckBoxes = true", but it is very recommended to use the ActiveStyle property instead.
This is how to use the ActiveStyle property:
Code: Select all
tChart1.Legend.ActiveStyle = LegendActiveStyles.CheckBox;
Code: Select all
private void ChartSetup()
{
//Example with two lines, different color
Line myLine = new();
myLine.Color = Color.Red;
Line mySecondLine = new();
mySecondLine.Color = Color.Blue;
//Fill data
for (int i = 0; i<10; i++)
{
myLine.Add(i, 2 * i);
mySecondLine.Add(2 * i, i);
}
//Adding lines to Chart
tChart1.Series.Add(myLine);
tChart1.Series.Add(mySecondLine);
// Set the legend's active style to checkbox, as desired.
tChart1.Legend.ActiveStyle = LegendActiveStyles.CheckBox;
}
If there's anything else, let us know.
Regards,
Edu
Edu
Steema Support
Steema Support