Change echart bar chart column values from decimal to percentage with %

Confluence User - 03 Dec, 2021

Hi 


i have an bar chart (using echart from market place) in my dashboard, the data (Progress) is in decimal and i want to show this as a percentage value with the "%" mark. (e.g. 0.5 as 50%, 1 as 100% etc.)

i have tried the following code in the series customization without any luck

{
"formatter": "({Progress}%)"
}

how do i get this to work?

thanks in advance



echart;chart;bar;userviews;dashboard;format;dx7

2


03 Dec, 2021
confluenceUser
confluenceUser

Use JDBC SQL in your datalist datasource and calculate to % so that the column result is in % see https://www.google.com/search?q=sql+calculate+percentage 

07 Dec, 2021
confluenceUser
confluenceUser

There is no option in EChart Menu to change data source, i created another userview with a sql chart component with the following code;

SELECT c_serial as 'Serial #', c_progress * 100 as 'Progress %'FROM jwdb.app_fd_test WHERE c_status="Open" group by c_serial order by c_serial ASC; 

this has its own issues like chart y maximum is over 100, also values don't have % marks.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print