Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多Gird组合图中,同名legend颜色不一致,目前测试应该是由stack属性影响 #3415

Closed
ready360go opened this issue Jun 13, 2016 · 1 comment

Comments

@ready360go
Copy link

ready360go commented Jun 13, 2016

问题简述 (One-line summary)

1.多组grid图中(三组),不同grid的series的stack属性,只设置为a,b. 不做a,b,/ a1,b1,/ a2,b2这样的区分 。图形显示错乱。

image

option = {
    "color":['#148B3A', '#9148BA', '#CF0EDA', '#2A975E', '#567C18', '#A37F4A', '#2E5F5F', '#DF8EB5', '#b7DC2', '#048225', '#374F06', '#34F2C2', '#875BB8', '#723CDE', '#8C6FE7']
,
    "calculable":true,
    "title":{
        "text":"時間帯別?カテゴリ別?スタッフ別売上",
        "textStyle":{
            "color":"#333",
            "fontSize":12
        },
        "x":"center"
    },
    "toolbox":{
        "feature":{
            "dataView":{
                "show":true,
                "title":"数据视图",
                "readOnly":false,
                "lang":[
                    "数据视图",
                    "关闭",
                    "刷新"
                ]
            },
            "restore":{
                "show":true,
                "title":"还原"
            },
            "saveAsImage":{
                "show":true,
                "title":"保存为图片",
                "type":"png",
                "lang":[
                    "点击保存"
                ]
            },
            "magicType":{
                "show":true,
                "title":{
                    "line":"折线图切换",
                    "stack":"堆积",
                    "bar":"柱形图切换",
                    "tiled":"平铺"
                },
                "type":[
                    "line",
                    "bar",
                    "stack",
                    "tiled"
                ]
            },
            "dataZoom":{
                "show":true,
                "title":{
                    "dataZoom":"区域缩放",
                    "dataZoomReset":"区域缩放后退"
                }
            }
        },
        "show":true,
        "x":"left"
    },
    "tooltip":{
        "trigger":"item",
        "formatter":"{a} <br/>{b} : ¥{c}"
    },
    "legend":{
        "orient":"vertical",
        "data":[
            "AP?H&...",
            "未分類",
            "セット専用",
            "BT",
            "FT",
            "骨盤",
            "オイル",
            "ピオニー基...",
            "小顔",
            "物販",
            "オプション",
            "腸×骨盤 ...",
            "初検費?再...",
            "スポーツ",
            "基本メニュ...",
            "その他(非..."
        ],
        "fulldata":[
            "AP?H&S整体",
            "未分類",
            "セット専用",
            "BT",
            "FT",
            "骨盤",
            "オイル",
            "ピオニー基本コース",
            "小顔",
            "物販",
            "オプション",
            "腸×骨盤 シェイプ",
            "初検費?再発行?指名料等",
            "スポーツ",
            "基本メニュー",
            "その他(非表示)"
        ],
        "x":"right",
        "itemGap":10
    },
    "grid":[
        {x:'10%',y:'5%',width:'75%',height:'20%'},
        {x:'10%',y:'25%',width:'75%',height:'20%'},
        {x:'10%',y:'45%',width:'75%',height:'20%'}
    ],
    "xAxis":[
        {
            "type":"category",
            "gridIndex": 0,
            "data":[
                "00~08",
                "08~09",
                "09~10",
                "10~11",
                "11~12",
                "12~13",
                "13~14",
                "14~15",
                "15~16",
                "16~17",
                "17~18",
                "18~19",
                "19~20",
                "20~21",
                "21~22",
                "22~23",
                "23~24"
            ]
        },
        {
            "type":"category",
            "gridIndex": 1,
            "data":[
                "00~08",
                "08~09",
                "09~10",
                "10~11",
                "11~12",
                "12~13",
                "13~14",
                "14~15",
                "15~16",
                "16~17",
                "17~18",
                "18~19",
                "19~20",
                "20~21",
                "21~22",
                "22~23",
                "23~24"
            ]
        },
        {
            "type":"category",
            "gridIndex": 2,
            "data":[
                "00~08",
                "08~09",
                "09~10",
                "10~11",
                "11~12",
                "12~13",
                "13~14",
                "14~15",
                "15~16",
                "16~17",
                "17~18",
                "18~19",
                "19~20",
                "20~21",
                "21~22",
                "22~23",
                "23~24"
            ]
        }
    ],
    "yAxis":[
        {   "name":"test0",
            "nameLocation":"middle",
            "nameGap":80,
            "type":"value",
            "gridIndex": 0,
            "min":0,
            "max":30000000,
            "axisLabel":{

            }
        },
        {
            "name":"test1",
            "nameLocation":"middle",
            "nameGap":80,
            "type":"value",
            "gridIndex": 1,
            "min":0,
            "max":30000000,
            "axisLabel":{

            }
        },
        {
            "name":"test2",
            "nameLocation":"middle",
            "nameGap":80,
            "type":"value",
            "gridIndex": 2,
            "min":0,
            "max":30000000,
            "axisLabel":{

            }
        }
    ],
    "series":[
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"AP?H&...",
            "type":"bar",
            "stack":"a",
            "data":[
                264229,
                0,
                65524,
                3762751,
                20101239,
                20453347,
                18496504,
                19209474,
                19443282,
                20703896,
                19900311,
                19752928,
                21916969,
                19526530,
                8706415,
                964839
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"未分類",
            "type":"bar",
            "stack":"b",
            "data":[
                2172336,
                5184,
                106179,
                4108041,
                16088874,
                16224366,
                14290371,
                14500701,
                13958458,
                12745263,
                12515289,
                11179709,
                15524134,
                14348807,
                5045304,
                612086
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"セット専用",
            "type":"bar",
            "stack":"b",
            "data":[
                928,
                0,
                0,
                59188,
                4409308,
                4808680,
                3968594,
                4132362,
                4191520,
                3795105,
                3868917,
                3693750,
                4105999,
                3785971,
                1357948,
                157912
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"BT",
            "type":"bar",
            "stack":"b",
            "data":[
                34878,
                0,
                6087,
                447403,
                2643057,
                3187786,
                3355415,
                3633595,
                4053386,
                4046570,
                3884847,
                3522854,
                3714908,
                3193581,
                1357683,
                118836
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"FT",
            "type":"bar",
            "stack":"b",
            "data":[
                26471,
                0,
                0,
                99408,
                794751,
                746674,
                740576,
                900739,
                913499,
                919214,
                911250,
                828149,
                886554,
                812031,
                451626,
                38766
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"骨盤",
            "type":"bar",
            "stack":"b",
            "data":[
                0,
                0,
                0,
                173582,
                988147,
                1067778,
                869614,
                783954,
                882902,
                819207,
                914130,
                685790,
                849705,
                682208,
                152270,
                6780
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"オイル",
            "type":"bar",
            "stack":"b",
            "data":[
                11818,
                0,
                0,
                19748,
                257958,
                349132,
                455518,
                516559,
                449956,
                419482,
                522489,
                463577,
                430970,
                284899,
                273908,
                30358
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"ピオニー基...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                24300,
                36840,
                192884,
                526680,
                376244,
                270186,
                252054,
                423216,
                348305,
                347012,
                333737,
                265380,
                51216,
                0
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"小顔",
            "type":"bar",
            "stack":"b",
            "data":[
                3888,
                0,
                0,
                69790,
                176138,
                321344,
                340125,
                325705,
                344755,
                360343,
                311834,
                336982,
                362604,
                335317,
                126946,
                31582
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"物販",
            "type":"bar",
            "stack":"b",
            "data":[
                2065,
                0,
                18750,
                66588,
                345652,
                255110,
                199937,
                318820,
                376896,
                295902,
                224573,
                269974,
                341705,
                308290,
                193443,
                31492
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"オプション",
            "type":"bar",
            "stack":"b",
            "data":[
                2160,
                0,
                0,
                12096,
                288020,
                260318,
                241639,
                245403,
                288617,
                275537,
                233651,
                238794,
                260744,
                212517,
                121344,
                14466
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"腸×骨盤 ...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                0,
                241102,
                268354,
                193125,
                167873,
                163295,
                205646,
                198115,
                156104,
                139184,
                324596,
                94648,
                0
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"初検費?再...",
            "type":"bar",
            "stack":"a",
            "data":[
                1944,
                0,
                0,
                5184,
                59708,
                88692,
                103896,
                128412,
                137142,
                135406,
                147614,
                136836,
                129560,
                133596,
                82810,
                4321
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"スポーツ",
            "type":"bar",
            "stack":"b",
            "data":[
                0,
                0,
                0,
                17846,
                69524,
                55668,
                93029,
                55425,
                72373,
                79067,
                87340,
                47568,
                51318,
                61650,
                663,
                0
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"基本メニュ...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                0,
                0,
                96000,
                71648,
                65540,
                75060,
                87140,
                51680,
                64660,
                106231,
                28360,
                0,
                0
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"その他(非...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                18207,
                235725,
                191050,
                260270,
                197049,
                216122,
                172831,
                233053,
                147263,
                241960,
                183164,
                57782,
                -1000
            ]
        },{
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"AP?H&...",
            "type":"bar",
            "stack":"a",
            "data":[
                264229,
                0,
                65524,
                3762751,
                20101239,
                20453347,
                18496504,
                19209474,
                19443282,
                20703896,
                19900311,
                19752928,
                21916969,
                19526530,
                8706415,
                964839
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"未分類",
            "type":"bar",
            "stack":"b",
            "data":[
                2172336,
                5184,
                106179,
                4108041,
                16088874,
                16224366,
                14290371,
                14500701,
                13958458,
                12745263,
                12515289,
                11179709,
                15524134,
                14348807,
                5045304,
                612086
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"セット専用",
            "type":"bar",
            "stack":"b",
            "data":[
                928,
                0,
                0,
                59188,
                4409308,
                4808680,
                3968594,
                4132362,
                4191520,
                3795105,
                3868917,
                3693750,
                4105999,
                3785971,
                1357948,
                157912
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"BT",
            "type":"bar",
            "stack":"b",
            "data":[
                34878,
                0,
                6087,
                447403,
                2643057,
                3187786,
                3355415,
                3633595,
                4053386,
                4046570,
                3884847,
                3522854,
                3714908,
                3193581,
                1357683,
                118836
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"FT",
            "type":"bar",
            "stack":"b",
            "data":[
                26471,
                0,
                0,
                99408,
                794751,
                746674,
                740576,
                900739,
                913499,
                919214,
                911250,
                828149,
                886554,
                812031,
                451626,
                38766
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"骨盤",
            "type":"bar",
            "stack":"b",
            "data":[
                0,
                0,
                0,
                173582,
                988147,
                1067778,
                869614,
                783954,
                882902,
                819207,
                914130,
                685790,
                849705,
                682208,
                152270,
                6780
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"オイル",
            "type":"bar",
            "stack":"b",
            "data":[
                11818,
                0,
                0,
                19748,
                257958,
                349132,
                455518,
                516559,
                449956,
                419482,
                522489,
                463577,
                430970,
                284899,
                273908,
                30358
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"ピオニー基...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                24300,
                36840,
                192884,
                526680,
                376244,
                270186,
                252054,
                423216,
                348305,
                347012,
                333737,
                265380,
                51216,
                0
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"小顔",
            "type":"bar",
            "stack":"b",
            "data":[
                3888,
                0,
                0,
                69790,
                176138,
                321344,
                340125,
                325705,
                344755,
                360343,
                311834,
                336982,
                362604,
                335317,
                126946,
                31582
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"物販",
            "type":"bar",
            "stack":"b",
            "data":[
                2065,
                0,
                18750,
                66588,
                345652,
                255110,
                199937,
                318820,
                376896,
                295902,
                224573,
                269974,
                341705,
                308290,
                193443,
                31492
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"オプション",
            "type":"bar",
            "stack":"b",
            "data":[
                2160,
                0,
                0,
                12096,
                288020,
                260318,
                241639,
                245403,
                288617,
                275537,
                233651,
                238794,
                260744,
                212517,
                121344,
                14466
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"腸×骨盤 ...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                0,
                241102,
                268354,
                193125,
                167873,
                163295,
                205646,
                198115,
                156104,
                139184,
                324596,
                94648,
                0
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"初検費?再...",
            "type":"bar",
            "stack":"a",
            "data":[
                1944,
                0,
                0,
                5184,
                59708,
                88692,
                103896,
                128412,
                137142,
                135406,
                147614,
                136836,
                129560,
                133596,
                82810,
                4321
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"スポーツ",
            "type":"bar",
            "stack":"b",
            "data":[
                0,
                0,
                0,
                17846,
                69524,
                55668,
                93029,
                55425,
                72373,
                79067,
                87340,
                47568,
                51318,
                61650,
                663,
                0
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"基本メニュ...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                0,
                0,
                96000,
                71648,
                65540,
                75060,
                87140,
                51680,
                64660,
                106231,
                28360,
                0,
                0
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"その他(非...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                18207,
                235725,
                191050,
                260270,
                197049,
                216122,
                172831,
                233053,
                147263,
                241960,
                183164,
                57782,
                -1000
            ]
        },{
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"AP?H&...",
            "type":"bar",
            "stack":"a",
            "data":[
                264229,
                0,
                65524,
                3762751,
                20101239,
                20453347,
                18496504,
                19209474,
                19443282,
                20703896,
                19900311,
                19752928,
                21916969,
                19526530,
                8706415,
                964839
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"未分類",
            "type":"bar",
            "stack":"b",
            "data":[
                2172336,
                5184,
                106179,
                4108041,
                16088874,
                16224366,
                14290371,
                14500701,
                13958458,
                12745263,
                12515289,
                11179709,
                15524134,
                14348807,
                5045304,
                612086
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"セット専用",
            "type":"bar",
            "stack":"b",
            "data":[
                928,
                0,
                0,
                59188,
                4409308,
                4808680,
                3968594,
                4132362,
                4191520,
                3795105,
                3868917,
                3693750,
                4105999,
                3785971,
                1357948,
                157912
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"BT",
            "type":"bar",
            "stack":"b",
            "data":[
                34878,
                0,
                6087,
                447403,
                2643057,
                3187786,
                3355415,
                3633595,
                4053386,
                4046570,
                3884847,
                3522854,
                3714908,
                3193581,
                1357683,
                118836
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"FT",
            "type":"bar",
            "stack":"b",
            "data":[
                26471,
                0,
                0,
                99408,
                794751,
                746674,
                740576,
                900739,
                913499,
                919214,
                911250,
                828149,
                886554,
                812031,
                451626,
                38766
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"骨盤",
            "type":"bar",
            "stack":"b",
            "data":[
                0,
                0,
                0,
                173582,
                988147,
                1067778,
                869614,
                783954,
                882902,
                819207,
                914130,
                685790,
                849705,
                682208,
                152270,
                6780
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"オイル",
            "type":"bar",
            "stack":"b",
            "data":[
                11818,
                0,
                0,
                19748,
                257958,
                349132,
                455518,
                516559,
                449956,
                419482,
                522489,
                463577,
                430970,
                284899,
                273908,
                30358
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"ピオニー基...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                24300,
                36840,
                192884,
                526680,
                376244,
                270186,
                252054,
                423216,
                348305,
                347012,
                333737,
                265380,
                51216,
                0
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"小顔",
            "type":"bar",
            "stack":"b",
            "data":[
                3888,
                0,
                0,
                69790,
                176138,
                321344,
                340125,
                325705,
                344755,
                360343,
                311834,
                336982,
                362604,
                335317,
                126946,
                31582
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"物販",
            "type":"bar",
            "stack":"b",
            "data":[
                2065,
                0,
                18750,
                66588,
                345652,
                255110,
                199937,
                318820,
                376896,
                295902,
                224573,
                269974,
                341705,
                308290,
                193443,
                31492
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"オプション",
            "type":"bar",
            "stack":"b",
            "data":[
                2160,
                0,
                0,
                12096,
                288020,
                260318,
                241639,
                245403,
                288617,
                275537,
                233651,
                238794,
                260744,
                212517,
                121344,
                14466
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"腸×骨盤 ...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                0,
                241102,
                268354,
                193125,
                167873,
                163295,
                205646,
                198115,
                156104,
                139184,
                324596,
                94648,
                0
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"初検費?再...",
            "type":"bar",
            "stack":"a",
            "data":[
                1944,
                0,
                0,
                5184,
                59708,
                88692,
                103896,
                128412,
                137142,
                135406,
                147614,
                136836,
                129560,
                133596,
                82810,
                4321
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"スポーツ",
            "type":"bar",
            "stack":"b",
            "data":[
                0,
                0,
                0,
                17846,
                69524,
                55668,
                93029,
                55425,
                72373,
                79067,
                87340,
                47568,
                51318,
                61650,
                663,
                0
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"基本メニュ...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                0,
                0,
                96000,
                71648,
                65540,
                75060,
                87140,
                51680,
                64660,
                106231,
                28360,
                0,
                0
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"その他(非...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                18207,
                235725,
                191050,
                260270,
                197049,
                216122,
                172831,
                233053,
                147263,
                241960,
                183164,
                57782,
                -1000
            ]
        }
    ]
};

2:多组grid图中(三组),不同grid的series的stack属性,设置a,b,/ a1,b1,/ a2,b2这样的区分 。图形显示正常,但是同名legend的颜色分配不同
![image](https://cloud.githubusercontent.com/assets/16661632/16002446/41aac910-318a-11e6-89ae-094ea42503d8.png)

option = {
    "color":['#148B3A', '#9148BA', '#CF0EDA', '#2A975E', '#567C18', '#A37F4A', '#2E5F5F', '#DF8EB5', '#B27DC2', '#048225', '#374F06', '#34F2C2', '#875BB8', '#723CDE', '#8C6FE7']
,
    "calculable":true,
    "title":{
        "text":"時間帯別?カテゴリ別?スタッフ別売上",
        "textStyle":{
            "color":"#333",
            "fontSize":12
        },
        "x":"center"
    },
    "toolbox":{
        "feature":{
            "dataView":{
                "show":true,
                "title":"数据视图",
                "readOnly":false,
                "lang":[
                    "数据视图",
                    "关闭",
                    "刷新"
                ]
            },
            "restore":{
                "show":true,
                "title":"还原"
            },
            "saveAsImage":{
                "show":true,
                "title":"保存为图片",
                "type":"png",
                "lang":[
                    "点击保存"
                ]
            },
            "magicType":{
                "show":true,
                "title":{
                    "line":"折线图切换",
                    "stack":"堆积",
                    "bar":"柱形图切换",
                    "tiled":"平铺"
                },
                "type":[
                    "line",
                    "bar",
                    "stack",
                    "tiled"
                ]
            },
            "dataZoom":{
                "show":true,
                "title":{
                    "dataZoom":"区域缩放",
                    "dataZoomReset":"区域缩放后退"
                }
            }
        },
        "show":true,
        "x":"left"
    },
    "tooltip":{
        "trigger":"item",
        "formatter":"{a} <br/>{b} : ¥{c}"
    },
    "legend":{
        "orient":"vertical",
        "data":[
            "AP?H&...",
            "未分類",
            "セット専用",
            "BT",
            "FT",
            "骨盤",
            "オイル",
            "ピオニー基...",
            "小顔",
            "物販",
            "オプション",
            "腸×骨盤 ...",
            "初検費?再...",
            "スポーツ",
            "基本メニュ...",
            "その他(非..."
        ],
        "fulldata":[
            "AP?H&S整体",
            "未分類",
            "セット専用",
            "BT",
            "FT",
            "骨盤",
            "オイル",
            "ピオニー基本コース",
            "小顔",
            "物販",
            "オプション",
            "腸×骨盤 シェイプ",
            "初検費?再発行?指名料等",
            "スポーツ",
            "基本メニュー",
            "その他(非表示)"
        ],
        "x":"right",
        "itemGap":10
    },
    "grid":[
        {x:'10%',y:'5%',width:'75%',height:'20%'},
        {x:'10%',y:'25%',width:'75%',height:'20%'},
        {x:'10%',y:'45%',width:'75%',height:'20%'}
    ],
    "xAxis":[
        {
            "type":"category",
            "gridIndex": 0,
            "data":[
                "00~08",
                "08~09",
                "09~10",
                "10~11",
                "11~12",
                "12~13",
                "13~14",
                "14~15",
                "15~16",
                "16~17",
                "17~18",
                "18~19",
                "19~20",
                "20~21",
                "21~22",
                "22~23",
                "23~24"
            ]
        },
        {
            "type":"category",
            "gridIndex": 1,
            "data":[
                "00~08",
                "08~09",
                "09~10",
                "10~11",
                "11~12",
                "12~13",
                "13~14",
                "14~15",
                "15~16",
                "16~17",
                "17~18",
                "18~19",
                "19~20",
                "20~21",
                "21~22",
                "22~23",
                "23~24"
            ]
        },
        {
            "type":"category",
            "gridIndex": 2,
            "data":[
                "00~08",
                "08~09",
                "09~10",
                "10~11",
                "11~12",
                "12~13",
                "13~14",
                "14~15",
                "15~16",
                "16~17",
                "17~18",
                "18~19",
                "19~20",
                "20~21",
                "21~22",
                "22~23",
                "23~24"
            ]
        }
    ],
    "yAxis":[
        {   "name":"test0",
            "nameLocation":"middle",
            "nameGap":80,
            "type":"value",
            "gridIndex": 0,
            "min":0,
            "max":30000000,
            "axisLabel":{

            }
        },
        {
            "name":"test1",
            "nameLocation":"middle",
            "nameGap":80,
            "type":"value",
            "gridIndex": 1,
            "min":0,
            "max":30000000,
            "axisLabel":{

            }
        },
        {
            "name":"test2",
            "nameLocation":"middle",
            "nameGap":80,
            "type":"value",
            "gridIndex": 2,
            "min":0,
            "max":30000000,
            "axisLabel":{

            }
        }
    ],
    "series":[
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"AP?H&...",
            "type":"bar",
            "stack":"a",
            "data":[
                264229,
                0,
                65524,
                3762751,
                20101239,
                20453347,
                18496504,
                19209474,
                19443282,
                20703896,
                19900311,
                19752928,
                21916969,
                19526530,
                8706415,
                964839
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"未分類",
            "type":"bar",
            "stack":"b",
            "data":[
                2172336,
                5184,
                106179,
                4108041,
                16088874,
                16224366,
                14290371,
                14500701,
                13958458,
                12745263,
                12515289,
                11179709,
                15524134,
                14348807,
                5045304,
                612086
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"セット専用",
            "type":"bar",
            "stack":"b",
            "data":[
                928,
                0,
                0,
                59188,
                4409308,
                4808680,
                3968594,
                4132362,
                4191520,
                3795105,
                3868917,
                3693750,
                4105999,
                3785971,
                1357948,
                157912
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"BT",
            "type":"bar",
            "stack":"b",
            "data":[
                34878,
                0,
                6087,
                447403,
                2643057,
                3187786,
                3355415,
                3633595,
                4053386,
                4046570,
                3884847,
                3522854,
                3714908,
                3193581,
                1357683,
                118836
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"FT",
            "type":"bar",
            "stack":"b",
            "data":[
                26471,
                0,
                0,
                99408,
                794751,
                746674,
                740576,
                900739,
                913499,
                919214,
                911250,
                828149,
                886554,
                812031,
                451626,
                38766
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"骨盤",
            "type":"bar",
            "stack":"b",
            "data":[
                0,
                0,
                0,
                173582,
                988147,
                1067778,
                869614,
                783954,
                882902,
                819207,
                914130,
                685790,
                849705,
                682208,
                152270,
                6780
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"オイル",
            "type":"bar",
            "stack":"b",
            "data":[
                11818,
                0,
                0,
                19748,
                257958,
                349132,
                455518,
                516559,
                449956,
                419482,
                522489,
                463577,
                430970,
                284899,
                273908,
                30358
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"ピオニー基...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                24300,
                36840,
                192884,
                526680,
                376244,
                270186,
                252054,
                423216,
                348305,
                347012,
                333737,
                265380,
                51216,
                0
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"小顔",
            "type":"bar",
            "stack":"b",
            "data":[
                3888,
                0,
                0,
                69790,
                176138,
                321344,
                340125,
                325705,
                344755,
                360343,
                311834,
                336982,
                362604,
                335317,
                126946,
                31582
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"物販",
            "type":"bar",
            "stack":"b",
            "data":[
                2065,
                0,
                18750,
                66588,
                345652,
                255110,
                199937,
                318820,
                376896,
                295902,
                224573,
                269974,
                341705,
                308290,
                193443,
                31492
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"オプション",
            "type":"bar",
            "stack":"b",
            "data":[
                2160,
                0,
                0,
                12096,
                288020,
                260318,
                241639,
                245403,
                288617,
                275537,
                233651,
                238794,
                260744,
                212517,
                121344,
                14466
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"腸×骨盤 ...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                0,
                241102,
                268354,
                193125,
                167873,
                163295,
                205646,
                198115,
                156104,
                139184,
                324596,
                94648,
                0
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"初検費?再...",
            "type":"bar",
            "stack":"a",
            "data":[
                1944,
                0,
                0,
                5184,
                59708,
                88692,
                103896,
                128412,
                137142,
                135406,
                147614,
                136836,
                129560,
                133596,
                82810,
                4321
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"スポーツ",
            "type":"bar",
            "stack":"b",
            "data":[
                0,
                0,
                0,
                17846,
                69524,
                55668,
                93029,
                55425,
                72373,
                79067,
                87340,
                47568,
                51318,
                61650,
                663,
                0
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"基本メニュ...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                0,
                0,
                96000,
                71648,
                65540,
                75060,
                87140,
                51680,
                64660,
                106231,
                28360,
                0,
                0
            ]
        },
        {
            xAxisIndex: [0],
            yAxisIndex: [0],
            "name":"その他(非...",
            "type":"bar",
            "stack":"a",
            "data":[
                0,
                0,
                0,
                18207,
                235725,
                191050,
                260270,
                197049,
                216122,
                172831,
                233053,
                147263,
                241960,
                183164,
                57782,
                -1000
            ]
        },{
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"AP?H&...",
            "type":"bar",
            "stack":"a1",
            "data":[
                264229,
                0,
                65524,
                3762751,
                20101239,
                20453347,
                18496504,
                19209474,
                19443282,
                20703896,
                19900311,
                19752928,
                21916969,
                19526530,
                8706415,
                964839
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"未分類",
            "type":"bar",
            "stack":"b1",
            "data":[
                2172336,
                5184,
                106179,
                4108041,
                16088874,
                16224366,
                14290371,
                14500701,
                13958458,
                12745263,
                12515289,
                11179709,
                15524134,
                14348807,
                5045304,
                612086
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"セット専用",
            "type":"bar",
            "stack":"b1",
            "data":[
                928,
                0,
                0,
                59188,
                4409308,
                4808680,
                3968594,
                4132362,
                4191520,
                3795105,
                3868917,
                3693750,
                4105999,
                3785971,
                1357948,
                157912
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"BT",
            "type":"bar",
            "stack":"b1",
            "data":[
                34878,
                0,
                6087,
                447403,
                2643057,
                3187786,
                3355415,
                3633595,
                4053386,
                4046570,
                3884847,
                3522854,
                3714908,
                3193581,
                1357683,
                118836
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"FT",
            "type":"bar",
            "stack":"b1",
            "data":[
                26471,
                0,
                0,
                99408,
                794751,
                746674,
                740576,
                900739,
                913499,
                919214,
                911250,
                828149,
                886554,
                812031,
                451626,
                38766
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"骨盤",
            "type":"bar",
            "stack":"b1",
            "data":[
                0,
                0,
                0,
                173582,
                988147,
                1067778,
                869614,
                783954,
                882902,
                819207,
                914130,
                685790,
                849705,
                682208,
                152270,
                6780
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"オイル",
            "type":"bar",
            "stack":"b1",
            "data":[
                11818,
                0,
                0,
                19748,
                257958,
                349132,
                455518,
                516559,
                449956,
                419482,
                522489,
                463577,
                430970,
                284899,
                273908,
                30358
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"ピオニー基...",
            "type":"bar",
            "stack":"a1",
            "data":[
                0,
                0,
                24300,
                36840,
                192884,
                526680,
                376244,
                270186,
                252054,
                423216,
                348305,
                347012,
                333737,
                265380,
                51216,
                0
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"小顔",
            "type":"bar",
            "stack":"b1",
            "data":[
                3888,
                0,
                0,
                69790,
                176138,
                321344,
                340125,
                325705,
                344755,
                360343,
                311834,
                336982,
                362604,
                335317,
                126946,
                31582
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"物販",
            "type":"bar",
            "stack":"b1",
            "data":[
                2065,
                0,
                18750,
                66588,
                345652,
                255110,
                199937,
                318820,
                376896,
                295902,
                224573,
                269974,
                341705,
                308290,
                193443,
                31492
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"オプション",
            "type":"bar",
            "stack":"b1",
            "data":[
                2160,
                0,
                0,
                12096,
                288020,
                260318,
                241639,
                245403,
                288617,
                275537,
                233651,
                238794,
                260744,
                212517,
                121344,
                14466
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"腸×骨盤 ...",
            "type":"bar",
            "stack":"a1",
            "data":[
                0,
                0,
                0,
                0,
                241102,
                268354,
                193125,
                167873,
                163295,
                205646,
                198115,
                156104,
                139184,
                324596,
                94648,
                0
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"初検費?再...",
            "type":"bar",
            "stack":"a1",
            "data":[
                1944,
                0,
                0,
                5184,
                59708,
                88692,
                103896,
                128412,
                137142,
                135406,
                147614,
                136836,
                129560,
                133596,
                82810,
                4321
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"スポーツ",
            "type":"bar",
            "stack":"b1",
            "data":[
                0,
                0,
                0,
                17846,
                69524,
                55668,
                93029,
                55425,
                72373,
                79067,
                87340,
                47568,
                51318,
                61650,
                663,
                0
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"基本メニュ...",
            "type":"bar",
            "stack":"a1",
            "data":[
                0,
                0,
                0,
                0,
                0,
                96000,
                71648,
                65540,
                75060,
                87140,
                51680,
                64660,
                106231,
                28360,
                0,
                0
            ]
        },
        {
            xAxisIndex: [1],
            yAxisIndex: [1],
            "name":"その他(非...",
            "type":"bar",
            "stack":"a1",
            "data":[
                0,
                0,
                0,
                18207,
                235725,
                191050,
                260270,
                197049,
                216122,
                172831,
                233053,
                147263,
                241960,
                183164,
                57782,
                -1000
            ]
        },{
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"AP?H&...",
            "type":"bar",
            "stack":"a2",
            "data":[
                264229,
                0,
                65524,
                3762751,
                20101239,
                20453347,
                18496504,
                19209474,
                19443282,
                20703896,
                19900311,
                19752928,
                21916969,
                19526530,
                8706415,
                964839
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"未分類",
            "type":"bar",
            "stack":"b2",
            "data":[
                2172336,
                5184,
                106179,
                4108041,
                16088874,
                16224366,
                14290371,
                14500701,
                13958458,
                12745263,
                12515289,
                11179709,
                15524134,
                14348807,
                5045304,
                612086
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"セット専用",
            "type":"bar",
            "stack":"b2",
            "data":[
                928,
                0,
                0,
                59188,
                4409308,
                4808680,
                3968594,
                4132362,
                4191520,
                3795105,
                3868917,
                3693750,
                4105999,
                3785971,
                1357948,
                157912
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"BT",
            "type":"bar",
            "stack":"b2",
            "data":[
                34878,
                0,
                6087,
                447403,
                2643057,
                3187786,
                3355415,
                3633595,
                4053386,
                4046570,
                3884847,
                3522854,
                3714908,
                3193581,
                1357683,
                118836
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"FT",
            "type":"bar",
            "stack":"b2",
            "data":[
                26471,
                0,
                0,
                99408,
                794751,
                746674,
                740576,
                900739,
                913499,
                919214,
                911250,
                828149,
                886554,
                812031,
                451626,
                38766
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"骨盤",
            "type":"bar",
            "stack":"b2",
            "data":[
                0,
                0,
                0,
                173582,
                988147,
                1067778,
                869614,
                783954,
                882902,
                819207,
                914130,
                685790,
                849705,
                682208,
                152270,
                6780
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"オイル",
            "type":"bar",
            "stack":"b2",
            "data":[
                11818,
                0,
                0,
                19748,
                257958,
                349132,
                455518,
                516559,
                449956,
                419482,
                522489,
                463577,
                430970,
                284899,
                273908,
                30358
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"ピオニー基...",
            "type":"bar",
            "stack":"a2",
            "data":[
                0,
                0,
                24300,
                36840,
                192884,
                526680,
                376244,
                270186,
                252054,
                423216,
                348305,
                347012,
                333737,
                265380,
                51216,
                0
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"小顔",
            "type":"bar",
            "stack":"b2",
            "data":[
                3888,
                0,
                0,
                69790,
                176138,
                321344,
                340125,
                325705,
                344755,
                360343,
                311834,
                336982,
                362604,
                335317,
                126946,
                31582
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"物販",
            "type":"bar",
            "stack":"b2",
            "data":[
                2065,
                0,
                18750,
                66588,
                345652,
                255110,
                199937,
                318820,
                376896,
                295902,
                224573,
                269974,
                341705,
                308290,
                193443,
                31492
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"オプション",
            "type":"bar",
            "stack":"b2",
            "data":[
                2160,
                0,
                0,
                12096,
                288020,
                260318,
                241639,
                245403,
                288617,
                275537,
                233651,
                238794,
                260744,
                212517,
                121344,
                14466
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"腸×骨盤 ...",
            "type":"bar",
            "stack":"a2",
            "data":[
                0,
                0,
                0,
                0,
                241102,
                268354,
                193125,
                167873,
                163295,
                205646,
                198115,
                156104,
                139184,
                324596,
                94648,
                0
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"初検費?再...",
            "type":"bar",
            "stack":"a2",
            "data":[
                1944,
                0,
                0,
                5184,
                59708,
                88692,
                103896,
                128412,
                137142,
                135406,
                147614,
                136836,
                129560,
                133596,
                82810,
                4321
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"スポーツ",
            "type":"bar",
            "stack":"b2",
            "data":[
                0,
                0,
                0,
                17846,
                69524,
                55668,
                93029,
                55425,
                72373,
                79067,
                87340,
                47568,
                51318,
                61650,
                663,
                0
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"基本メニュ...",
            "type":"bar",
            "stack":"a2",
            "data":[
                0,
                0,
                0,
                0,
                0,
                96000,
                71648,
                65540,
                75060,
                87140,
                51680,
                64660,
                106231,
                28360,
                0,
                0
            ]
        },
        {
            xAxisIndex: [2],
            yAxisIndex: [2],
            "name":"その他(非...",
            "type":"bar",
            "stack":"a2",
            "data":[
                0,
                0,
                0,
                18207,
                235725,
                191050,
                260270,
                197049,
                216122,
                172831,
                233053,
                147263,
                241960,
                183164,
                57782,
                -1000
            ]
        }
    ]
};

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):
  • 浏览器类型和版本 (Browser version):
  • 操作系统类型和版本 (OS Version):

重现步骤 (Steps to reproduce)

期望结果 (Expected behaviour)

希望帮忙
实现
不同grid中同名legend的颜色分配统一

可能哪里有问题 (What went wrong)

stack 属性设置冲突

ECharts配置项 (ECharts option)

option = {

}

其他信息 (Other comments)

@pissang
Copy link
Contributor

pissang commented Jun 14, 2016

跟 stack 无关,76922b9 提交中已经优化这点,下个版本支持

@pissang pissang closed this as completed Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants