I need help to draq a graph with jqplot. The graph is simple, but jqplot make it complicated. I need to get a graph like this:
.
with some improvements:
The colors are defined here:
graphColors = ['#048ff1', '#79b924', '#ffa600', '#ef5257', '#7b279b', '#8ff104',
'#b92479', '#5257ef', '#279b7b', '#f1048f', '#00ffa6', '#9b7b27']
Some render options are here:
seriesDefaults: {
seriesColors: graphColors,
renderer: $.jqplot.BarRenderer,
rendererOptions: { barDirection: 'vertical' }
},
axes: {
yaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
ticks: [ /* to be filled in automatically */ ]
},
xaxis: {
min: 0
}
}
and the data I need to render is here:
//in the image I used instead of letters '1'
data = [[['a', 1112]],
[['b', 1127]],
[['c', 822]],
[['d', 1039]]
];
Questions:
How to set for each bar a label ('a', 'b', 'c', 'd' etc)?
How to move the series to start from left (and not in the middle as now, of course with a small margin on left?
The values on y axis, values bigger than 1000 are rendered over the graph lines. How to set a space between axis values and graph?
The graph I want to draw is simple. It is possible to obtain the same result without using series? All I want is a bar graph with each bar having a distinct color and displaying a specific label?
Thank you.