Jump to content


Graph time zone not same as device time zone.

  • Please log in to reply
1 reply to this topic

#1 bhargava_sg



  • Members
  • Pip
  • 1 posts

Posted 03 September 2014 - 08:23 PM



I am trying get a graph but it turns out the graph time zone is not in sync with the device and account time zone.




Below is my time zone settings.






Please let me know what I am missing. Also I got to know that currently carriots doesn’t support 2 graphs in one webpage because of the dev id tag, and I read in a post that you had asked us to use Img source instead. Could you please put up an example for that so that it will help out people like me without html background?


Attached Files

#2 sdeancos


    Master of Puppets

  • Members
  • PipPipPip
  • 107 posts
  • LocationMadrid, Spain.

Posted 08 September 2014 - 03:45 PM

Hi bhargava_sg,


You can try use tz field in JS configuration, for example:


<div id="carriots-graph" style="max-width: 900px;margin:auto;"></div>

<script src="https://www.carriots.com/js/graphs.js"></script>
        var carriots = {
             'apikey' : 'YOUR__APIKEY',
             'mime' : 'image/svg+xml',
             'type' : 'bar',
             'axis[x]' : 'at',
             'axis[y]' : 'FIELD2',
              'data[0]' : 'FIELD1',
              'data[1]' : 'FIELD2',
              'query[device]': 'YOUR_DEVICE_HERE',
              'query[at_from]': '1404165600',
              'query[at_to]': '1412028000',
              'query[sort]': '_id',
              'query[order]': 'desc',
              'query[max]': '10',
              'tz': 'Asia/Kolkata'



You can display several graphs at the same time.

    <script type="text/javascript">
        var carriots = [
                "apikey": "YOUR READ-ONLY APIKEY HERE",
                "mime": "image/svg+xml",
                "type": "horizontalbar",
                "axis[x]": "at",
                "axis[y]": "temperature",
                "data[0]": "temperature",
                "query[device]": "deviceName@userName",
                "query[sort]": "asc",
                "query[order]": "at",
                "query[max]": "10",
                "id": "carriots-temperature"      // default 'carriots-graph'
                "apikey": "YOUR READ-ONLY APIKEY HERE",
                "mime": "image/svg+xml",
                "type": "pie",
                "axis[x]": "at",
                "axis[y]": "distance",
                "data[0]": "distance",
                "query[device]": "deviceName@userName",
                "query[sort]": "asc",
                "query[order]": "at",
                "query[max]": "20",
                "id": "carriots-distance"      // default 'carriots-graph'

Remember to add the appropriate html tags:

<div id="carriots-temperature" style="max-width: 900px;margin:auto;"></div>
<div id="carriots-distance" style="max-width: 900px;margin:auto;"></div>




I hope this help you :D




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users