• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Set chart minimum and maximum axes values ignored

    Mango feedback
    3
    7
    5.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MattFoxM
      MattFox
      last edited by MattFox

      Hi all ,
      Having problems with fixing the maximum and minimum range for my graph. I do not want to show below zero as a value as the y-axis is supposed to represent a percentage.

      <md-card flex>
              <md-card-content ng-controller="flAPI">	
      		<ma-point-query query="'or(and(like(deviceName,*Grain Silo*),eq(name,Grain Level)),and(like(deviceName,*Molasses Silo*),like(name,Molasses Level)))&sort(deviceName,name)'" points="devices"></ma-point-query>
      			<ma-point-values points="devices" values="combined" from="from" to="to"></ma-point-values>
      		
      <ma-serial-chart id="flChart" style="height: 500px; width: 100%" points="devices" values="combined" options="{valueAxes:[{ minimum:0, maximum:100,title:'Feed Level (%)'}]}" legend="true" balloon="true"></ma-serial-chart>
      
      
      <ma-date-range-picker from="from" to="to" preset="LAST_1_WEEKS" update-interval="15 minutes" on-change="$ctrl.timeUpdated(from, to, preset)"></ma-date-range-picker>
      <md-input-container flex> 
              <label>From date</label>
              <ma-date-picker ng-model="from"></ma-date-picker>
          </md-input-container>
          <md-input-container flex>
              <label>To date</label>
              <ma-date-picker ng-model="to"></ma-date-picker>
          </md-input-container>
            </md-card-content>
      </md-card>
      

      As far as I know, this is correct and follows a lot of what your examples do. Yet the graph still comes up showing -10 and + 90. Some assistance would be greatly appreciated...
      0_1500602775236_Capture.PNG
      I realise that some values go below zero but I'd rather not show this as they make no sense in this instance.
      Thanks
      Matt

      Do not follow where the path may lead; go instead where there is no path.
      And leave a trail - Muriel Strode

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        Hey Matt,

        Took me a while to figure this out but we have synchronizeGrid turned on in the AmCharts options. Its documented here https://www.amcharts.com/demos/multiple-value-axes/

        Try changing your options to
        options="{synchronizeGrid: false, valueAxes:[{ minimum:0, maximum:100,title:'Feed Level (%)'}]}"

        Note that there are various other ValueAxis options that may affect the minimum and maximum. So take a look at https://docs.amcharts.com/3/javascriptcharts/ValueAxis if you have any issues.

        Jared

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 1
        • MattFoxM
          MattFox
          last edited by

          Gent!

          That did it beautifully, A bit relieved I'm not the only one it stumped momentarily. Feel a bit of a muppet though not seeing that bit in their docs...
          Thanks Jared!

          Do not follow where the path may lead; go instead where there is no path.
          And leave a trail - Muriel Strode

          Jared WiltshireJ 1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ
            Jared Wiltshire @MattFox
            last edited by

            @MattFox No worries! Its mentioned on one of their demo pages but not in the API docs which is what made it difficult to figure out.

            Developer at Radix IoT

            1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by phildunlap

              I sent AMCharts an email letting them know that property might not be documented fully.

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by

                Their reply,

                Hi Phillip,

                Thanks for pointing this out. This property was originally documented on our site and listed as a beta/experimental feature (and it still is), but we removed references to it in the documentation because it was not quite ready for primetime as it worked in very basic use cases (note that it will ignore any user set minimum and maximum values). As we're currently focusing on our next major version, we don't have an ETA as to when we'll iron out any remaining issues with synchronizeGrid. You're more than welcome to keep using it if it works for you, but use at your own risk.

                As for enforcing the minimums and maximums, setting the value axis' strictMinMax (http://docs.amcharts.com/3/javascriptcharts/ValueAxis#strictMinMax) property to true should do the trick.

                Please let me know if you have any questions.

                Best,
                [Name of AMChart support person]

                MattFoxM 1 Reply Last reply Reply Quote 1
                • MattFoxM
                  MattFox @phildunlap
                  last edited by

                  @phildunlap Many thanks, at least we all know now and if anyone hits this snag they'll find it here.

                  Matt

                  Do not follow where the path may lead; go instead where there is no path.
                  And leave a trail - Muriel Strode

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post