Support » Plugins and Hacks » [Resolved] Remove or hide data labels / categories on x axis

[Resolved] Remove or hide data labels / categories on x axis

  • Hi ,

    First off, great plugin, really excellent work.

    I want to be able to produce a line graph to plot a year’s worth of data with daily granularity. If I put all of the dates in as labels, the x axis becomes illegible. I have tried to miss out some date labels to effectively try and just plot the month start date on the x-axis and have 12 labels but anything without a date label plots at the beginning of the x axis.

    Is there a way to plot a year’s worth of daily data but with a legible x axis?



Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author randyjensen


    Hey energynerd,

    The ability to disable axis labels is on my list of things to do. If you want to just modify the plugin, you can open shortcode/init.php and go to line 207.

    It should say “show: true,”. Just change “true” to “false” (no tick marks).

    If that doesn’t work, let me know and I’ll find another solution.

    Thanks for coming back to me. I went to the shortcode/init.php and changed true to false in this section of the code:

    axes: {
    xaxis: $xAxis,
    renderer: jQuery.jqplot.LogAxisRenderer,
    tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
    labelRenderer: jQuery.jqplot.CanvasAxisLabelRenderer,
    label: ‘$yAxisText’,
    labelOptions: {
    show: false,
    fontSize: ’14px’
    tickOptions: {
    mark: false,
    labelPosition: ‘middle’,
    angle: -90

    But the x-axis is still visible? Any other ideas? Ideally I would still like the x axis to be visible but just show a smaller number of labels.

    Plugin Author randyjensen


    OK, go ahead and undo that then.

    In that same file, look for line 74 which should look like this:

    $xAxis = “{
    label: ”,

    Go ahead and add this line:

    numberTicks: 20,

    So it looks like this:

    $xAxis = “{
    numberTicks: 20,
    label: ”,

    You can change “20” to anything you want. This should limit the number of ticks to something more reasonable.

    Let me know if that works for you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Remove or hide data labels / categories on x axis’ is closed to new replies.