new Charts
ChartJS controller
Parameters:
Name | Type | Description |
---|---|---|
app |
Simplicite.Ajax | Ajax service |
engine |
Simplicite.UI.Engine | Main controller |
- Source:
- charts.js, line 13
Members
-
COLORS
-
Current palette of colors
default: app.sysparams.CHART_PALETTE | Sea- Source:
- charts.js, line 32
-
PALETTE
-
Current palette name
- Source:
- charts.js, line 53
-
PALETTES
-
Predefined palettes { name:[colors] }.
- Source:
- charts.js, line 25
Methods
-
chart
-
Chart JS
Parameters:
Name Type Description ctn
jQuery Container config
object from chart.js v2 config click
function optional handler(chart, elements, dataset) - Source:
- charts.js, line 83
-
chartHeapSize
-
Heap chart
Parameters:
Name Type Description ctn
jQuery Container data
object lines data [{d,u,t},...] p
object optional chart.js options - Source:
- charts.js, line 638
-
chartStatusCount
-
Status count in a chart line per date
Parameters:
Name Type Description ctn
jQuery Container data
object line data p
object optional chart.js options - Source:
- charts.js, line 160
-
chartStatusDuration
-
Status duration in a radar/bar
Parameters:
Name Type Description ctn
jQuery Container d
object duration data p
object optional chart.js options - Source:
- charts.js, line 236
-
chartStatusPie
-
Status count in a PIE
Parameters:
Name Type Description ctn
jQuery Container data
object pie data p
object optional chart.js options - Source:
- charts.js, line 110
-
chartStatusTerminal
-
Process duration in a bar chart
Parameters:
Name Type Description ctn
jQuery Container data
object duration data p
object optional chart.js options - Source:
- charts.js, line 311
-
css2rgb
-
Convert #RRGGBB to object {r,g,b,a}
Parameters:
Name Type Description color
string #RRGGBB alpha
number option alpha (transparency) - Source:
- charts.js, line 996
Returns:
object {r,g,b,a} -
css2rgba
-
Convert #RRGGBB to string
Parameters:
Name Type Description color
string #RRGGBB alpha
number option alpha (transparency) - Source:
- charts.js, line 1016
Returns:
string 'rgba(r,g,b,a)' -
getBrightColor
-
Get the brightest color in the current palette
Parameters:
Name Type Description darkest
boolean true to get the darkest one - Source:
- charts.js, line 970
Returns:
a color #RRGGBB -
getColor
-
Indexed color in palette
Parameters:
Name Type Description i
number index - Source:
- charts.js, line 40
Returns:
color #RRGGBB -
getColors
-
All palette colors
- Source:
- charts.js, line 47
Returns:
array of color #RRGGBB -
getPalette
-
Current palette
- Source:
- charts.js, line 60
Returns:
palette = list of colors -
rgb2hsv
-
Convert {r,g,b} to {h,s,v}
Parameters:
Name Type Description color
object {r,g,b} - Source:
- charts.js, line 1027
Returns:
object {h,s,v} -
setPalette
-
Change the current palette
Parameters:
Name Type Description name
string palette name ('Sea', 'Base'...) - Source:
- charts.js, line 67
-
size
-
Format octets size to ko/Mo/Go/To
Parameters:
Name Type Description s
number size - Source:
- charts.js, line 623