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

Message ListMessage List     Post MessagePost Message

  XY CHART, Bar Pattern and color
Posted by Oded on Jul-11-2013 19:26
Hellow Peter,
Cant figure out how to set all bars in data series:  color to "yellow" (long) and pattern to

1=bar color
0=plot erea color or any other color



000000000
111111111
000000000
111111111
000000000
111111111

using vb6

thanks,
Oded

  Re: XY CHART, Bar Pattern and color
Posted by Peter Kwan on Jul-12-2013 02:06
Hi Oded,

In your message, I assume 0 and 1 each represent a pixel, but with different color. For example, "1" may represent the yellow car, while "0" represent the white color.

First, for your pattern, you would first need to find out the repeating element. In your case, it is very simple. The element is:

0
1

If your repeat the above horizontal and vertically like a wallpaper pattern, it will achieve the pattern you want.

Next, create a pattern color using the above pattern:

Dim myColor As Long

'The pattern contains 2 pixels of colors FFFF00 (yellow) and FFFFFF (white)
myColor = c.patternColor(Array(&Hffff00, &Hffffff), 2, 0, 0)

Then use the pattern color just like a normal color to color the bars:

Call c.addBarLayer(myData, myColor)

Hope this can help.

Regards
Peter Kwan