Page 1 of 1

jqplot = x-axis not showing labels

Posted: Tue Jan 06, 2015 3:41 pm
by Don7312172

I'm using static data to just get the plot to show and can't get the x-axis to show Mon-Fri. If I change them to numbers the graph shows fine. I've added jqplot and jqplot.categoraxisrender as javascript. If I go to the console and type: jquery.jqplot it tells me jquery is undefined. I've also tried various versions of the two js above.

Any help appreciated.

var line2 = [['Mo', 7], ['Tu', 9], ['We', 15],
['Th', 12], ['F', 3],
['Sa', 6], ['Su', 18]];

$.jqplot('myplot', [line2],

{ title:'Weekly',

axes:{
xaxis:{
Renderer: $.jqplot.CategoryAxisRenderer,
label: 'Week Days',
},
yaxis:{min:0, max:100}},

series:[{color:'#5FAB78'}]

});


jqplot = x-axis not showing labels

Posted: Wed Jan 07, 2015 3:51 am
by Yurii Orishchuk

Hi Don,

Sorry but we don't know how to do it with this 3rd party api.

It's better to ask in jqplot comunity/support.

Regards.


jqplot = x-axis not showing labels

Posted: Wed Jan 07, 2015 1:53 pm
by Don7312172

This worked...
var test = [];
test = [35, 40, 55, 70, 22, 15, 10];
var test2 = [];
test2 = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'];

$.jqplot('myplot', [test],
{
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {fillToZero: false}
},
series:[
{label:'Weekdays'},
],
title:'Weekly',
axes:{
xaxis:{
renderer: $.jqplot.CategoryAxisRenderer,
ticks: test2
},
yaxis:{min:0, max:100}}
});


jqplot = x-axis not showing labels

Posted: Thu Jan 08, 2015 12:35 am
by Yurii Orishchuk

Hi Don,

Many thanks for this update.

It could be very useful for others.

Thanks & regards.