条形图的markPoint显示不正确 #2641

Closed
langman opened this Issue Feb 23, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@langman

langman commented Feb 23, 2016

设置如下:
markPoint: { data: [{ type: 'max', name: '最大值' }, { type: 'min', name: '最小值' }] },

@langman langman changed the title from 条形图最大值和最小值显示不正确 to 条形图的markPoint显示不正确 Feb 23, 2016

@zhump

This comment has been minimized.

Show comment
Hide comment
@zhump

zhump Feb 23, 2016

可以提供一下详细的 demo配置吗

zhump commented Feb 23, 2016

可以提供一下详细的 demo配置吗

@langman

This comment has been minimized.

Show comment
Hide comment
@langman

langman Feb 23, 2016

@zhump
var option={
    title: {
        text: '样例',
        x: 'center',
        y: 'top',
        textStyle: {
            fontSize: 12
        }
    },
    color: ['#47b4e1', '#65ce2c', '#f2dd2f', '#ffb64d', '#ff8b66'],
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    toolbox: {
        show: true,
        feature: {
            dataView: {
                show: true,
                readOnly: true
            },
            restore: {
                show: true
            },
            saveAsImage: {
                show: true
            }
        }
    },
    legend: {
        data: ['样例一'],
        orient: 'horizontal',
        y: 'bottom'
    },
    xAxis: [{
        type: 'value'
    }],
    yAxis: [{
        type: 'category',
        data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul']
    }],
    series: [{
        name: '样例一',
        type: 'bar',
        data: [120, 132, 101, 134, 90, 230, 210],
        itemStyle: {
            normal: {
                label: {
                    show: true,
                    position: 'insideRight'
                }
            }
        },
        markPoint: {
            data: [{
                type: 'max',
                name: '最大值'
            }, {
                type: 'min',
                name: '最小值'
            }]
        },
        markLine: {
            data: [{
                type: 'average',
                name: '平均值'
            }]
        }
    }]
}

langman commented Feb 23, 2016

@zhump
var option={
    title: {
        text: '样例',
        x: 'center',
        y: 'top',
        textStyle: {
            fontSize: 12
        }
    },
    color: ['#47b4e1', '#65ce2c', '#f2dd2f', '#ffb64d', '#ff8b66'],
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow'
        }
    },
    toolbox: {
        show: true,
        feature: {
            dataView: {
                show: true,
                readOnly: true
            },
            restore: {
                show: true
            },
            saveAsImage: {
                show: true
            }
        }
    },
    legend: {
        data: ['样例一'],
        orient: 'horizontal',
        y: 'bottom'
    },
    xAxis: [{
        type: 'value'
    }],
    yAxis: [{
        type: 'category',
        data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul']
    }],
    series: [{
        name: '样例一',
        type: 'bar',
        data: [120, 132, 101, 134, 90, 230, 210],
        itemStyle: {
            normal: {
                label: {
                    show: true,
                    position: 'insideRight'
                }
            }
        },
        markPoint: {
            data: [{
                type: 'max',
                name: '最大值'
            }, {
                type: 'min',
                name: '最小值'
            }]
        },
        markLine: {
            data: [{
                type: 'average',
                name: '平均值'
            }]
        }
    }]
}
@zhump

This comment has been minimized.

Show comment
Hide comment
@zhump

zhump Feb 23, 2016

额。。确实有问题。。。tooltip 显示是正确的,,markPoint显示的不对,两个不一致。。 等待大神回复 @pissang

zhump commented Feb 23, 2016

额。。确实有问题。。。tooltip 显示是正确的,,markPoint显示的不对,两个不一致。。 等待大神回复 @pissang

@pissang

This comment has been minimized.

Show comment
Hide comment
@pissang

pissang Feb 24, 2016

Contributor

谢谢反馈,这个是 markPoint 显示成 y 轴的值了

Contributor

pissang commented Feb 24, 2016

谢谢反馈,这个是 markPoint 显示成 y 轴的值了

@pissang pissang added the bug label Feb 24, 2016

@pissang pissang closed this in 58bab74 Feb 26, 2016

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