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

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

Comments

Projects
None yet
4 participants
@snowlin

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

This comment has been minimized.

Show comment
Hide comment
@pissang

pissang Dec 21, 2016

Contributor

log 轴不支持 stack

Contributor

pissang commented Dec 21, 2016

log 轴不支持 stack

@pissang pissang closed this Dec 21, 2016

@liubei1

This comment has been minimized.

Show comment
Hide comment
@liubei1

liubei1 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]
    }
]

}`

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

This comment has been minimized.

Show comment
Hide comment
@100pah

100pah Dec 23, 2016

Member

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

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