0

I have a set of data that I show in my chart generated in pChart, like this:

sample graph in pchart

The problem is that I want to print only some labels in the x-axis and show the last label in the last point, keeping the same appearance of the curve.

How can I do that?

There is a function that does this in pChart 1:

void setFixedScale($VMin,$VMax,$Divisions=5,$VXMin=0,$VXMin=0,$XDivisions=5) 

Is there a similar function like it in pChart2 or anyway to achieve a similar display?

random
  • 9,774
  • 10
  • 66
  • 83
Bizboss
  • 7,792
  • 27
  • 109
  • 174

1 Answers1

1

Set the points you do not want to show up on the axis as NULL.

From your above x-axis labels, you would do something like this if you wanted to show only the first and last labels, but still keep the graph plotted for the other unmarked points:

$MyData->addPoints(array("01-Nov", NULL, NULL, NULL, NULL, "25-Jan"),"Labels"); 
random
  • 9,774
  • 10
  • 66
  • 83