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

  • Home
  • SEARCH
  • 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 8777377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:15:54+00:00 2026-06-13T19:15:54+00:00

I’ve created a basic Flot chart, but the labels are so large they cover

  • 0

I’ve created a basic Flot chart, but the labels are so large they cover the entire chart. Can anyone guide me? I’ve looked on the flot documentation but I can’t see an option that I’ve set that would have caused this.

To be clear, what I mean is that I get a small coloured square corresponding to the plot colour, then a lot of white space, then the label of the series, then loads more white space.

Here’s how I’m creating the charts:

        var d1 = [[0,5],[24, 5]];    
    var d2 = [[0,4],[64, 4]];
    var d3 = [[0,3],[2, 3]];
    var d4 = [[0,2],[49, 2]];       
    var d5 = [[0,1],[20, 1]];

var data1 = [
    {    
        label: "Product 1",
        data: d1,
        bars: {
            show: true,
            barWidth: 0.3,
            order: 5,
            fill: true,
            fillColor:  "#AA4643",
            horizontal : true

        }
    },
    {
        label: "Product 2",
        data: d2,
        bars: {
            show: true,
            barWidth: 0.3,
            order: 4,
            fill: true,
            fillColor:  "#89A54E",
            horizontal : true
        }
    },

    {
        label: "Product 3",
        data: d3,
        bars: {
            show: true,
            barWidth: 0.3,
            order: 3,
            fill: true,
            fillColor:  "#4572A7",
            horizontal : true
        }
    },
    {
        label: "Product 4",
        data: d4,
        bars: {
            show: true,
            barWidth: 0.3,
            order: 2,
            fill: true,
            fillColor:  "#80699B",
            horizontal : true
        }
    },
    {
        label: "Product 5",
        data: d5,
        bars: {
            show: true,
            barWidth: 0.3,
            order: 1,
            fill: true,
            fillColor:  "#11111B",
            horizontal : true
        }
    }
];


    jQuery.plot(jQuery("#myplaceholder"+1), data1, {colors: ["#AA4643", "#89A54E", "#4572A7", "#80699B", "#11111B"], yaxis: {show:false},
    xaxis: {     font: { size: 11, style: "italic", weight: "bold", family: "sans-serif", variant: "small-caps" }        },
    });

Thanks in advance! 🙂

  • 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-13T19:15:55+00:00Added an answer on June 13, 2026 at 7:15 pm

    By labels, I assume you mean the labels in the legend (i.e. Product 1).

    The most likely cause is that you have CSS in your page that specifies some styles for something unrelated, and they are bleeding into the legend. Flot uses an html table with a structure like this to create the legend:

    <div class="legend">
    <div>
    <table>
      <tr> 
        <!--This is the color box for each series, the divs are styled and colored to make it look pretty -->
        <td class="legendColorBox"><div><div></div></div></td>
      </tr>
      <tr>
        <td class="legendLabel">Product 1</td>
      </tr>
      <!-- repeated for each series -->
    </table>
    </div>
    </div>
    

    So if you have a CSS style somewhere either for all td elements or if you happened to have an existing CSS class for .legendLabel or .legend, that would certainly explain your issue.

    If you look at this example, you’ll see that your code without any CSS does not have any issues: http://jsfiddle.net/ryleyb/AkqyC/

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

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want to construct a data frame in an Rcpp function, but when I
I am using Paperclip to handle profile photo uploads in my app. They upload

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.