0 Replies Latest reply on Jul 15, 2007 9:30 AM by stoeker

    LinearAxis as horizontal axis in LineChart

    stoeker
      Hi guys,

      The ff: is an excerpt of the xml i am working with:
      <?xml version="1.0" encoding="UTF-8"?>
      <efiles>
      <dataset name="BoyBMI">
      <age month="24">
      <P5>14.737319472</P5>
      <P10>15.090328265</P10>
      <P25>15.74164233</P25>
      <P50>16.575027675</P50>
      <P75>17.55718781</P75>
      <P85>18.162194733</P85>
      <P90>18.609481276</P90>
      <P95>19.338010618</P95>
      </age>
      <age month="24.5">
      <P5>14.719292573</P5>
      <P10>15.071174743</P10>
      <P25>15.71962876</P25>
      <P50>16.547774867</P50>
      <P75>17.521292788</P75>
      <P85>18.119549228</P85>
      <P90>18.561106338</P90>
      <P95>19.278898128</P95>
      </age>
      <age month="25.5">
      <P5>14.683608414</P5>
      <P10>15.033357254</P10>
      <P25>15.676344635</P25>
      <P50>16.494427632</P50>
      <P75>17.451350388</P75>
      <P85>18.036680126</P85>
      <P90>18.467295933</P90>
      <P95>19.164659645</P95>
      </age>
      </dataset>
      </efiles>

      The actual age(months) values is up to 240.5 months. So this xml is kind of too long to post. ;)
      Anyways, the goal is to present this data into a line chart with the elements:

      -age(in years) in horizontal axis;
      -the values of P5,P10,P25,P50,P75,P85,P90,P95 in vertical axis.

      The values are plotted so well in the chart and so is the vertical axis. The problem is in displaying labels in the horizontal axis. Primarily, I made use of CategoryAxis but the labels are not displaying at all. And then i utilized LinearAxis and created a labelFunction renderYears(). However, I noticed that it takes a different value for the month. Why is it that the age values taken by LinearAxis is the index instead of the month value in the xml? Say, the age month value in the xml is 24, the value it evaluates is 0, then if the month value is 24.5 it takes 1, so on and so forth. How can LinearAxis takes month as the value to be evaluated in the labelFunction? Please help....

      Thanks a lot.