I am using TeeChart 2016.19. I am using TeeChart to plot data from a number of data sets on two independent axes. I wish to show the legend only once per dataset. I have attached two images. The first image, "ChartWithOneLegendPerSeries" shows 8 legend items, one per series. When I hover over the legend the correct series is highlighted.
I look forward to hearing from you. Regards Errol
The second image,"ChartWithOneLegendPerDataset" shows 4 legend items, corresponding to series 1, series 3, series 5 and series 7. However, when I now hover over the second legend item, the second series is highlighted, not the third series as I would expect (the legend suggests a red line with a cyan circle, but a blue line with a red square is highlighted). It appears that TeeChart does not count the series when the legend is hidden.
Can you suggest a way to synchronise the hover/highlight function with the legend.Series highlighting with hidden legends
Re: Series highlighting with hidden legends
Hello,
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Series highlighting with hidden legends
Thanks. I m trying to prepare a simple example project but the series are not highlighted when I hover over the legend. I have attached the code I am using. Can you suggest what I might be doing wrong.
Code: Select all
unit LegendTestMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeeGDIPlus, ExtCtrls, TeeProcs, TeEngine, Chart, DBChart, Series,
StdCtrls, DB;
type
TForm1 = class(TForm)
DBChart1: TDBChart;
Button1: TButton;
Button2: TButton;
procedure LoadData(Sender: TObject);
procedure ClearData(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
DBChart1.AddSeries(TLineSeries).FillSampleValues();
end;
procedure TForm1.ClearData(Sender: TObject);
begin
DBChart1.RemoveAllSeries;
end;
procedure TForm1.LoadData(Sender: TObject);
begin
DBChart1.AddSeries(TLineSeries).FillSampleValues;
DBChart1.AddSeries(TLineSeries).FillSampleValues;
end;
end.
Re: Series highlighting with hidden legends
Hello,
I'm not sure it has ever occurred automatically.Errol wrote:the series are not highlighted when I hover over the legend
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Series highlighting with hidden legends
I realised I was off track. I have now written code to hide data set identifiers if there are multiple series from a single data set, with auto-highlighting of all the series in the data set when you hover over each legend entry. A great feature, but quite complicated, especially given that each visible series on the chart is made up of 3 separate series - a normal line graph, used to write the legend but hidden from view in the chart, a fast line series, and a point series required to be able to reduce the number of points visible in dense data sets. Additionally, not all data sets have the same number of series, so there is some tricky counting required.
Thanks for your support.
Thanks for your support.
Re: Series highlighting with hidden legends
Hi,
I'm glad to hear you found how to make it work as you wished!
I'm glad to hear you found how to make it work as you wished!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |