Announcement

Collapse
No announcement yet.

Jon00 Database Charting Utility for Homeseer 3 & Homeseer 4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bob,

    You have effectively told the chart to show 8 data sources as you have set UseData5 - UseData8 to 1.

    A data source can only be assigned to either the primary or secondary Y axis.

    If you want both Y axis shown, you could do something like this:

    UseData1=1
    UseData2=2
    UseData3=1
    UseData4=2
    UseData5=0
    UseData6=0
    UseData7=0
    UseData8=0
    UseData9=0
    UseData10=0

    This would set data source 1 and 3 to the primary Y axis and data source 2 and 4 to the secondary. I have assumed the 4 data sources are 1 to 4 with this example.

    Then set the maximum values for each Y axis i.e.

    AxisYMaximum=100
    AxisYMaximumSec=100

    This would lock the upper temperature value to 100 on both Y Axis.

    (look a the docs to see where these settings are).

    Regarding your last point, it may need the 't' (to show AM or PM) as you have selected 12 hour format. Try 'H' as a test.
    Jon

    Comment


      Jon00,
      Let me clarify why I duplicated the data sources on the Y axes:

      The most important is the secondary Y axis since it shows the temp NOW. But often I like to look back 24 hours to see what the temp was at this same time of day---but without the primary Y axis also displaying the SAME scale as the secondary it's tedious to have your eyes track a temp 24 hours ago across the wide chart to see the scale on the right side. So that's why I duplicated the data source on Y and Ysec.

      I also hoped the auto scaling would keep the min and max the same on both axes but as you can see the primary Y does not set them right. Why?
      Fixing the scales at 30 to 100(our min and max thruout the year would make typical excursions of 10-20 degrees look pretty small.

      So is there a better way to accomplish?

      Thanks,
      BobSpen

      Comment


        The scaling for Y and Ysec is calculated on the recorded data being plotted. If you assign different data to the Y and YSec, the scaling will be different.

        For example if the max temperature recorded under Y is 79.5 and 82.5 under YSec then the max scaling may be 80 for Y and 85 for Y2

        The only way to change this is to set the maximum value.
        Jon

        Comment


          Jon00,
          I understand what you are saying, but my 4 sources of data( in this example set at 71, 73, 75, 77) are the same 4 devices and they are exactly duplicated on the two axes; so they should cause the same auto scaling on both and yet the primary Y scale goes up to 90(btw, the minimum seem OK using "auto").
          I realize this is not what one would normally do but I need both axes and need them to align so I get only 4 data lines plotted and identical scales right and left.

          It does work properly if I set the maximums on the two axes but I really need to use "auto".

          Thanks,
          BobSpen

          Comment


            My only other suggestions are:

            1) Leave the AxisYMaximum and AxisYMaximumSec blank.

            2) Record the same data twice in the database and set one to Y and the other to YSec. You should get the data plotted twice on top of each other. You could set the plot color of one to transparent to hide one of these plots. That way both Y and YSec are using the same data to calculate the scale.

            If that all fails, I have no other ideas apart from showing the actual data values on the chart and forget the Y axis altogether.
            Jon

            Comment


              Originally posted by jon00 View Post
              Bob,

              Regarding your last point, it may need the 't' (to show AM or PM) as you have selected 12 hour format. Try 'H' as a test.
              Jon00,
              I think this is a bug: In .....Create.ini, setting "AxisXFormat=" to hh or HH generate chart. Setting to h or H does NOT generate a chart. Could this have something to do with how the time data field in the DB is stored???

              Comment


                Originally posted by jon00 View Post
                2) Record the same data twice in the database and set one to Y and the other to YSec. You should get the data plotted twice on top of each other. You could set the plot color of one to transparent to hide one of these plots. That way both Y and YSec are using the same data to calculate the scale.
                Jon00,
                That is exactly what I am doing---except I just made the colors the same for the duplicates. If I leave AxisYMaximum for both axes "blank" the secondary stays the same(as shown in previous post) at 80, which is correct and the primary Y axis tops out at maximum data value, in this plot 77. When AxisYMaximum for both axes is set to auto the primary Y tops at 90 just like the plot shown in previous post. Even when I remove the secondary Y the primary Y acts as above. It sure appears something isn't correct in the auto scaling for the primary Y axis.

                Also I see "AxisYMaximum=" entries in the .....Style.ini on all the chart styles you included in the download. Should it be there--I think the controlling AxisYMaximum is in the ....create.ini????

                Thanks,
                BobSpen

                Comment


                  Originally posted by BobSpen View Post
                  Jon00,
                  I think this is a bug: In .....Create.ini, setting "AxisXFormat=" to hh or HH generate chart. Setting to h or H does NOT generate a chart. Could this have something to do with how the time data field in the DB is stored???
                  Try using "%h" or "%H"

                  Does that work?
                  Jon

                  Comment


                    Originally posted by BobSpen View Post
                    Jon00,
                    That is exactly what I am doing---except I just made the colors the same for the duplicates. If I leave AxisYMaximum for both axes "blank" the secondary stays the same(as shown in previous post) at 80, which is correct and the primary Y axis tops out at maximum data value, in this plot 77. When AxisYMaximum for both axes is set to auto the primary Y tops at 90 just like the plot shown in previous post. Even when I remove the secondary Y the primary Y acts as above. It sure appears something isn't correct in the auto scaling for the primary Y axis.

                    Also I see "AxisYMaximum=" entries in the .....Style.ini on all the chart styles you included in the download. Should it be there--I think the controlling AxisYMaximum is in the ....create.ini????

                    Thanks,
                    BobSpen
                    I don't have an answer Bob. The scale calculations are done via the chart control from the data it is given to plot.
                    Jon

                    Comment


                      Originally posted by jon00 View Post
                      Try using "%h" or "%H"

                      Does that work?
                      Jon00,
                      Yes, using the "%" works for the single digit!

                      Comment


                        So I've reached the limit?
                        Attached Files
                        RJ_Make On YouTube

                        Comment


                          You can only have so many datapoints.

                          From Jon00:
                          The maximum datapoint count was added to prevent people selecting wide date/time periods and crashing the plugin. It was set to 2000 but can be changed.

                          Look for MaxDataPoints=2000 under [Settings] in your Jon00DBCharting.ini file. You may need to restart the plugin if you change this.

                          I was able to get a max 8000 to work.
                          Mike

                          Comment


                            Originally posted by jon00 View Post
                            I don't have an answer Bob. The scale calculations are done via the chart control from the data it is given to plot.
                            Jon00,
                            I can not find any way to make the primary axis set a proper "max" scale when using the secondary Y axis(with duplicate data sources on each). I am willing to inspect the 4 data points for max values(and maybe min values if I also have trouble there(not yet!) and through a script set those max/min value in the appropriate ".ini" file.

                            Would you perhaps have already created a vb.net script to modify .ini file entries? It could sure save me some time if you would share.

                            Thanks,
                            BobSpen

                            Comment


                              Bob,

                              It is a HS scripting command.

                              Example below:

                              PHP Code:
                                  Sub Main(ByVal Parm As Object)

                                      
                              Dim AxisYMax As String ""
                                      
                              AxisYMax "90"
                                      
                              hs.SaveIniSetting("Create1""AxisYMaximim"AxisYMax"Jon00DBChartingStyle.ini")

                                  
                              End Sub 
                              Jon

                              Comment


                                Jon00,
                                Wow, that's simple. I'll give it a try.
                                Thanks again,
                                BobSpen

                                Comment

                                Working...
                                X