I'm using legend scrollbar tool in the teechart to show scrollbar for legend box. Now horizontal scroll bar is visible at bottom position but I'm looking for a way to display a vertical scrollbar for legend box which in some cases could contain more than 50 legend items.
Unfortunately, the legend scrollbar always is drawn in same position as legend alignment. But, you can prevent possible problems in the cases where legend is aligned to bottom and contains a lot of legend items using the property MaxNumRow. The code below shows you how can do that
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Dock = DockStyle.Fill;
Steema.TeeChart.Tools.LegendScrollBar sclenged = new Steema.TeeChart.Tools.LegendScrollBar(tChart1.Chart);
for ( int i=0; i<50; i++)
{
new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
tChart1[i].FillSampleValues(10);
}
tChart1.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
tChart1.Legend.MaxNumRows = 3;
}