Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle JET Chart - Convert Y Axis to Percent

VevinSep 10 2019 — edited Sep 11 2019

I'm creating a bar chart using Oracle JET and trying to format the Y axis labels as percentage. When I use the Number Converter factory, it automatically multiplies the values by 100. Is there some way to prevent it?

Method 1:

var percentConverter =

            oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER\_TYPE\_NUMBER).

            createConverter(

            {

              style : 'percent'

            })

Method 2:

var percentConverter =

            oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER\_TYPE\_NUMBER).

            createConverter(

            {

              pattern : '#%'

            });

In both the above methods, if the Y axis tick labels are 0 to 100, I see 0% to 10000%.

pastedImage_1.png

This post has been answered by EJ Sefah-Oracle on Sep 10 2019
Jump to Answer
Comments
Post Details
Added on Sep 10 2019
2 comments
679 views