javascript - jQuery Flotcharts - show grid lines? -


i'm using http://www.flotcharts.org/. why grid lines disappear?

flot without grid lines

here code plot options:

var options = {         grid: {             markings: evs,             clickable: true,             hoverable: true         },         series: {             lines: {                 show: true,                 fill: true,                 linewidth: 1,                 fillcolor: {                     colors: [{                         opacity: 1                     }, {                         opacity: 1                     }]                 }             }         },         colors: ["rgba(41, 150, 206, 0.9)", "rgba(67, 90, 110, 0.4)", "rgba(255, 255, 255, 1)"],         crosshair: {             mode: "xy",             color: "#323232",             linewidth: 1         },         xaxis: {             mode: mode,             show: true,             position: "bottom",             color: "#323232",             font: {                 size: 10,                 lineheight: 15             },             labelheight: 15,             ticklength: 5         },         yaxis: {             show: true,             position: "left",             color: "#323232",             labelwidth: 20,             font: {                 size: 10             },             max: vmax + 20,             min: 0,             minticksize: 1,             ticksize:20,             ticklength: 10         },         pan: {             interactive: true,             cursor: "move",             framerate: 60         },         tooltip: true,         tooltipopts: {             id: 'flottip', //"flottip"             content: '%x : %y km/h', //"%s | x: %x | y: %y"             shifts: {                 x: 10, //10                 y: 20 //20             },             defaulttheme: true, //true             lines: {                 track: true, //false                 threshold: 0.01 //0.05             },             onhover: function (flotitem, $tooltipel) {                 if (flotitem.seriesindex == 1) $tooltipel[0].innerhtml = "postój";             }         }     }; 

i want simple yaxis lines.

ps. crosshair crosshair plugin.

don't set ticklength option if want have lines @ ticks. flot doesn't have "grid lines" per se, tick lines can run through grid. if want them on 1 axis, set option on 1 axis not other.

from documentation (emphasis mine):

"ticklength" length of tick lines in pixels. by default, innermost axes have ticks extend across plot, while axes use small ticks. value of null means use default, while number means small ticks of length - set 0 hide lines completely.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -