none
Graph Data Positioning RRS feed

  • Question

  • LitDev,

    I did have the following occur on 1 of a series of graphs.  Thought I would show it to you.  Don't know if you would want to make a change for this or not.  As you can see the values show going across the bottom of the graph.  If I change 1 of the GraphData values in the code to 69 or 67 the graph centers perfectly.  I do really like the graphing and trendline capability.

    Here's the code:

      GraphData[1]=68
      GraphData[2]=68
      GraphData[3]=68
     
      MyGraph=LDGraph.AddGraph(100,25,400,400,"Test","Entry","Test")
      LDGraph.AddSeriesPoints(MyGraph,"Test",GraphData,"Blue")
      Trend=LDGraph.CreateTrend(GraphData,1)
      LDGraph.AddSeriesLine(MyGraph,"Trendline",Trend,"Green")

    Here's the graph result:


    JR


    • Edited by jricestkEditor Tuesday, June 25, 2013 10:39 PM Finish comment.
    Tuesday, June 25, 2013 10:34 PM
    Answerer

Answers

  • Interesting set of circumstances cause this, if you print the trend y values you see some values of 68.0000000000001, which then confuses the scaling by a combination of the logic (not = 68) and rounding errors (later it is rounded to be = 68).

    Will fix for next upload, probably not for a few days as I have code for Bluetooth mid way and waiting to get a bluetooth device I can test it a bit with.


    PS Thanks for reporting it
    Wednesday, June 26, 2013 3:30 PM
    Moderator

All replies

  • Interesting set of circumstances cause this, if you print the trend y values you see some values of 68.0000000000001, which then confuses the scaling by a combination of the logic (not = 68) and rounding errors (later it is rounded to be = 68).

    Will fix for next upload, probably not for a few days as I have code for Bluetooth mid way and waiting to get a bluetooth device I can test it a bit with.


    PS Thanks for reporting it
    Wednesday, June 26, 2013 3:30 PM
    Moderator
  • LitDev,

    Thank you for the fix.  Could you let me know when you update and I'll try it out.


    JR

    Friday, June 28, 2013 2:00 AM
    Answerer