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

Message ListMessage List     Post MessagePost Message

  3D Grid display
Posted by Freny on Sep-27-2011 01:45
Hi Peter,

I am trying to show grid in my chart which is solid line and have some depth in it. So that it displays more like a 3D grid lines. I tried several things but was not able to get it done the way I want. Please let me know if this is supported by the chartDirector package version 5.0.

Thanks,
Freny

  Re: 3D Grid display
Posted by Peter Kwan on Sep-28-2011 01:27
Hi Freny,

The "3D grid line" in your case is composed using two lines - one of darker color, and one of lighter color.

One method to achieve this effect is to draw two marks lines at each grid position. I assume in your case the y-axis is auto-scaled (which means your code does not know the grid positions), you may use the following approach. (As I am not sure of your programming framework, I will use VB/VBScript in the following example.)

.... create chart as usual .....

Call c.layoutAxes()   'auto-scale axis
ticks = c.yAxis().getTicks()   'now can get the tick position

For i = 0 To Ubound(ticks)
    'A lighter color mark line
    Set mark = c.yAxis().addMark(ticks(i), &Hf8f8f8)
    Call mark.setDrawOnTop(false)
    Call mark.setLineWidth(2)
    'A darker color mark line
    Set mark = c.yAxis().addMark(ticks(i), &Haaaaaa)
    Call mark.setDrawOnTop(false)
Next

Hope this can help.

Regards
Peter Kwan