globalDefault.js 1.9 KB
Newer Older
L
lang 已提交
1
define(function () {
L
lang 已提交
2 3 4 5 6
    var platform = '';
    // Navigator not exists in node
    if (typeof navigator !== 'undefined') {
        platform = navigator.platform || '';
    }
L
lang 已提交
7 8 9
    return {
        // 全图默认背景
        backgroundColor: 'rgba(0,0,0,0)',
L
lang 已提交
10

L
lang 已提交
11
        // https://dribbble.com/shots/1065960-Infographic-Pie-chart-visualization
L
lang 已提交
12
        // color: ['#5793f3', '#d14a61', '#fd9c35', '#675bba', '#fec42c', '#dd4444', '#d4df5a', '#cd4870'],
L
lang 已提交
13 14
        // 浅色
        // color: ['#bcd3bb', '#e88f70', '#edc1a5', '#9dc5c8', '#e1e8c8', '#7b7c68', '#e5b5b5', '#f0b489', '#928ea8', '#bda29a'],
L
lang 已提交
15
        // color: ['#cc5664', '#9bd6ec', '#ea946e', '#8acaaa', '#f1ec64', '#ee8686', '#a48dc1', '#5da6bc', '#b9dcae'],
L
lang 已提交
16
        // 深色
L
tweak  
lang 已提交
17
        color: ['#c23531', '#314656', '#61a0a8', '#dd8668', '#91c7ae', '#6e7074', '#61a0a8', '#bda29a', '#44525d', '#c4ccd3'],
L
lang 已提交
18

L
lang 已提交
19 20 21 22
        // 默认需要 Grid 配置项
        grid: {},
        // 主题,主题
        textStyle: {
L
lang 已提交
23
            // color: '#000',
L
lang 已提交
24 25 26 27
            decoration: 'none',
            // PENDING
            fontFamily: platform.match(/^Win/) ? 'Microsoft YaHei' : 'sans-serif',
            // fontFamily: 'Arial, Verdana, sans-serif',
L
lang 已提交
28
            fontSize: 12,
L
lang 已提交
29 30 31 32
            fontStyle: 'normal',
            fontWeight: 'normal'
        },
        // 主题,默认标志图形类型列表
L
lang 已提交
33 34 35 36
        // symbolList: [
        //     'circle', 'rectangle', 'triangle', 'diamond',
        //     'emptyCircle', 'emptyRectangle', 'emptyTriangle', 'emptyDiamond'
        // ],
L
lang 已提交
37 38 39 40
        animation: true,                // 过渡动画是否开启
        animationThreshold: 2000,       // 动画元素阀值,产生的图形原素超过2000不出动画
        animationDuration: 1000,        // 过渡动画参数:进入
        animationDurationUpdate: 300,   // 过渡动画参数:更新
41
        animationEasing: 'exponentialOut',    //BounceOut
L
lang 已提交
42
        animationEasingUpdate: 'cubicOut'
L
lang 已提交
43
    };
L
lang 已提交
44
});