Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging the width of the y-axis label area in jqplot
    primarykey
    data
    text
    <p>Ok, I've got a bar chart. And it basically works... but the labels on the y-axis are kinda long and wrap and then run into each other.</p> <p>I've tried changing the css, but it gets overidden by JS. I tried scanning thru the jqplot library to find out where it happens but i got lost. Any ideas? is there just an option i can set?</p> <p>You can see here:</p> <p><img src="https://i.stack.imgur.com/tJdDa.png" alt="enter image description here"></p> <p>Here is my html file:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;!--[if lt IE 9]&gt;&lt;script language="javascript" type="text/javascript" src="excanvas.js"&gt;&lt;/script&gt;&lt;![endif]--&gt; &lt;script language="javascript" type="text/javascript" src="jquery.min.js"&gt;&lt;/script&gt; &lt;script language="javascript" type="text/javascript" src="jquery.jqplot.min.js"&gt;&lt;/script&gt; &lt;script language="javascript" type="text/javascript" src="jqplot.barRenderer.min.js"&gt;&lt;/script&gt; &lt;script language="javascript" type="text/javascript" src="jqplot.categoryAxisRenderer.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="jquery.jqplot.css" /&gt; &lt;script&gt; $(function() { graph_me('chart1',[ 'This is a label', 'This is another label..', 'Is this too long? This looks like it might break','Im not sure, but '], [40, 20, 5, 1]); }); function graph_me(div_name, labels_in, values_in) { var labels = labels_in.reverse(); var values = values_in.reverse(); $.jqplot(div_name, [values], { series:[{ renderer:$.jqplot.BarRenderer, rendererOptions: { barDirection: 'horizontal', varyBarColor: true } } ], axes: { yaxis: { renderer: $.jqplot.CategoryAxisRenderer, ticks: labels, tickOptions: { showGridline: false, markSize: 0 } } } }); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="chart1" style="height:400px;width:500px; margin: 0 auto;"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload