Comments (13)
恩,这个报错信息是 F2 抛出的,你能否把能复现这个错误信息的代码(包括数据)贴给偶? 我定位下~~~
from wx-f2.
demo.zip
代码打包了, 数据里面有一部分
from wx-f2.
奇怪咧,你的demo 我都没有报错。。。 你看下你的 F2 版本号是多少?
另外,如果是时间类型的数据的话,我建议使用时间戳或者完整的格式 'YYYY-MM-DD HH:mm:ss',然后在使用 chart.source() 那里声明下 type: 'timeCat'
from wx-f2.
我直接pull了一遍,F2应该是最新的
情况是这样的, 这个表需要的数据是数据库当天的所有数据, 原来的操作是描点连线就完事了类似于这种 连续曲线图
但现在需求是没有数据的地方不连线,就是断层图, 但数据库里面的数据不是连续的(比如说上一个数据时间是2018-06-01 11:55:00, 下一个可能是2018-06-01 15:55:00),这两个点就不能连线
我想到的办法是前端手动填充数据,2018-06-01 11:55:00 + 1min ---> 2018-06-01 15:55:00(数据都设置为整点, 如果以秒级为单位的话, 数据填充量太大了) 这中间的value = null 这样就绘出断层图了
(这样描述应该很清晰了吧)
但是为什么报错了呢... 应该和前面的曲线图是一样的啊 就是多了一些空数据
你是模拟器点击预览也没报错吗?(小声)
或者有没有什么好的办法 不填充空数据绘制断层图的_(:з」∠)_
from wx-f2.
我真机以及预览都看了,么有报错。你的思路是没有问题的。
你把你处理后的数据给我吧,就是能够产生这个报错的问题的代码和数据,如果有啥不方便的,你把数据字段啥的改改,这样偶才好定位~~~~
from wx-f2.
from wx-f2.
找到原因了,如果传进来的数据 value 字段全部是 null 就会导致这个问题。比如:
var data = [
{ type: "湿度/%", value: null, date: "2018-06-01 11:09:00" },
{ type: "温度/℃", value: null, date: "2018-06-01 11:09:00" }
];
是 F2 内部在数据处理模块没有处理好,我马上修复一下,感谢反馈!!!!
from wx-f2.
找到问题就好!!!!
from wx-f2.
在 @antv/[email protected] 这个版本里面修复了,你可以 download 更新一下 f2-canvas/lib 下的 f2.js
from wx-f2.
from wx-f2.
from wx-f2.
不是啊 数据是正常中间穿插着null,这样才能画出断层图呀,全是null就没有绘图的必要了
from wx-f2.
当你的 Y 轴数据全是 null 的时候就会出现你截图的情况,所以我在想是不是传给 chart 对象的源数据的问题,你调试下看看调用到 chart.source(data) 的时候,data 是什么样的吧。
from wx-f2.
Related Issues (20)
- 导入工具提示: app.json 未找到
- taro微信小程序引入f2后,报错了 HOT 4
- 跪求大佬支持remax!!!! HOT 1
- 请问可以提供一个小demo吗 HOT 2
- edit HOT 1
- IOS下不显示 折线图平移图表
- 小程序交互的demo
- 【iOS】横屏-位置识别有问题 点击对应的柱状图-柱子并不会显示对应的tooltip
- 按照官方demo在小程序中雷达图不展示 HOT 1
- 微信小程序上可以画点的时候可以替换为图片吗,我看包里面方法没有提供image和icon类型的key HOT 2
- 异步请求后,渲染到图表上 HOT 1
- 小程序版怎么手动加载呢?
- Hello, how can I solve the problem of chart.pieLabel is not a function when the pie chart reports an error? 你好,请问饼图报错 chart.pieLabel is not a function 怎么解决呢? HOT 8
- tooltip 在ios和android真机小程序上表现不一样 HOT 1
- dont support performanceObserver tepy = paint
- 请统一到 https://github.com/antvis/F2/issues 提交问题和反馈,谢谢
- 在小程序中无法使用 HOT 4
- 折线图部分虚线是不是做不了啊,没有view()实例
- wx-f2 文档链接失效 HOT 1
- taro 微信小程序使用antv f2 HOT 1
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 wx-f2.