Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Get Axis interval

Get Axis interval

Scheduled Pinned Locked Moved JavaScript
algorithmstutorial
5 Posts 3 Posters 0 Views 1 Watching
  • 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.
  • N Offline
    N Offline
    NJdotnetdev
    wrote on last edited by
    #1

    Hi All, I am trying to come up with an algorithm to get following three piece of information to plot a chart: 1. Start : Should be close to the minimum value of the dataset 2. Stop : Should be close to the maximum value of the dataset 3. Interval : Should be such that it will have "0" on the axis when interval traverses from minimum to maximum. Example: dataset{-266,-17.6,0.5,2000,6000} My final return values should be: Start: 400 Stop: 6000 Interval:200 Note: Since start is 400 and interval is 200, we will have 0 as a point on the x-axis.

    L 1 Reply Last reply
    0
    • N NJdotnetdev

      Hi All, I am trying to come up with an algorithm to get following three piece of information to plot a chart: 1. Start : Should be close to the minimum value of the dataset 2. Stop : Should be close to the maximum value of the dataset 3. Interval : Should be such that it will have "0" on the axis when interval traverses from minimum to maximum. Example: dataset{-266,-17.6,0.5,2000,6000} My final return values should be: Start: 400 Stop: 6000 Interval:200 Note: Since start is 400 and interval is 200, we will have 0 as a point on the x-axis.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Does this have anything to do with Javascript?

      N 1 Reply Last reply
      0
      • L Lost User

        Does this have anything to do with Javascript?

        N Offline
        N Offline
        NJdotnetdev
        wrote on last edited by
        #3

        I am going to implement this is javascript. We have data in csv format which will be read by the JS function and the start, stop and interval will be sent to third party library to create chart. The algorithm I am looking for can be pseudo code. It's not specific to JS, but would be a big help to know if some one would have implemented this using JS.

        F 1 Reply Last reply
        0
        • N NJdotnetdev

          I am going to implement this is javascript. We have data in csv format which will be read by the JS function and the start, stop and interval will be sent to third party library to create chart. The algorithm I am looking for can be pseudo code. It's not specific to JS, but would be a big help to know if some one would have implemented this using JS.

          F Offline
          F Offline
          F ES Sitecore
          wrote on last edited by
          #4

          Post it in the Algorithms section and explain the problem better too. I have no idea why your data results in the values you are expecting.

          N 1 Reply Last reply
          0
          • F F ES Sitecore

            Post it in the Algorithms section and explain the problem better too. I have no idea why your data results in the values you are expecting.

            N Offline
            N Offline
            NJdotnetdev
            wrote on last edited by
            #5

            Sure... Will do that...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups