Giter VIP home page Giter VIP logo

Comments (5)

pearmini avatar pearmini commented on June 19, 2024 1

tickCount 有效,但是你第一张图的 X 是离散数据,如果你希望转换成连续数据,可以如下:

chart.line().data().encode('x', d => new Date(d.date))

rotate 不恢复确实是一个问题,可以排查一下。

from g2.

pearmini avatar pearmini commented on June 19, 2024

可以通过 labelFilter 过滤一些:

chart.interval().axis('x', { labelFilter: d => ... })

from g2.

yk9710 avatar yk9710 commented on June 19, 2024

可以通过labelFilter过滤一些:

chart.interval().axis('x', { labelFilter: d => ... })

不支持4.x中的tickcount这种设置吗。而且还有个bug是,在最开始刻度的label是竖向的后,后面数据就算再少刻度的label方向也不会改变,5.x的官方demo可以复现,拖动外层容易宽度即可,测试了下4.x是没有这种问题的

image

from g2.

yk9710 avatar yk9710 commented on June 19, 2024

tickCount 有效,但是你第一张图的 X 是离散数据,如果你希望转换成连续数据,可以如下:

chart.line().data().encode('x', d => new Date(d.date))

rotate 不恢复确实是一个问题,可以排查一下。

服务器返回到数据就是字符串形式的时间,而且我们业务环境还要按照月 ,天,周进行聚合展示,在不同的筛选情况下X轴下面展示的label也应该不一样,能不能像4.x一样由G2内部自行判断,当刻度过多的时候根据外层容器宽度取一个最大值

from g2.

jiuxiangyangguang avatar jiuxiangyangguang commented on June 19, 2024

有人解决了吗, 看官网例子x轴标签都是可以自动省略的, 看了一天的文档问了AI都没办法解决, 官网上面的数据都是请求的,把实际请求地址改为真实数据后,数据一多x轴时间就旋转了90度,太反人类了吧, 还不支持自定义显示个数 全是bug

from g2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.