how to change label on jqplot stacked horizontal bar chart
Tag : jquery , By : Jet Thompson
Date : March 29 2020, 07:55 AM
wish helps you Use the ticks option (2nd example on this page): perc_data = [[[6, "1"]], [[92, "1"]], [[1, "1"]], [[1, "1"]]];
ticks = ["My Label"];
series_array = [ { label:'Mud', color:"#ccaa00"}, { label:"Sand", color:"#ffeecc"}, { label:"Gravel", color:"#dddddd"}, { label:"Rock", color:"#664400"} ];
var perc_chart = $.jqplot('chart1', perc_data, {
stackSeries: true,
seriesDefaults: {
renderer:$.jqplot.BarRenderer,
shadowAngle: 135,
rendererOptions: { barWidth: 25,
barDirection: 'horizontal',
}
},
series: series_array,
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
rendererOptions: { tickRenderer: $.jqplot.AxisTickRenderer,
tickOptions: { mark: null,
fontSize: 12
}
},
ticks: ticks
},
xaxis: {
min: 0,
max: 100,
numberTicks: 6
}
},
grid: {
drawGridlines: false,
drawBorder: false,
shadow: false
}
});
|
JQPlot - Stacked Horizontal Bar Chart - No Bars When Stacked
Date : March 29 2020, 07:55 AM
this one helps. I found a way to fix my problem (not entirely, but sufficiently for my need). This issue only occurs when I use custom lables pulled from somewhere else; if I use generic "1,2,3,4,etc." the graph stacks properly and shows data. Ideally I would have custom lables, but I can just put a simple table beside the graph to act as the axis labels.
|
jqPlot - How to add vertical scrollbar to legend box containing many legend items
Tag : css , By : Chris Tattum
Date : March 29 2020, 07:55 AM
To fix this issue I found some people on the web mentioned some issues with overflow on tables in IE, but I couldn't get a needed answer. Therefore, my approach was to wrap the table into another element. I wrap it in a div and set appropriate values on it and it works cross browser :)
|
jqPlot - Horizontal legend
Tag : jquery , By : DarrenBeck
Date : March 29 2020, 07:55 AM
around this issue This is very easy to achieve using the EnhancedLegendRenderer plugin. Just include the plugin and use options similar to this. legend:{
renderer: $.jqplot.EnhancedLegendRenderer,
show: true,
rendererOptions: {
numberRows: 1
}
}
|
stacked bar chart legend issue jqplot
Date : March 29 2020, 07:55 AM
seems to work fine You have not set the renderer for legend. Set renderer to $.jqplot.EnhancedLegendRenderer So the legend object would look like this: legend:{
renderer: $.jqplot.EnhancedLegendRenderer,
show:true,
placement:'outside',
rendererOptions: {
numberRows: 2,
numberColumns: 2
},
location:'s',
marginTop: '40px',
border:'none'
}
|