This section is regarding Methods and Properties available in the CanvasJS namespace.
Examples:Method | Description | Example |
---|---|---|
formatNumber(Number value [,String formatString] [,String culture]) | Formats number according to the given formatString. | CanvasJS.formatNumber(10000, “#,###”); |
formatDate(Date date/timestamp [,String formatString] [,String culture]) | Formats date/timestamp according to the given formatString. | CanvasJS.formatDate(new Date(), “DD-MM-YY”); |
addColorSet(String colorSetName, Array colorSetArray) | Adds custom colorSet to the library. | CanvasJS.addColorSet(“customColorSet1”, [“#4661EE”, “#EC5657”]); |
addCultureInfo(String cultureName, Object cultureOptions) | Adds custom culture to the library. | CanvasJS.addCultureInfo(“es”, { decimalSeparator: “.” }); |
To know more about date format string, please refer to this section.
To know more about adding custom culture, info please refer to this section.
Please refer to CanvasJS page for more information about the attributes / properties available.