Author Topic: Chart by Sampling X axis properties  (Read 1277 times)

Mvlawn

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Chart by Sampling X axis properties
« on: May 29, 2016, 02:28:04 PM »
Where do I change the X axis properties? I am collecting 1 value between 10 and 16 on the Y axis and storing it up to 5760 times. the 5760 is equal to 48 hours in seconds. I would like the Y axis to be displayed as time of day if that is possible.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Chart by Sampling X axis properties
« Reply #1 on: May 29, 2016, 04:18:28 PM »
Try going into the Series properties, then change XValueType to Time, Date, or DateTime


Mvlawn

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Chart by Sampling X axis properties
« Reply #2 on: May 30, 2016, 05:47:56 AM »
That works Archie but when i view the chart under the design window it displays the correct date/time but when I debug/run it starts with Dec 30, 1899.


Mvlawn

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Chart by Sampling X axis properties
« Reply #3 on: May 31, 2016, 11:21:33 PM »
I have attached a screen shot of my X axis date and time. I cant seem to find where to adjust it. Currently it starts on the same day that John Thurman patent the motor-driven vacuum cleaner. Not sure what I am missing.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Chart by Sampling X axis properties
« Reply #4 on: June 01, 2016, 12:21:27 AM »
In Solution Explorer, under the AdvancedHMIControls project, right click ChartBySample.vb and select View Code

Go to line 233 and look for this code:

        '* V3.99e - added time option
        If MyBase.Series(index).XValueType = DataVisualization.Charting.ChartValueType.Time Then


Change the .Time to the type that you selected for the XValueType