Menu

numeric Symbol

Sassoum
2015-09-21
2015-09-24
  • Sassoum

    Sassoum - 2015-09-21

    Hi shawn,

    I have 2 solid gauge charts, that I've set their extreme values respectively to 160000 and 45000, but these values change automatically from '000' to "K" symbol.

    I've read in the highcharts API that I've to set the "lang/numericSymbols" chart option to null but that does'nt work

    Have you any further idea please ???

     

    Last edit: Sassoum 2015-09-22
  • Sassoum

    Sassoum - 2015-09-22

    Any suggestion, please, It's very recommended to have the entire number ??

     
  • Shawn Quinn

    Shawn Quinn - 2015-09-22

    You should be able to use a "DataLabelsFormatter" if you want to control how the labels appears. Example here:

    http://www.moxiegroup.com/moxieapps/gwt-highcharts/showcase/#column-range

    I haven't tried that myself on a gauge chart, but I believe it should work the same way.

     
  • Sassoum

    Sassoum - 2015-09-22

    That's what I have exactly done, here is the code I tested, but it doesn't work:

                  .setLabels(new XAxisLabels().setY(16)
    
                                            .setOption("lang/numericSymbols", null)
                                            .setFormatter(new AxisLabelsFormatter() {
    
                                        @Override
                                        public String format(AxisLabelsData axisLabelsData) {
                                            // TODO Auto-generated method stub
    
                                            String XAxislabel= axisLabelsData.getValueAsString();
                                        return (XAxislabel.substring(0, XAxislabel.length()-1));
    
                                        }
                                    }))
                                    );
    
     
    • Cory Skowronek

      Cory Skowronek - 2015-09-22

      I don't have a the project in front of me at the moment so I can't test it, but try doing something like this for setting the "numericSymbols" option.

      Highcharts.setOptions(
          new Highcharts.Options().setLang(
              new Lang()
                  .setOption("numericSymbols", new String[] {null, null, null, null, null, null})
      ));
      

      You may have to do something a bit different for the secont parameter of the setOption() method, but try that as a start.

       

      Last edit: Cory Skowronek 2015-09-22
  • Sassoum

    Sassoum - 2015-09-23

    ok thanks so much, I'll try it.

     
  • Sassoum

    Sassoum - 2015-09-24

    now it works fine, thanks a lot !!

     

Log in to post a comment.