ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Chart.DotLine of trackLineLabel
Posted by mill on Jul-30-2015 14:40
Attachments:
Hi peter,

A label will also become a dot if Line is made into a dot.
Is it solvable?

Regards,
clip_1.jpg

  Re: Chart.DotLine of trackLineLabel
Posted by Peter Kwan on Jul-31-2015 01:10
Hi mill,

It is because the line is drawn using a "dashLineColor", and the text box background is
also drawn using the same "dashLineColor". If your code draw the text box background
using the blue color, then the text will be blue instead of dotted.

To use a different color for the text, you code probably need to use an additional array
or some look up table to determine the text box background color. For example, you can
create a lookup table like (in C#):

Dictionary<int, int> fillColor = new Dictionary<int, int>();

Then when you add the line, you can also specify the text color text box background
color to use:

int myLineColor = c.dashLineColor(0x0000ff, Chart.DotLine);
fillColor[myLineColor] = 0x0000ff;   // lookup the fill color from the line color

layer.addDataSet(myData, myLineColor, "xxxx");

In the trackLineLabel, instead of using  color.ToString("x") as the background color, you
can use fillColor[color].ToString("x") as the background color.

Hope this can help.

Regards
Peter Kwan

  Re: Chart.DotLine of trackLineLabel
Posted by mill on Aug-05-2015 01:39
Hi peter,

It helped me very much. Thank you.

Regards,