rendro / easy-pie-chart

easy pie chart is a lightweight plugin to draw simple, animated pie charts for single values

Home Page:http://rendro.github.io/easy-pie-chart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change the scale to 10 instead of 100

B4rT26 opened this issue · comments

Hi, thanks for your tool.

I'm wondering if there is a way to change the scale of the chart to 10 instead of 100. I want to display the results via points and the maximum value to achieve is 10. On the "<>Code" page is an example with "used ram" and 1000 as base, but I didn't find out yet how to change the parameters to display it that way. Is there an option embedded?

Thanks for your help!

Meanwhile I've found out how to do it. If anyone is dealing with the same issue and wants to display values up to 10 instead of 100:

  1. Multiple the data-percent attribut by 10
  2. In script section find line:
    jQuery(this.el).find('.percent').text(Math.round(percent));
    and divide the percent value by 10, so the edited line will be:
    jQuery(this.el).find('.percent').text(Math.round(percent/10));