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

Message ListMessage List     Post MessagePost Message

  XY line chart
Posted by Nadia on May-14-2009 22:47
Hi

I have a line chart. I don't to show the line that start in the point (0,0) to the point (x,y)

The point (0,0) is the first point

The point (x,y) is the second point


I want to show the line chart since the second point to the end point

  Re: XY line chart
Posted by Peter Kwan on May-15-2009 03:33
Hi Nadia,

If you do not want to plot the (0, 0) point, please do not include the (0, 0) in your data. You may remove it from your data before passing the data to ChartDirector.

If you must include a first point in your data, but does not want to plot it, please include a NoValue point, not a (0, 0) point. For example, (NoValue, NoValue), or (0, NoValue).

Hope this can help.

Regards
Peter Kwan

  Re: XY line chart
Posted by Nadia on May-16-2009 00:48
Attachments:
Hi,

I attachment the file for explain better.


In the file I show that I don?t want in the chart
XYlineChart.jpg

  Re: XY line chart
Posted by Peter Kwan on May-16-2009 02:04
Hi Nadia,

The (0, 0) point is in the chart because your data contains the (0, 0) point. To remove it from your chart, please remove the (0, 0) point from your data.

If you think there is no (0, 0) point in your data, may be there is a bug in your code that creates the (0, 0) point.

For example, to create a chart with 12 points, some people will use:

ReDim myData(12)
myData(1) = ....
myData(2) = ....
myData(12) = ....

The above has a bug. The myData(0) is not used. (VBScript array starts from 0.) According to VBScript syntax, unused array elements are equivalent to 0 in numeric context. So the myData contains a 0 point as the first point. ChartDirector will accurately plot the myData array and start the first point at 0.

If the above still does not solve the problem, would you mind to inform me of your charting code?

Regards
Peter Kwan

  Re: XY line chart
Posted by Nadia on May-16-2009 03:32
Hi

my code is:

redim data(17)
redim labels(17)

data(1) = a
data(2) = b
.
.
.
data(17)= n


If start in data(0) = a
The line chart start in (0,a)

If start in data(1) = a
The line chart start in (1,a) but begin with the point (0,0)

How do you do to remove the point(0,0)

  Re: XY line chart
Posted by Peter Kwan on May-16-2009 19:55
Hi Nadia,

Your data should be:

redim data(16)
redim labels(16)

data(0) = a
data(1) = b
....
data(16)= n

labels(0) = "xxx"
labels(1) = "yyy"
....
labels(16) = "ppp"

If you want to leave a gap between the first point of the line and the y-axis. The code is:

Call c.xAxis().setMargin(0, 15)

Hope this can help.

Regards
Peter Kwan

  Re: XY line chart
Posted by nadia on May-18-2009 22:06
Hi

Thanks, for helps