How can I display 'ColorLineTool' in Legend?

TeeChart for ActiveX, COM and ASP
Post Reply
CYT
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am
Location: Detroit MI
Contact:

How can I display 'ColorLineTool' in Legend?

Post by CYT » Fri Apr 30, 2004 2:36 pm

Hi,

We are creating a line chart, which shows network performance. Within the Chart, we would like to draw a line using colorlinetool to indicate 'service level agreement'. However, I can't find a good way to add description of colorlinetool into legend.

I understand that we can add text to legend as shown in demo. But I would like to show line type and color of colorlinetool just like items in legend.

Suggestion?

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon May 03, 2004 7:51 am

Hi,

how about adding a fake series (line Series) ?

CYT
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am
Location: Detroit MI
Contact:

Post by CYT » Mon May 03, 2004 3:49 pm

This is how we implemented now. But had run into following problems.

1)Chart editor: in our application users can edit the chart through chart editor. They get confused about additional series.

2)Custom color setting: we allow users to specify custom color for each series. The fake series will interfere the custom color setting. For example, we like to have SLA always shows RED color. If fake series is the first series in the chart, we have to programmatically adjust the custom color setting. The logic get really complicated after considering more than 100 reports, which each one has slightly different requirements. And after customer edit the chart using chart editor. It just feels much better to use color line tool to set SLA.

3)3D view: most of our reports are viewed in 3D. The color line tool looks much better in 3D. It compares SLA to all series clearly with rectangle sharp while fake series shows poorly with a single line at the back.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon May 03, 2004 5:22 pm

Hi,

in that case the only way I can think of it creating your custom Legend using the Canvas techniques. You can see one example of use in the TeeChart Pro Demo Features project under :
Welcome ! -> Previous version -> New features -> Chart -> Legend -> Drawing more text

CYT
Newbie
Newbie
Posts: 5
Joined: Fri Nov 15, 2002 12:00 am
Location: Detroit MI
Contact:

Post by CYT » Tue May 04, 2004 2:02 pm

Hi,

As I stated in the first letter, the example doesn't allow me to draw line type and specify color of the legend.

Ok, I can put it to anywhere outside of legend. What can I do? I am looking for a technique that can be used not only at client side but also server side.

OnAfterDraw looks good at first but it only works at client side.

Thanks

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed May 05, 2004 5:23 pm

Hi,

it works serverside as well if you use a VBUserControl. You can see one example of use which is included in the TeeChart Pro installation.
The example is into the "ActiveX Control" folder in the VB v5 & 6 examples. The control, once compiled and registered is used in the ASP example ("ASP & IIS folder).

Post Reply