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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:11:30+00:00 2026-06-17T19:11:30+00:00

I am using jqPlot for bar graph and I want to show x-axis as

  • 0

I am using jqPlot for bar graph and I want to show x-axis as legend.

Screenshot attached…

enter image description here

Code:

var s1 = [2.5, 6.3, 7.4, 10]; 
var ticks = ['a', 'b', 'c', 'd']; 
plot2 = $.jqplot('chart2', [s1], { 
seriesDefaults: { 
     renderer:$.jqplot.BarRenderer, rendererOptions:{ varyBarColor : true }, 
     pointLabels: { show: true }, showLabel: true,   }, 
     series: [ {label: 'Cups'}, {label: 'Dishes'}, ], 
     legend: { show: true, placement: 'outside', //rendererOptions: {numberColumns: 2}   }, 
     axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks }, 
             yaxis:{  tickOptions:{ formatString:'%.2f%' } } }
  • 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-17T19:11:32+00:00Added an answer on June 17, 2026 at 7:11 pm

    Here’s an example of how to do this:

    var s1 = [2.5, 6.3, 7.4, 10]; 
    var ticks = ['a', 'b', 'c', 'd']; 
    plot2 = $.jqplot('chart1', [s1,[],[],[]], { //give it extra blank series
    seriesDefaults: { 
           renderer: $.jqplot.BarRenderer, 
           rendererOptions: { varyBarColor : true }, 
           pointLabels: { show: true }, 
           showLabel: true
         }, 
         series: [ {}, 
                   {renderer: $.jqplot.LineRenderer}, // set our empty series to the lineRenderer, so the bar plot isn't padded for room
                   {renderer: $.jqplot.LineRenderer},
                   {renderer: $.jqplot.LineRenderer} ], 
         legend: { show: true, placement: 'outside', labels: ticks},  // give the legend the tick labels
         axes:   { xaxis: { renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks }}, 
         yaxis:  {  tickOptions:{ formatString:'%.2f%' } }
    });
    

    Produces:

    enter image description here

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

Sidebar

Related Questions

I'm using jqplot for displaying bar chart and pie chart. I want to display
I am using jqplot for a bar graph that has 1 very high number
I am trying to draw a simple bar graph using jqplot in Android phonegap
How can I re-set ticks's formatString after a zoom operation? I'm using $.jqplot.DateAxisRenderer plugin
i'm using jqplot 1.0.0b1_r746. i want to display some time periods using the date
I'm (trying to) using JSON with PHP. I want to plot a graph using
I am trying to display bar chart using jqPlot bar chart. I have doing
I am using jqPlot to show candlestick chart and the data is from XML
I have plotted a line graph using jqplot. What i would like is vertical
I hope this doesn't seem too opaque: I'm using jqPlot to make a bar

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.