3 Replies Latest reply on Jul 9, 2009 12:14 PM by TomDCI

    Scaling of the x-axis on LineCharts


      Hello everyone,


      I'm working on using a LineChart to display incoming temperature readings from an embedded device and so far it's working very nicely, but I'm hoping someone can help me with one small problem I'm having.


      I build an ArrayCollection of the temperature readings, including a timestamp of when the reading was received using a Date object, which is then used as the dataProvider for my LineChart.  The vertical axis is plotted correctly, but readings are plotted evenly-spaced on the horizontal axis even though readings are not made at regular time intervals.


      For example, if I received a reading at 1 minute, 2 minutes, and 35 minutes, the three temperatures would be evenly spaced on the horizontal axis.  I want the horizontal axis to accurately represent the time frame of the readings received, so that with the previous readings there would be two points very close to the left hand of the horizontal axis and a single point plotted much further away.


      I seem to be having trouble explaning this clearly so here is a quick sketch I made of the situation:




      Thank you so much in advance for your help!



      Tom Morrisey

      Diversified Control, Inc.