jqPlot Größenänderung

Sagen Sie mir, wenn jemand auf dieses Problem gestoßen ist:

Ich zeige auf meinem Seitenplot mit jqPlot

<code><script language="javascript" type="text/javascript">

    $(document).ready(function () {
            $.jqplot.config.enablePlugins = true;
            var chLines = [[['09/30/2010 00:00:00',24.13],['12/31/2010 00:00:00',28.26],['03/31/2011 00:00:00',24.00],['06/30/2011 00:00:00',25.35],['09/30/2011 00:00:00',26.26],['12/31/2011 00:00:00',29.71]]];
            var chSeries = [{       color: '#436277',       label: 'label'  }];
        var mnth;
        var quarter;

        $.jqplot.DateTickFormatter = function(format, val) {
            if (!format) {
                format = '%Y/%m/%d';
            }       

            if(format == '%Q') {
                mnth = $.jsDate.strftime(val, '%#m');
                quarter = parseInt((mnth-1) / 3) + 1;
                return $.jsDate.strftime(val, '%Y') + 'Q' + quarter;
            }
            return $.jsDate.strftime(val, format);
        };

        //$.jqplot.DateAxisRenderer.tickInterval = 86400000*32*3;

        var plot = $.jqplot('content-chart', chLines,
            {
                //animate: !$.jqplot.use_excanvas, // Only animate if we're not using excanvas (not in IE 7 or IE 8)..           
                axes: {
                    xaxis: {
                        tickInterval: 86400000*32*3,
                        renderer: $.jqplot.DateAxisRenderer,
                        borderColor: 'black',
                        borderWidth: 0.5,
                        tickOptions: {
                            showGridline: false,
                            //formatString: '%b %Y',
                            formatString: '%Q',
                            textColor: 'black',
                            fontSize: '11px',
                        }
                    },
                    yaxis: {
                        min: 0,
                        tickOptions: {
                            formatString: '%.2f',
                            textColor: 'black',
                            fontSize: '11px'
                        }
                    }
                },
                highlighter: {
                    show: true,
                    sizeAdjust: 7.5
                },
                seriesDefaults: {
                    lineWidth: 3
                },

                series: chSeries,
                legend: {
                    show: true,
                    location: 'sw',//compass direction, nw, n, ne, e, se, s, sw, w.
                    xoffset: 5,
                    yoffset: 5
                    //placement: 'outside'
                },

                grid:{
                    background: 'white',
                    borderColor: 'white',
                    shadow: false,
                    gridLineColor: '#999999'
                }
            });
            $(window).bind('resize', function(event, ui) {              
                plot.replot( { resetAxes: true } );
            });
    });
</script>
</code>

Ich sehe, dass die Tick-Beschriftungen auf der X-Achse dupliziert sind

aber wenn Fenstergröße geändert werdenthis.tickInterval Objekt in der jqplot.dateAxisRenderer.js increateTicks Funktion werden ist null. Außerdem habe ich versucht, den Code in der Funktion zu änderncreateTicks sieht aus wie das

<code>this.tickInterval = 86400000 * 32 * 3;
var tickInterval = this.tickInterval;
</code>

Aber leider beginnen die Häkchenbeschriftungen ineinander zu laufen, wenn die Größe des Fensters geändert wird.

Antworten auf die Frage(2)

Ihre Antwort auf die Frage