Skip to content

[Bug]: 双轴图-柱线混合,折线图配置area后,柱状图配置的style: { columnWidthRatio: 0.5}会失效。 #3090

@a426855a5a5

Description

@a426855a5a5

Describe the bug / 问题描述

双轴图-柱线混合,折线图配置区域后,柱状图配置的样式: { columnWidthRatio: 0.5}会失效。

code example / 代码事例

const config = {
xField: 'time',
data: [
{ time: '10:10', call: 4, waiting: 2, people: 2 },
{ time: '10:15', call: 2, waiting: 6, people: 3 },
{ time: '10:20', call: 13, waiting: 2, people: 5 },
{ time: '10:25', call: 9, waiting: 9, people: 1 },
{ time: '10:30', call: 5, waiting: 2, people: 3 },
{ time: '10:35', call: 8, waiting: 2, people: 1 },
{ time: '10:40', call: 13, waiting: 1, people: 2 },
],
legend: {
color: {
itemMarker: (v) => {
if (v === 'waiting') return 'rect';
return 'smooth';
},
},
},
scale: { y: { domainMax: 10 } },
children: [
{
type: 'interval',
yField: 'waiting',
style: { columnWidthRatio: 0.5},
},
{
type: 'line',
yField: 'people',
shapeField: 'smooth',
scale: { color: { relations: [['people', '#fdae6b']] } },
axis: { y: { position: 'right' } },
style: { lineWidth: 2 },
area: { },
},
],
};
return <DualAxes {...config} />;

img / 截图

Image

Reproduction link / 复现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

v2.6.5

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't workingplots统计图表G2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions