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 8300545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:35:56+00:00 2026-06-08T16:35:56+00:00

I have a jqPlot line plot which is drawing beautifully, but I cannot get

  • 0

I have a jqPlot line plot which is drawing beautifully, but I cannot get it to draw quite to the edge of the div it’s contained in (which is critical to my application). I’ve tried every option for it that I can that has anything to do with removing margins, padding, etc., and there’s still a fairly significant gap at the end. Also, I have confirmed for sure that the div itself reaches all the way to the right edge of the page. Below is my options code for the plot:

optionsObj = {
  stackSeries: true,
  axesDefaults: {
    show: false,
    showTicks: false,
    showTickMarks: false
  },
  axes: {
    grid: {
      drawBorder: false
    },
    xaxis: {
      pad: 0,
      tickOptions: {
        showGridline: false
      }
    },
    yaxis: {
      pad: 0,
      tickOptions: {
        showGridline: false
      }
    }
  },
  grid: {
    background: '#ffffff',
    borderColor: '#888888',
    borderWidth: 0.5,
    shadow: false
  },
  seriesDefaults: {
    lineWidth: 0.5,
    color: '#1A95ED',
    fill: true,
    markerOptions: {
      show: false
    }
  },
  series: seriesGroup,
  gridPadding: { top: 0, right: 0, bottom: 0, left: 0 }
};

A picture can be found here: https://www.dropbox.com/s/js32405l6z16f2m/Capture.PNG

The slider is used to select a subset of this graph, which is graphed in a larger plot above. The problem is, because the graph is slightly scaled to the left and doesn’t fill the same length as the slider, the selection is off. The left handle, for example, thinks it’s just to the left of the second peak, and the right handle thinks it’s just to the left of the fourth peak.

For those unfamiliar with jqPlot, there is a div declared:

<div id="overview" style="width:100%;height:200px"></div>

Which is drawn to by the function call:

$.jqplot('overview', eval('([' + sessionStorage.throughputData + '])'), optionsObj);

There is no CSS being applied to the chart other than the “style” attribute in the HTML declaration.

  • 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-08T16:35:58+00:00Added an answer on June 8, 2026 at 4:35 pm

    I noticed that the amount that the line was off would change depending on how many data points were in the chart. I did some experimenting, and eventually discovered that jqPlot, when deciding how many pixels each unit should get, tried to gravitate towards “nice” numbers of units for the total width of the graph. For example, when I had 1440 data points, the range of the graph itself would be 1600, and my data wouldn’t go all the way to the end. When I had 2880 data points, the range of the graph would be 3000, and once again my data wouldn’t fill it, but the amount by which it was off would change. I ended up manually setting the “min” and “max” values of the graph in units to match my data, and it was fixed.

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

Sidebar

Related Questions

I have a simple JSF line chart that uses PrimeFaces (via jqPlot) library: <p:lineChart
I have a jQPlot line graph with three different series on it and am
I can't seem to get my jqplot bar graph to stack. I have the
I have a jqPlot chart which is rendered as in the image below. Iam
Im using jqplot to draw some charts. It is a great tool, but it
I have a page where I currently display a large plot (made with jqplot),
I am using jqPlot to draw some simple line charts and it works great
I have a jqPlot Line graph and I am trying to work out how
I have a series of line graphs in a jqPlot chart. What I want
I have a jqPlot pie chart that I am loading by reading an XML

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.