No Results
Chart Configuration Override

In some cases an administrator might want to override existing chart options for the charting library (Highcharts) that edgeCore is using. To do so, download the Highcharts adapter example here and edit the provided JavaScript file HighchartsOverrides.js and zip it up again and load it into edgeCore.

(function () {
    'use strict';
    /* These are the time units that Highcharts use for its default formatting
     * Documentation for dateTimeLabelFormats (which use subset of the formats for PHP's strftime)
     * https://api.highcharts.com/class-reference/Highcharts#.dateFormat
     * http://www.php.net/manual/en/function.strftime.php
     *
 
    default Highcharts date format
    {
        millisecond: '%H:%M:%S.%L',
        second: '%H:%M:%S',
        minute: '%H:%M',
        hour: '%H:%M',
        day: '%e. %b',
        week: '%e. %b',
        month: '%b \'%y',
        year: '%Y'
    }
 
    edgeSuite overrides the following - localized = false:
    {
        month: "%Y-%m",
        week: "%Y-%m-%d",
        day: "%Y-%m-%d"
    }
     
    localized = true:
    {
        month: "%\u03B1",
        week: "%x",
        day: "%x"
    }
 
    In addition, edgeSuite added 2 custom date replacement codes:
    %x: format the date with moment js L setting.
    %\u03B1: (which is Greek alpha character), same as 'x' except without the day field.
 
    Moment JS documentation for Localized formats: L
    https://momentjs.com/docs/#/displaying/format/
 
     */
    /* override dateTimeLabelFormats with European date regardless what chart's setting or user's preference
     * Note you can override any other chart options as specified in Highcharts Documentation
     * https://api.highcharts.com/highcharts/ -> Highcharts.chart
     */
    Highcharts.$$chartOptions = {
        xAxis: {
            dateTimeLabelFormats: {
                month: "%m.%Y",
                week: "%d.%m.%Y",
                day: "%d.%m.%Y"
            }
        }
    }
 
    /* as for number, edgeSuite will set it according the user's locale and you can override that with the
     * following lines uncommented. Always use European number separator
     * Note you can override any other chart options as specified in Highcharts Documentation
     * https://api.highcharts.com/highcharts/ -> Highcharts.lang
     */
    /*
    Highcharts.$$langOptions = {
        lang: {
            thousandsSep: " ",
            decimalPoint: ","
        }
    }
    */
})();

Terms | Privacy