I am fairly new to javascript programming. Using the following function I can draw a graph in javascript as long as the type is some numeric type:
jQuery(document).ready(function() { $.jqplot.config.enablePlugins = true; // on the page before plot creation. line1={{=data}} $.jqplot('wys', [line1], { title:'Articles per year', axes:{ xaxis:{ renderer:$.jqplot.DateAxisRenderer, rendererOptions:{tickRenderer:$.jqplot.CanvasAxisTickRenderer}, tickOptions:{ formatString: '%d', fontSize:'10pt', fontFamily:'Tahoma', angle:-30 } }, yaxis:{tickOptions:{formatString:'%d'}} }, highlighter: {sizeAdjust: 7.5}, cursor: {show: false} }); I can work when the data is like this: line1=[[1970, 49], [1971, 56], [1972, 138]] where the year (like 1970, 1971...) is on the x-axis. But when the first value of is a string, javascript receives it like this: line1=[['1979', 36], ['1980', 47]] and then obviously it fails. Can somebody point me to a better way to get clean string data to my jquery script please? Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a