Git Product home page Git Product logo

stockgraphics's Introduction

01 StockGraphics

c#/winform/GDI+

实现功能:

  • 价格柱线图
  • 交易量柱线图
  • 鼠标跟随线
  • 图形跟随鼠标拖拽移动
  • 绘制类似MA折线
  • 显示鼠标所在柱线信息
  • 绘制分析标记
  • 数据切换

性能

  • GDI+绘制效率还不错;
  • 一次读入的价格/交易量/折线/标记数据存储在List中,没有限制数据量;
  • form初始化时根据上述数据生成绘制坐标信息;
  • 绘制坐标 + offset的绘制机制,需绘制数据位置变化实质变动的是offset,无需从价格/交易量重新计算坐标;
  • 在绘制区域内拖动柱线图时,实时计算新出现在绘制区域内的图像坐标;
  • 拖动label/鼠标跟随线位置变动,重绘区域被精确记录,减少重绘次数。

使用方法

  • StockDataSet类

    待绘制的价格/交易量/MA等数据需存放在此。

  • ComputeDrawInfo类

    定义了柱线图的宽度、间隔等

    将数据计算成为坐标

  • DrawBase类

    GDI+实现

    一些画笔画布的定义

    一些计算绘制区域的方法

stockgraphics's People

Contributors

kikashine avatar

Watchers

 avatar

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.