all files / smithchart/model/ theme.js

100% Statements 31/31
100% Branches 8/8
100% Functions 4/4
100% Lines 31/31
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107                                                                 113× 113×               107×   107×   113×   113× 113×                                 111×                             111×   113×      
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var Theme;
    (function (Theme) {
        Theme.axisLabelFont = {
            size: '12px',
            fontWeight: 'Normal',
            color: null,
            fontStyle: 'Normal',
            fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
        };
        Theme.smithchartTitleFont = {
            size: '15px',
            fontWeight: 'Normal',
            color: null,
            fontStyle: 'Normal',
            fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
        };
        Theme.smithchartSubtitleFont = {
            size: '13px',
            fontWeight: 'Normal',
            color: null,
            fontStyle: 'Normal',
            fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
        };
        Theme.dataLabelFont = {
            size: '12px',
            fontWeight: 'Normal',
            color: null,
            fontStyle: 'Normal',
            fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
        };
        Theme.legendLabelFont = {
            size: '13px',
            fontWeight: 'Normal',
            color: null,
            fontStyle: 'Normal',
            fontFamily: 'Roboto, Segoe UI, Noto, Sans-serif'
        };
    })(Theme = exports.Theme || (exports.Theme = {}));
    function getSeriesColor(theme) {
        var palette;
        switch (theme) {
            case 'Highcontrast':
                palette = ['#79ECE4', '#E98272', '#DFE6B6', '#C6E773', '#BA98FF',
                    '#FA83C3', '#00C27A', '#43ACEF', '#D681EF', '#D8BC6E'];
                break;
            case 'Fabric':
                palette = ['#4472c4', '#ed7d31', '#ffc000', '#70ad47', '#5b9bd5',
                    '#c1c1c1', '#6f6fe2', '#e269ae', '#9e480e', '#997300'];
                break;
            case 'Bootstrap':
                palette = ['#a16ee5', '#f7ce69', '#55a5c2', '#7ddf1e', '#ff6ea6',
                    '#7953ac', '#b99b4f', '#407c92', '#5ea716', '#b91c52'];
                break;
            default:
                palette = ['#00bdae', '#404041', '#357cd2', '#e56590', '#f8b883',
                    '#70ad47', '#dd8abd', '#7f84e8', '#7bb4eb', '#ea7a57'];
                break;
        }
        return palette;
    }
    exports.getSeriesColor = getSeriesColor;
    function getThemeColor(theme) {
        var style;
        switch (theme) {
            case 'Highcontrast':
                style = {
                    axisLabel: '#ffffff',
                    axisLine: '#ffffff',
                    majorGridLine: '#BFBFBF',
                    minorGridLine: '#969696',
                    chartTitle: '#ffffff',
                    legendLabel: '#ffffff',
                    background: '#000000',
                    areaBorder: '#ffffff',
                    tooltipFill: '#ffffff',
                    dataLabel: '#ffffff',
                    tooltipBoldLabel: '#000000',
                    tooltipLightLabel: '#000000',
                    tooltipHeaderLine: '#969696',
                };
                break;
            default:
                style = {
                    axisLabel: '#686868',
                    axisLine: '#b5b5b5',
                    majorGridLine: '#dbdbdb',
                    minorGridLine: '#eaeaea',
                    chartTitle: '#424242',
                    legendLabel: '#353535',
                    background: '#FFFFFF',
                    areaBorder: 'Gray',
                    tooltipFill: 'rgba(0, 8, 22, 0.75)',
                    dataLabel: '#424242',
                    tooltipBoldLabel: '#ffffff',
                    tooltipLightLabel: '#dbdbdb',
                    tooltipHeaderLine: '#ffffff'
                };
                break;
        }
        return style;
    }
    exports.getThemeColor = getThemeColor;
});