0

I'm trying to do 2 things on my Bar Chart:

  1. Change the format of the number of yaxis to ###,###(12000) instead of ######(12000);
  2. Changing the mouse tooltip to show just the y axis value. 14554 in instead of 1,14554

I've tried using custom extender, but I couldn't find out the JPlot code to it.

I'm using PrimeFaces 5.1.

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

1

In order to achieve what you want with your primefaces bar chart, add following to your custom jqPlot extender:

  1. To format Y axes numbers as ###,### (digit grouping)

    this.cfg.axes.yaxis.tickOptions.formatString = "%'d";

    (jqPlot uses single quote (') to format number with digit grouping)

  2. To force tooltip to show only yaxis values

    this.cfg.highlighter={show: true,tooltipAxes: 'y',useAxesFormatters: false,tooltipFormatString: "%'d"};

S1LENT WARRIOR
  • 11,704
  • 4
  • 46
  • 60
Dusan Kovacevic
  • 1,377
  • 1
  • 13
  • 19