python - Google Chart API - Line Chart: Averaging data -


i have data maps across ~4 years on line chart:

0 72 346 172 193 240 34 24 18 26 25 34 52 104 23 34 29 32 55 46 44 25 36 45 48 60 65 69 66 24 28 39 2 72 74 65 69 44 66 57 49 35 77 49 32 63 47 79 47

the line chart seems limit 100 max value, of values 'off chart'. figure want calculate data in such way max value (in case, 346) equal 100 , average out in-between. makes sense google chart api allows floating numbers.

im not sure how it.

let's had numbers in list l - following scale numbers percentage of max value:

[ float(i) * 100 / max(l) in l ] 

then if want original value value n:

n / 100 * max(l) 

Comments

Popular posts from this blog

sql server - python to mssql encoding problem -

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -