jQplot Multiple Series Duplicating X Axis Labels

534 Views Asked by At

I am getting rather frustrated with jQplot. As you can see in the image, if i plot a single series it's all spot on. But as soon as i add a second series, with the same date on the X axis, it duplicates the date label.

I am just wondering how i can prevent it from duplicating the label on the X axis, so if a date is already there form series 1, it doesn't need to display the label again for series 2.

The function that makes the plots is also below:

$.fn.plotChart = function(div,plots,yString){

        yString = (typeof yString == "undefined") ? '£%d' : yString;


        var plot1 = $.jqplot(div,plots,{
            highlighter: { show: true, tooltipAxes: 'both' },
            seriesDefaults:{
                rendererOptions: {fillToZero: true},
            },
            axesDefaults:{
                tickRenderer: $.jqplot.CanvasAxisTickRenderer, 
            },
            legend: {
                show: true,
                placement: 'outsideGrid'
            },
            axes:{
                xaxis:{
                    renderer: $.jqplot.DateAxisRenderer,
                    tickOptions:{
                        formatString:'%d/%m/%Y',
                        angle:30
                    },
                    tickInterval:'5 days'
                },
                yaxis:{
                    tickOptions: {formatString: yString }
                }
            }
        });           
    }

enter image description here

0

There are 0 best solutions below