2nd legend not visible
Posted: Wed Nov 11, 2015 11:16 pm
In a previous version of TChart, I used the following code to create a second legend:
And I got the following result (which is what I want):
But this does not work in the current version I am using--it only shows one legend symbol (the blue ones). (And, as you might expet, the BPAccumChartBeforeDrawSeries event is never called).
Here is the original post from which I got this answer from:
http://www.teechart.net/support/viewtop ... end#p58861
How do I add the second column of legend symbols?
Thank you,
Ed Dressel
Code: Select all
lsrs := CreateBarSeries('none', lChart, clNone, 0);
lsrs.Active := false;
lsrs.AddNull('Pre-Tax');
lsrs.AddNull('Roth');
lChart.Legend.Symbol.Width := 45;
lExtraLegend := TExtraLegendTool.Create(self);
lExtraLegend.ParentChart := lChart;
lExtraLegend.Legend.CustomPosition := True;
lExtraLegend.Legend.LegendStyle := lsValues;
lExtraLegend.Legend.Transparent := True;
lExtraLegend.Legend.Symbol.OnDraw := AccumChartLegendDrawAccountSymbols;
lExtraLegend.Legend.TextStyle := ltsPlain;
lExtraLegend.Series := lsrs;
lExtraLegend.Active := True;
lExtraLegend.Legend.Symbol.Width := 45;
lChart.OnGetLegendText := BPAccumChartLegendText;
lExtraLegend.Legend.Title.Text.Text := 'Accounts';
lChart.OnBeforeDrawSeries := BPAccumChartBeforeDrawSeries;
But this does not work in the current version I am using--it only shows one legend symbol (the blue ones). (And, as you might expet, the BPAccumChartBeforeDrawSeries event is never called).
Here is the original post from which I got this answer from:
http://www.teechart.net/support/viewtop ... end#p58861
How do I add the second column of legend symbols?
Thank you,
Ed Dressel