Comments (11)
可以第二个交易返回全量数据把之前的覆盖掉
from kline.
ps. 切换请求的时候, K线实例修改url属性就行了, 其实不用调用resend
from kline.
怎么覆盖呢。我把原来的kline.data清空没有用,将整个div empty掉,然后将kline = null,都没有作用。切换之后显示的还是上一个数据源的图
from kline.
我找到原因是我切换的时候还会请求一次原来的地址,但不知道怎么解决这个问题
from kline.
kline = new Kline({
element: "#kline_container",
width: 1400,
height: 600,
theme: 'dark', // light/dark
language: 'zh-cn', // zh-cn/en-us/zh-tw
ranges: ["1w", "1d", "1h", "30m", "15m", "5m", "1m", "line"],
symbol: "coin5/coin4",
symbolName: "COIN5_COIN4",
type: "poll", // poll/socket
url: url,
limit: 1000,
intervalTime: 5000,
debug: true,
showTrade: false,
onResize: function (width, height) {
console.log("chart resized: " + width + " " + height);
},
onRangeChange: function (range) {
if (range == 604800000) {
space_time = 30 * 7;
period = 'week';
} else if(range == 86400000){
space_time = 30;
period = 'day';
} else if(range == 3600000){
period = 'hour';
} else if(range == 1800000){
period = '30mins';
} else if(range == 900000){
period = '15mins';
} else if (range == 300000) {
period = '5mins';
} else if(range == 60000){
period = 'min';
}
var obj = {
exchange: exchange,
currency: coin,
time: (new Date().getTime() - 86400000 * space_time + gapTime)/1000,
period: period
};
console.log(obj);
var params = $.param(obj);
kline.url = CONFIG.URL + 'k2/?' + params;
}
});
kline.draw();
from kline.
可能是个bug,你可以查一下问题,然后给我 pull request
from kline.
那这个插件有办法设置默认的k线类型吗?比如默认设为5分钟k线。他的默认k线好像一直在变,跟cookie有关
from kline.
默认的应该是你上次看的类型, cookie里有一项 chartSettings 可以看一眼
from kline.
@HEJIN2016 请问这个问题解决了吗?我也遇到了同样的问题,但是找了两天没有解决,方便帮下忙吗?谢谢啦!
from kline.
@HEJIN2016 请问这个问题解决了吗?我也遇到了同样的问题,但是找了两天没有解决,方便帮下忙吗?谢谢啦!
没有解决,我后面是嵌入了一个iframe,改变iframe路径,就会销毁
from kline.
@HEJIN2016 请问这个问题解决了吗?我也遇到了同样的问题,但是找了两天没有解决,方便帮下忙吗?谢谢啦!
没有解决,我后面是嵌入了一个iframe,改变iframe路径,就会销毁
我想到另一个办法,你可以看看#96 (comment)
from kline.
Related Issues (20)
- 如何去除指标这一行
- Kline移动端版本已经弄出来了 https://gitee.com/koch/exchange-app
- 不能实例化多个
- 移动端怎么阻止纵向滑动呢
- 鼠标滚轮控制缩放 HOT 2
- PC端如何让k线跟随浏览器大小自动改变大小
- PC k线图右侧买卖档位排序问题 HOT 1
- webscoket 正确返回格式是什么
- stomp方式在创建Kline实例时报错Error in mounted hook: "ReferenceError: SockJS is not defined"
- 有没有成功的案例参考一下,引用了该项目文档启动后一直显示正在读取数据
- 请问是否可以支持本地的数据库?
- frame0.k0 这个有什么用?
- K线插件接入手机端时,K线无法滑动,请问有解决方案吗?前面的那个类似问题没有解决 HOT 1
- 加载历史数据 HOT 1
- dependency was not found
- 我们后台传的分时数据没有高开低收 只有现价 均价 成交量 请问怎么画线
- 怎么重绘K线图? HOT 2
- 价格为负数时,K线和分时线均不可见
- 将Kline安装在ruby项目里,如何安装或引用?
- Provisional headers are shown 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 kline.