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

Message ListMessage List     Post MessagePost Message

  getDataColor
Posted by Frank on Nov-30-2015 14:23
Hello Peter,

the function getDataColor work not right in LineCharts, when use a pattern matrix by function DashLineColor. Your answer in past in not professional! Please fix this issue.

Greeting
Frank

  Re: getDataColor
Posted by Peter Kwan on Dec-01-2015 03:18
Hi Frank,

The getDataColor can obtain the DashLineColor back. This is the expected behaviour so
that the code can the same type of lines as in the line layer. However, if the DashLineColor
is used to fill a rectangle, the fill region will contain many gaps. If it is used to draw text,
the strokes in the text will be draw with dash lines. If you want a solid fill, you would need
to use another solid color. Currently, ChartDirector currently only keep tracks of one data
color that it uses to draw the chart object, so I am worry your code will need to keep track
of the second solid color.

Regards
Peter Kwan

  Re: getDataColor
Posted by Frank on Dec-01-2015 23:14
I think, you should fix this issue. Many user of your very good tool have same question and wondering, that function name and result are different. Here also helpful, when I can ask dataset the dashline type. All that make it easier for all users - what you think?

Greeting
Frank

  Re: getDataColor
Posted by Peter Kwan on Dec-02-2015 02:46
Attachments:
Hi Frank,

It is a little bit more complicated. I have attached an example which is included as one of
the ChartDirector sample code. You can see a line of which the left side is solid blue in
color, and the right side is a red dash line. In ChartDirector, this special line color is
created as an x-zone color, on which the left side is solid blue, and the right side is a dash
line color.

The key issue is that in the ChartDirector, many things are considered as "colors" and they
can be "nested". For example, a zone color and contain other zone colors, and the
elements in the zone color can be dash line colors or solid color or gradients or patterns.
For the dash line color, the color can itself be a gradient consisting of multiple colors (so
you can have a dash line or gradients). This allows ChartDirector to support complex and
rich coloring scheme, but it also makes it difficult to use a color out of context. For
example, if we use the line color in the attached example for text or to fill a rectangle, it
is not clear which color to use. It is also not clear what is the "line style" of the data set.

So in general, if we need colors for different purposes (such as to draw a line layer, and to
draw text), we may need to specify multiple colors.

Regards
Peter Kwan
xzonecolor.png

  Re: getDataColor
Posted by Frank on Dec-03-2015 03:08
Hi Peter,

your example is perfect for our issue. Have both properties of dataset, the Color and the Pattern/Gradient of line, each time can ask how show the line in regions. First zone is blue/solid line, second zone is red/dashed. When label tracking on, then can ask for each zone, what is color. The line style here (show label) not interest.

Greeting
Frank