Giter Club home page Giter Club logo

Comments (31)

stephenhyy avatar stephenhyy commented on May 28, 2024

页面没报错,让我的调试出现困难,只能救助?

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

框架出来了,学习使用也出来了,就是没数据

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

数据样式 [[20191202, 15.29, 15.35, 15.43, 15.23, 15.36, 55387738, 849784129],
[20191203, 15.36, 15.3, 15.46, 15.21, 15.45, 45541805, 700293549]] ,按文档为啥不生效

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

看super的源码,发现hqchartdata还要包裹一层 {data:hqchartdata}才能正常显示,谢谢

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

新问题 android 手机上不能左右滑动 同#158

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

新问题 android 手机上不能左右滑动 同#158

小程序开发工具里面的模拟器可以左右滑动吗?

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

比较奇葩的啥,工具上可以,预览也可以左右滑动,就是真机调试时不可以

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

vueVersion为3的时候,k线图无法拖动和缩放 #153

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

好的谢谢

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

image
明显的下边日期被截断,请问下小程序这在哪里处理

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

HQChart使用教程4- 如何自定义K线图颜色风格

JSChartResource()  
{
 ........
   this.Frame = { 
        XBottomOffset: 0 ,  //X轴文字向下偏移
       ........
    };

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

这样写到vue的methods周期可以吗?

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

在setoption之前, 在外部修改配置资源就可以。

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

谢谢,又发现一个问题 手机小程序显示分时信息怎么配置 这是pc
image
这是我的微信开发者工具,我找了很久也没有看到文档
image

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

我发现有些属性,是针对js的,同样的设置,h5都有,小程序没有
捕获

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

HQChart使用教程7- 如何快速创建一个分时图页面

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

你好,请问下我如果从单日分时到多日分时,因为宽度要变化,我需要重绘吗?能不能改配置项让他生效?

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

HQChart实战教程66-动态调整HQChart布局大小

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

你好,首先
image
这个我是打不开,不知道要什么操作,要购买吗?
我现在碰到个问题,在更新小程序的5日分时数据时,查看了super项目中方法
image
很遗憾我在umychart.wechat.3.0相关文件中没找到,只能用加载历史数据的方法
const symbol = this.Symbol;
const hqchart = JSON.parse(JSON.stringify({ code: 0, symbol, data: toRaw(this.fiveDayMinuteLine.FiveMinuteCatch) }));
this.fiveDayMinuteLine.HQcallback && this.fiveDayMinuteLine.HQcallback({ data: hqchart });,
我知道这样很不好试了这个RecvHistoryMinuteData也不行,
能不能像只更新增量的,具体怎么用,我看单日分时的
const hqchart = { code: 0, stock: [toRaw(this.oneDayMinuteLine.MinuteCatch)] };
this.oneDayMinuteLine.JSChart.JSChartContainer.RecvMinuteData({ data: hqchart });也是整个数据,
但是k线感觉就是更新增量
const hqchart = { code: 0, stock: [stockItem] };
this.kLine.JSChart.JSChartContainer.RecvRealtimeData({ data: hqchart });
分时和多日分时能不能只更新增量,具体怎么用?

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

可以打开哈,就是没找到出处,不然我自己也可以看,麻烦回答下更新问题。

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

HQChart使用教程29-走势图如何对接第3方数据2-最新分时数据
“增量更新数据格式”

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

你好目前有这种数据后我们调用什么方法,还是分时的callback吗?我现在一调用callback,之前的历史分时图形也没有了,还有例子怎么没有了涨跌幅,能不能给个代码片段?

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

第1次请求当天分钟数据,返回全量数据, 后面在请求就返回增量数据。 是都通过“MinuteChartContainer::RequestMinuteData”这个协议回调, 返回不同的格式就可以。涨跌幅是使用昨收插件自己计算的

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

我现在就是碰到这个问题,第一次返回全量数据,通过“MinuteChartContainer::RequestMinuteData”这个协议回调画出历史图,后面利用websocket拿到增量数据后,我不知道调用什么函数,展示在图上

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

也就是说MinuteChartContainer::RequestMinuteData回调只是开始调用一次,我把callback函数存下来,在每次有增量数据时,调用它,结果图形消失
const hqchart = {
dataType: 1, // 增量数据标识
stock: [
{
date: this.oneDayMinuteLine.MinuteCatch.date,
yclose: this.oneDayMinuteLine.MinuteCatch.yclose,
symbol: this.oneDayMinuteLine.MinuteCatch.symbol,
// 单条分钟数据格式 0=日期 1=时间 2=开 3=高 4=低 5=收 6=均价 7=量 8=金额 9=涨幅 10=涨跌 11=领先指标
minute: [...]
}
]
};
this.oneDayMinuteLine.HQcallback && this.oneDayMinuteLine.HQcallback({ data: hqchart });

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024
MinuteNetworkFilter(data, callback)
{
     console.log('[MinuteNetworkFilter] data', data);

     switch(data.Name)
     {
      case 'MinuteChartContainer::RequestMinuteData':                 //分时图数据对接
               this.RequestMinuteData(data, callback);
                break;
       .........
 }

RequestMinuteData(data, callback)
 {
      data.PreventDefault=true;
      var symbol=data.Request.Data.symbol[0]; //请求的股票代码

      if (如果不是第1次下载)   //增量
      {
          var hqchartData=增量数据
        
      }
      else    //全量
      {
          var hqchartData=全量数据
      }

      callback({data:hqchartData});
  },

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

不好意思,我只能9.30看这个,已经对接了交易所的数据,每3秒钟推送一条新的,我是按你的写的
newMinuteData(data) {
console.log(接收推送/hq/fs/${data.code}.${data.setCode},用于单日分时, data);
const hqchart = {
dataType: 1, // 增量数据标识
stock: [
{
date: this.oneDayMinuteLine.MinuteCatch.date,
yclose: this.oneDayMinuteLine.MinuteCatch.yclose,
symbol: this.oneDayMinuteLine.MinuteCatch.symbol,
// 单条分钟数据格式 0=日期 1=时间 2=开 3=高 4=低 5=收 6=均价 7=量 8=金额 9=涨幅 10=涨跌 11=领先指标
minute: []
}
]
};
const item = {};
item.date = this.oneDayMinuteLine.MinuteCatch.date;
item.time = Number(parseInt(data.minhms / 100, 10));
item.open = Number(data.nowPrice);
item.high = Number(data.nowPrice);
item.low = Number(data.nowPrice);
item.price = Number(data.nowPrice);
item.avprice = Number(data.avgPrice);
item.vol = Number(data.dealVol * 100);
item.amount = Number(data.dealAmount);
hqchart.stock[0].minute.push(item);
debugger;
this.oneDayMinuteLine.HQcallback && this.oneDayMinuteLine.HQcallback({ data: hqchart });
},
但是貌似会覆盖历史数据(清除历史,绘制新的),难道这里的callback函数第一次和后面的不一致?因为我只记录触发第一次的

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

如果是那样,我怎么样每次触发networkfilter回调,文档配置 IsAutoUpdate: false, // 是自动更新数据 (使用ws去掉定时器更新)
AutoUpdateFrequency: 0, // 数据更新频率

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

插件内部数据更新逻辑, 如果这1分钟数据已存在更新, 如果不存在往后插入一条新数据

from hqchart.

stephenhyy avatar stephenhyy commented on May 28, 2024

那为啥我用一个callback函数(存下第一次的),每当有新数据时会清除之前的,你看看我代码的写法没问题吧?

from hqchart.

jones2000 avatar jones2000 commented on May 28, 2024

https://github.com/jones2000/HQChart/blob/master/wechathqchart/umychart.wechat.3.0.js
小程序调试一下函数代码

this.RecvUpdateMinuteData=function(data)
this.UpdateLatestMinuteDataV2=function(minuteData)

from hqchart.

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.