AmCharts
Type class
Namespace of the framework which holds the general settings, gets automatically injected to document since the source has been included.
Example
```js AmCharts.useUTC = true; AmCharts.processDelay = 100;```Sources
This information about AmCharts is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.
Inheritance
AmCharts does not extend any other symbol.
AmCharts is not extended by any other symbol.
Properties
processDelayType
numberDefault0Delay in ms at which each chart on the page should be rendered. This is very handy if you have a lot of charts on the page and do not want to overload the device CPU.
Methods
addInitHandler()Returns
voidhandler is a method which will be called before initializing the chart. types is array of strings, specifying which chart types should call this method. If you don't set any type, all the charts will call this method. When handler method is called, chart instance is passed as an attribute. You can use this feature to preprocess chart data or do some other things you need before initializing the chart.
addPrefix()Returns
voidFormat the number according to rules set in prefixesBig, prefixesSmall and numberFormatter.
You can use chart instance's "prefixesOfSmallNumbers", "prefixesOfBigNumbers" as well as "precision", "decimalSeparator" and "thousandsSeparator" properties to form your request.
var formatted = AmCharts.addPrefix( value, chart.prefixesOfBigNumbers, chart.prefixesOfSmallNumbers, { precision: chart.precision, decimalSeparator: chart.decimalSeparator, thousandsSeparator: chart.thousandsSeparator });clear()Returns
voidClears all the charts on page, removes listeners and intervals.
formatDate()Returns
voidYou can use this method to format date object into date string.
formatNumber()Returns
voidReturns string formatter with the provided settings. Formatter is an object with precision, decimalSeparator and thousandsSeparator defined, like: {precision: 2, decimalSeparator: '.', thousandsSeparator: ','}; If you don't need to adjust precision set it to -1. zeroCount defines how many zeros should be added after comma (useful when formatting currencies).
makeChart()Returns
voidCreates chart. container can be either id or the reference to the element you want the chart to be placed in, chartConfig is JSON object with chart properties defined and delay is time in ms, in which the chart should be rendered (renders instantly if not set).
stringToDate()Returns
voidYou can use this method to convert date string to date object. Please note, that literal name codes such as MMM or MMMM are not supported.
Events
AmCharts does not have any events.