Comments (8)
ok,谢谢
from g2.
每个组里面数据都不一样,可以将数据按照 color 字段先排序。
from g2.
有demo吗
from g2.
chart
.interval()
.data(xx.sort((a, b) => a['产品'] - b['产品']))
.transform({
type: 'dodgeX',
orderBy: 'series', // 这里
reverse: true, // 这里
})
.encode('x', '品牌')
.encode('y', '上期收入')
.encode('color', '产品')
.encode('series', '产品');
chart.render();
from g2.
6303能答疑一下下吗
from g2.
from g2.
我再看一下,有点奇怪这个问题
from g2.
先这样写:
chart
.interval()
.data(xx)
.encode('x', '品牌')
.encode('y', '上期收入')
.encode('color', '产品')
.encode('series', '产品');
chart.render();
这种和 dodgeX 应该是等价的,我进一步看问题在哪。
from g2.
Related Issues (20)
- 不支持用ref去存储chart实例嘛? HOT 1
- 使用antv g2 v4版本,在画布中创建多个view 超出部分被隐藏了
- label偶尔显示不全 HOT 2
- 直角坐标系坐标轴数据都是0的情况下,如何设置轴线在最底部? HOT 1
- 折线图悬停提示不正确 HOT 1
- 堆叠图缺失数据,切换图例,导致柱状图显示错误 HOT 1
- 官方示例中toolTip为false为什么还会有悬浮框显示 HOT 1
- 多个漏斗图同时渲染时,其中1个或者两个都会,渲染之后又消失掉 HOT 2
- 折线图设置滚动条后,为0值的point样式在滚动之后,会被坐标轴的线给挡住 HOT 1
- 柱折组合图。.scale('series', { independent: true })表示含义是什么
- 【G2 多轴图】多数据的柱形折线混合图,拖动滚动条,tooltip框内容显示错误 (BUG情况与6335相同,但是还有两个小BUG一并列出)
- 雷达图,维度和颜色 拖入同一个字段,tooltip 内展示的颜色不正确
- 饼图怎么支持排序 HOT 1
- 如何能调节shape的层级 使其不遮挡pieLabel
- 图形宽度设置百分比 HOT 1
- 散点图label 设置 position:inside 后 ,如何实现 内容 超出省略的功能
- 分组条形图提示错误 HOT 1
- chrome 85版本 配置了polyfill之后饼图的tooltip依旧报错
- 【g2】 【v5.2.1】报错,图表无法显示;报错内容:ReferenceError: group is not defined
- 【V5】legend itemMarker 的内置类型是否可以扩展?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g2.