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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:35:09+00:00 2026-06-11T00:35:09+00:00

In jqPlot , I have two series rendered in the graph. They show different

  • 0

In jqPlot, I have two series rendered in the graph. They show different data, measured in different units, so they each have their own y-axis (yaxis and y2axis).

jqPlot constructs both y-axes automatically to suit the range of the data. That is ok – I don’t want to set the axis min, max, ticks manually, as the range of the data may vary greatly.

However, I would like to align the 0 ticks for both y-axes to the same level. Is this possible?

Note: One may argue that there is no point to align, for example, 0° C temperature with 0 ms^-1 wind speed, as there is no mathematical relation between the values. But it does look a lot better if it is so, and looking good is the whole point of graphs 🙂

Testing example:

var data1 = [[0, 0], [3, 50]];
var data2 = [[0, 0], [3, -50]];

$.jqplot('chart', [data1, data2], {
  series: [
    { yaxis: 'yaxis' },
    { yaxis: 'y2axis' },
  ]        
});
  • 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-11T00:35:10+00:00Added an answer on June 11, 2026 at 12:35 am

    I think this is definitely a bug in jqplot.

    See this three fiddles [1], [2] and [3]. The first one is extracted from the examples in the last release of jqplot. The second one, shows the default mode, with forceTickAt0 and alignTicks disabled. Finally, the third one is the same original one, but changing the second data value in the first series with a negative value.

    You can see how the zeroes are aligned in the first example. In the third example, however, the axis don’t align anymore although all settings remain the same.

    You can try filing an issue for this in the jqplot issues page.

    In the meantime, to solve your problem, you could work around this issue by adding an offset to the values so that all become positive and then rewrite the axis labels to show this offset difference. You can see an example here. However, I’m afraid this is still not exactly what you were trying to accomplish.

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

Sidebar

Related Questions

I have a jQPlot line graph with three different series on it and am
I have a jqplot chart with two data lines. Only one should have the
I have two vertical bar charts (created using jqPlot) in my HTML page. They
I have the following code to bring up a jqplot graph in the head:
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
Does anyone have any idea why my chart is not being rendered with Jqplot?
I have this jqplot bar graph. The current display of the bars are shown
I have been working on a jqplot horizontal bar graph. I WANTED TO HAVE
I have a fairly straightforward graph with a date axis. All the date data

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.