toolbox.feature.magicType set different colors

The first is the inspiration from https://segmentfault.com/q/1010000013977846 here. Although the problem has not been completely solved, I have an idea and then solved it. Haha

       var keyGroupOption = {
            toolbox: { // 工具箱
                show: true,
                feature: {
                    dataZoom: {
                        show:false,
                        yAxisIndex: 'none'
                    },

                    dataView: {
                        show: true,
                        iconStyle: {
                            normal: {
                                borderColor: '#ffffff'
                            }
                        }
                    },
                    magicType: {type: ['line', 'bar'],
                        iconStyle: {
                            borderColor: '#ffffff'
                        },
                        emphasis:{
                            iconStyle: {
                                borderColor: '#ffffff'
                            },
                        }
                        },
                    restore: {//配置项还原。
                        show: true,
                        iconStyle: {
                            borderColor: '#ffffff'
                        },
                        emphasis:{
                            iconStyle: {
                                borderColor: '#ffffff'
                            },
                        }
                    },
                    saveAsImage: {//保存为图片。
                        show: true,
                        iconStyle: {
                            borderColor: '#ffffff'
                        },
                        emphasis:{
                            iconStyle: {
                                borderColor: '#ffffff'
                            },
                        }
                    }
                }
            }
      }

 

Published 248 original articles · Like 602 · Visit 1.08 million +

Guess you like

Origin blog.csdn.net/qq_32963841/article/details/104036741