Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

g2plot 双轴图加线图 不能实现分组柱形图双y轴 #5518

Closed
18211365467 opened this issue Sep 7, 2023 · 1 comment
Closed

g2plot 双轴图加线图 不能实现分组柱形图双y轴 #5518

18211365467 opened this issue Sep 7, 2023 · 1 comment

Comments

@18211365467
Copy link

  • G2 Version:
  • Platform:
  • Mini Showcase(like screenshots):
  • CodePen Link:
@pearmini
Copy link
Member

pearmini commented Sep 7, 2023

G2 5.0 代码:

import { Chart } from "@antv/g2";

const chart = new Chart({ container: "container" });

chart.options({
  type: "view",
  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 },
  ],
  children: [
    {
      type: "interval",
      encode: {
        x: "time",
        y: "waiting",
        color: () => "waiting",
        series: () => "waiting",
      },
      axis: { y: { title: "Waiting" } },
    },
    {
      type: "interval",
      encode: {
        x: "time",
        y: "people",
        color: () => "people",
        series: () => "people",
      },
      scale: { y: { independent: true } },
      axis: { y: { position: "right", grid: null, title: "People" } },
    },
  ],
});

chart.render();

@antvis antvis locked and limited conversation to collaborators Sep 7, 2023
@pearmini pearmini converted this issue into discussion #5519 Sep 7, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants