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

echarts 对数展示叠加柱状图的时候 数字为0 有一个bug #4743

Closed
snowlin opened this issue Dec 21, 2016 · 3 comments
Closed

echarts 对数展示叠加柱状图的时候 数字为0 有一个bug #4743

snowlin opened this issue Dec 21, 2016 · 3 comments

Comments

@snowlin
Copy link

snowlin commented Dec 21, 2016

One-line summary [问题简述] 看图

image

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.2.3
  • Browser version [浏览器类型和版本]: 谷歌浏览器 54.0.2840.99 m
  • OS Version [操作系统类型和版本]:win7

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

 option = {
    title: {
        text: '对数轴示例',
        left: 'center'
    },
    tooltip: {
        trigger: 'axis'
       
    },
    legend: {
        left: 'left',
        data: ['2的指数', '3的指数']
    },
    xAxis: {
        type: 'category',
        name: 'x',
        splitLine: {show: false},
        data: ['一', '二', '三', '四', '五', '六', '七', '八', '九']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    yAxis: {
        type: 'log',
        name: 'y'
    },
    series: [
        {
            name: '3的指数',
            type: 'bar',
             stack: '总量',
            data: [0, 3, 9, 0, 81, 247, 741, 2223, 6669]
        },
        {
            name: '2的指数',
            type: 'bar',
             stack: '总量',
            data: [1, 2, 4, 8, 16, 0, 64, 128, 256]
        },
        {
            name: '1/2的指数',
            type: 'bar',
             stack: '总量',
            data: [1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512]
        }
    ]
};

Other comments [其他信息]

@pissang
Copy link
Contributor

pissang commented Dec 21, 2016

log 轴不支持 stack

@pissang pissang closed this as completed Dec 21, 2016
@liubei1
Copy link

liubei1 commented Dec 22, 2016

根stack没有关系吧,只要数字为0的时候,log类型图表就会出现问题了
`option = {
legend: {
data:['critical']
},
xAxis: {
type: 'category',

    data: ["一", "二", "三", "四", "五", "六", "七", "八", "九"]

},
yAxis: {
    type: 'log'
},
series: [{
        name:'critical',
        type:'line',
        data: [0, 10, 6,10, 60,90,8,66,100]
    }
]

}`

@100pah
Copy link
Member

100pah commented Dec 23, 2016

log 0 没有意义。对轴的最大值影响倒是可以改进下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants