ant-design-charts
ant-design-charts copied to clipboard
🐛[BUG] Mix chart plots multi axis legends alignment
🐛 bug 描述 [详细地描述 bug,让大家都能理解]
In the Mix chart with plots and two y-axis, the legends are aligned one below the other for each axis. Can we align all the legends (both left y-axis and right y-axis) on the same line?
My plots list is as below
plots={[
{
type: 'line',
options: {
data: [
{
date: '2015-02',
value: 160,
type: 'one_type',
},
{
date: '2015-08',
value: 245,
type: 'one_type',
},
{
date: '2016-01',
value: 487,
type: 'one_type',
},
{
date: '2017-02',
value: 500,
type: 'one_type',
},
{
date: '2018-01',
value: 503,
type: 'two_type',
},
{
date: '2018-08',
value: 514,
type: 'two_type',
},
],
xField: 'date',
yField: 'value',
seriesField: 'type',
line: {
style: {
stroke: COLORS.fnGrey,
lineWidth: 1,
opacity: 0.7,
},
},
},
point: {
size: 5,
shape: 'custom-point',
},
},
},
{
type: 'area',
options: {
data: [
{
date: '2015-02',
value: null,
type1: '1234',
},
{
date: '2015-08',
value: 0.029,
type1: '1234',
},
{
date: '2016-01',
value: 0.094,
type1: '1234',
},
{
date: '2017-02',
value: 0.148,
type1: '1234',
},
{
date: '2018-01',
value: 0.055,
type1: '1234',
},
{
date: '2018-08',
value: 0.045,
type1: '1234',
},
],
xField: 'date',
yField: 'value',
seriesField: 'type1',
yAxis: {
line: {
style: {
stroke: COLORS.fnGrey,
lineWidth: 1,
opacity: 0.7,
},
},
grid: null,
position: 'right',
},
meta: {
value: {
formatter: (v: any) => ${v}%
,
},
},
smooth: true,
color: '#1AAF8B',
areaStyle: {
fill: l(270) 0:#ffffff 0.5:#1AAF8B 1:#1AAF8B
,
},
line: {
style: {
lineDash: [5, 5],
},
},
},
},
]}
📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]
🏞 期望结果 [描述你原本期望看到的结果]
💻 复现代码 [提供可复现的代码,仓库,或线上示例]
© 版本信息
- ant-design-charts 版本: [e.g. 0.9.0]
- 浏览器环境
- 开发环境 [e.g. mac OS]
🚑 其他信息 [如截图等其他信息可以贴在这里]
Hi, Any updates on this issue?
Also waiting for this, but looks like library is not maintained anymore.