Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8252425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:33:49+00:00 2026-06-08T00:33:49+00:00

I am using the FLOT charting library to plot calories consumed over time. I

  • 0

I am using the FLOT charting library to plot calories consumed over time. I would like the y-axis to use autoscaling (to just show values that are +/- the min and max in the dataset).

However, the chart always uses 0 as the minimum for my bar chart rather than autoscaling the y-axis values. Here is my code:

function DrawCalorieChart(calorieData) {
    plot = $.plot($("#CalorieHistoryChart"), [calorieData],
    {
        series: {
            bars: { show: true, barWidth: 0.8, align: "center" }
        },
        legend: {
            show: false
        },
        xaxis: { tickDecimals: 0, tickSize: 1, mode: "categories", tickLength: 0 },
        yaxis: { autoscaleMargin: 0.025 },
        grid: { labelMargin: 10 }
    });
}

I can manually set a minimum value but the problem is that I don’t know what the minimum might be after new data is entered. I have tried removing the yaxis spec altogether, setting an autoscaleMargin (as shown) and setting the min to null. But nothing works – the minimum is either a static value or zero! Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:33:50+00:00Added an answer on June 8, 2026 at 12:33 am

    Currently there’s no way to do this within the library’s own API. You’ll need to write some JS to iterate over your values and find a min/max manually. This could be done either outside your plot/redraw calls, or in a processRawData hook, which might work better if you’re constantly adding values and redrawing.

    Addressing this is actually an active project that I expect will be merged into the Github master branch within the next 2-3 weeks. So depending on whether you’re able to wait, and willing to use less-stable code, that’s another option.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Flot and would like to associate text with each individual plot point
I planned on using the jquery charting library flot; before embarking on this adventure
I am using jQuery/FLOT to draw a graph, I would like for the user
I am having problem with flot library to plot a graph using its line
Using the flot library, how can I show the point only when hovering over
I'm using the flot graphing library for jQuery, and it uses javascript time for
Can I plot charts like this http://developer.yahoo.com/yui/examples/charts/charts-rotation.html using flot ? I mean, I have
I am using RichFaces 4. I am using flot as a JQuery Charting library
I am using flot to display a stacked time series in an mvc3 webpage.
I am using flot to create bar charts like I need to specify a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.