Questions tagged [g2plot]

11 questions
4
votes
1 answer

Ant design charts Space between points proportional to x-axis values

How can I realise space between points proportional to x-axis values with @ant-design/charts. CodeSandbox: https://codesandbox.io/s/lucid-williams-v5jx9?file=/src/Chart.jsx
Muhammed
  • 97
  • 8
2
votes
2 answers

Data wrong display using @antv/g2plot.js version 2+

I have been trying to use G2plot (https://g2plot.antv.vision/) for a basic line graph. I made some tests a while ago with the 1.28 version and it was working fine. I removed some config that became obsolete and tried the latest version but the…
lioleveau
  • 518
  • 1
  • 6
  • 23
1
vote
1 answer

React enzyme jest test cases are failing with antv g2plot

I'm using the React Enzyme Jest module to test my React app which contains the antv/g2plot module for charts. While I am using the module, the test case isn't running but after removing it, it's working perfectly fine. There is a problem with the…
Coolen
  • 75
  • 1
  • 6
0
votes
0 answers

How to build a Line chart on g2plot so that the series are built from numeric fields

guys! I'm woking with library using full api of https://g2plot.antv.antgroup.com/en/api/plots/line (https://consta.design/libs/charts/components-line-stable/dev) The data looks like an array of similar objects {category: 'Cat1', sum: 2681, avg:…
0
votes
0 answers

How can I make this same graph ant g2 plot

I'm trying to implement this same graph, I almost have it but I can't put the titles that are in gray, for each category to each subgroup, do you know how to do it? that's how I have it so far I am using react and ant g2 plot, I leave you the link…
0
votes
1 answer

antd charts: remove truncation of text in legend

I'd like to achieve something fairly simple inside an antd chart. Antd is truncation legend items and is adding "...". I want to remove that truncation and instead display the whole label. I tried various approaches, e.g. itemValue: {formatter...}…
nerdess
  • 10,051
  • 10
  • 45
  • 55
0
votes
1 answer

G2Plot with nextjs. Stacked graph not working

I want to create an stacked graph using G2plot. Because of this I have to create 2 files one for the component. Another for the page that will call component using dynamic I import React, { useEffect, useRef } from "react"; import { Bar } from…
funnygiraffe
  • 13
  • 2
  • 5
0
votes
1 answer

Synchronise 2 charts interactions with g2plot

I'm using G2plot (https://github.com/antvis/G2Plot) and I want to synchronise my 2 charts when I have a hover on one chart ? For compare as a benchmark. I want keep the same the hover effect (the background) and display tooltip on both charts. . Do…
Metra
  • 393
  • 5
  • 20
0
votes
1 answer

G2Plot AntV library. Customize a Bullet Chart tooltip (display names instead of indices)

Is it possible to customize a tooltip of a Bullet Chart to display names instead of indices?
0
votes
1 answer

G2Plot chart stack wrong column

EDIT: add a snippet, code below: