Labels not showing in Gantt charts
Posted: Mon Dec 19, 2011 5:06 pm
Hi everyone,
I'm trying to build a Gantt web chart (v3) with several series in it, and I've gotten the impression from some forums that missing labels might be a problem in this case. So, I've tried to avoid that by putting all but one series showing on the right axis, and then hide it, leaving only the left axis visible. That way I can still use the hotspot tool to display the other labels when mouse is hovering over the bars, but only see one series displayed on the left axis.
I thought that worked well for a while, but not so anymore, and I've had problems with this coming and going throughout the development project. I just tried the below, for example.
method GanttChart.wcGantt_GetAxisLabel(sender: System.Object; e: Steema.TeeChart.GetAxisLabelEventArgs);
begin
if e.LabelText.Length>=11 then
e.LabelText:=e.LabelText.Substring(0,11)+' ...';
/ else
e.LabelText:=e.LabelText+' ';/
I'm pretty sure you can see what that code's supposed to do. Only, it stopped working (all labels disappeared completely) when I added the part in between the slashes (which are not part of the code of course). Funny thing is that after I removed that part again, the chart still refuses to display the labels correctly. I have setup my explorer such that it erases surfing history automatically, so it's nothing from the cache. It simply seems like this particular use of this particular chart type is unstable.
Anyone seen problems of this sort? Any hints you can give me?
I'm trying to build a Gantt web chart (v3) with several series in it, and I've gotten the impression from some forums that missing labels might be a problem in this case. So, I've tried to avoid that by putting all but one series showing on the right axis, and then hide it, leaving only the left axis visible. That way I can still use the hotspot tool to display the other labels when mouse is hovering over the bars, but only see one series displayed on the left axis.
I thought that worked well for a while, but not so anymore, and I've had problems with this coming and going throughout the development project. I just tried the below, for example.
method GanttChart.wcGantt_GetAxisLabel(sender: System.Object; e: Steema.TeeChart.GetAxisLabelEventArgs);
begin
if e.LabelText.Length>=11 then
e.LabelText:=e.LabelText.Substring(0,11)+' ...';
/ else
e.LabelText:=e.LabelText+' ';/
I'm pretty sure you can see what that code's supposed to do. Only, it stopped working (all labels disappeared completely) when I added the part in between the slashes (which are not part of the code of course). Funny thing is that after I removed that part again, the chart still refuses to display the labels correctly. I have setup my explorer such that it erases surfing history automatically, so it's nothing from the cache. It simply seems like this particular use of this particular chart type is unstable.
Anyone seen problems of this sort? Any hints you can give me?