2

Problem is that it always is displaying two days before start of my chart. I've tried to set pad: 0 and min: 0 which is working on normal values, but not so much on date values.

Example:
My array starts at 2012.09.01 but chart starts at 2012.8.30.

Image describing problem

enter image description here

Code

var plot1 = $.jqplot('chart-dashboard', [line1, line2, line3], {
        series: [{ color: '#333333', label: '1' }, { color: '#999999', label: '2' }, { color: 'green', label: '3'}],
        axes: {
            xaxis: {
                renderer: $.jqplot.DateAxisRenderer,
                tickOptions: {
                    formatString: '%b %#d'
                },
                // pad: 0 // does not work
                // min: 0 // does not work
            },
            yaxis: {
                min: 0 // works because it's not a date
            }
        },
        highlighter: {
            show: true,
            sizeAdjust: 7.5
        },
        cursor: {
            show: false
        },
        legend: {
            show: true
        }
});
Stan
  • 25,744
  • 53
  • 164
  • 242

1 Answers1

0

In detail the way to resolve you problem described here

Padding values on inverted axis in jqplot

In summary you should use

either

xaxis: {
     pad:0,
     ....
}

either

xaxis: {
     min:'2012.09.01',
     max: ....
}

because pad would not work if you set max, min

Community
  • 1
  • 1
Kamil Gareev
  • 146
  • 3
  • 12