scichart by Kline
<UserControl x:Class="Abt.Controls.SciChart.Example.Examples.IWantTo.CreateMultiseriesChart.CandlestickWithLinesView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:s="http://schemas.abtsoftware.co.uk/scichart" d:DesignHeight="300" d:DesignWidth="300" Loaded="CandlesticksWithLines_Loaded" mc:Ignorable="d">
<s:SciChartSurface x:Name="sciChart" s:ThemeManager.Theme="Chrome">
<s:SciChartSurface.RenderableSeries>
<!-- Candlestick bodies now support gradients as well as solid colours -->
<s:FastCandlestickRenderableSeries>
<s:FastCandlestickRenderableSeries.UpBodyBrush>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#55002200"/>
<GradientStop Offset="1" Color="#FF00AA00"/>
</LinearGradientBrush>
</s:FastCandlestickRenderableSeries.UpBodyBrush>
<s:FastCandlestickRenderableSeries.DownBodyBrush>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#55441111"/>
<GradientStop Offset="1" Color="#FFFF0000"/>
</LinearGradientBrush>
</s:FastCandlestickRenderableSeries.DownBodyBrush>
</s:FastCandlestickRenderableSeries>
<s:FastLineRenderableSeries SeriesColor="#FF1919"/>
<s:FastLineRenderableSeries SeriesColor="#1964FF"/>
<s:FastLineRenderableSeries SeriesColor="#FF9B27"/>
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.XAxis>
<s:CategoryDateTimeAxis GrowBy="0.0, 0.2"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis GrowBy="0.1, 0.1"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup x:Name="_groupModifier">
<s:ZoomPanModifier XyDirection="XDirection"/>
<s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
</s:SciChartSurface>
</UserControl>
______
using System;
using System.Windows;
using System.Windows.Controls;
using Abt.Controls.SciChart.Example.Common;
using Abt.Controls.SciChart.Example.Data;
using Abt.Controls.SciChart.Model.DataSeries;
namespace Abt.Controls.SciChart.Example.Examples.IWantTo.CreateMultiseriesChart
{
public partial class CandlestickWithLinesView : UserControl
{
public CandlestickWithLinesView()
{
InitializeComponent();
}
private void CandlesticksWithLines_Loaded(object sender, RoutedEventArgs e)
{
// Create multiple DataSeries to store OHLC candlestick data, and Xy moving average data
var dataSeries0 = new OhlcDataSeries<DateTime, double>();
var dataSeries1 = new XyDataSeries<DateTime, double>();
var dataSeries2 = new XyDataSeries<DateTime, double>();
var dataSeries3 = new XyDataSeries<DateTime, double>();
// Prices are in the format Time, Open, High, Low, Close (all IList)
var prices = DataManager.Instance.GetPriceData(Instrument.Indu.Value, TimeFrame.Daily);
// Append data to series.
// First series is rendered as a Candlestick Chart so we append OHLC data
dataSeries0.Append(prices.TimeData, prices.OpenData, prices.HighData, prices.LowData, prices.CloseData);
// Subsequent series append moving average of the close prices
dataSeries1.Append(prices.TimeData, DataManager.Instance.ComputeMovingAverage(prices.CloseData, 100));
dataSeries2.Append(prices.TimeData, DataManager.Instance.ComputeMovingAverage(prices.CloseData, 50));
dataSeries3.Append(prices.TimeData, DataManager.Instance.ComputeMovingAverage(prices.CloseData, 20));
sciChart.RenderableSeries[0].DataSeries = dataSeries0;
sciChart.RenderableSeries[1].DataSeries = dataSeries1;
sciChart.RenderableSeries[2].DataSeries = dataSeries2;
sciChart.RenderableSeries[3].DataSeries = dataSeries3;
sciChart.ZoomExtents();
}
}
}
scichart by Kline的更多相关文章
- android 企业级高性能图表库 SciChart (付费)
1.官网 https://www.scichart.com/ 2.特性 2.1 链接 https://www.scichart.com/android-chart-features/ https:// ...
- 小白学Python(14)——pyecharts 绘制K线图 Kline/Candlestick
Kline-基本示例 from pyecharts import options as opts from pyecharts.charts import Kline data = [ [2320.2 ...
- python kline
# -*- coding: utf-8 -*- # Qt相关和十字光标 from qtpy.QtGui import * from qtpy.QtCore import * from qtpy imp ...
- RealTimePerformanceDemoView
using System;using System.Diagnostics;using System.Timers;using System.Windows;using System.Windows. ...
- 一些对数学领域及数学研究的个人看法(转载自博士论坛wcboy)
转自:http://www.math.org.cn/forum.php?mod=viewthread&tid=14819&extra=&page=1 原作者: wcboy 现在 ...
- irc操作小记
IRC客户端 HexChat 跨平台支持,目前正在Windows上使用,暂无不满意的地方 polari 支持的命令太少了,功能有限. Empathy 重量级,支持各种消息协议 weechat/irss ...
- Java性能提示(全)
http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLi ...
- Android自定义View绘图实现拖影动画
前几天在"Android绘图之渐隐动画"一文中通过画线实现了渐隐动画,但里面有个问题,画笔较粗(大于1)时线段之间会有裂隙,我又改进了一下.这次效果好多了. 先看效果吧: 然后我们 ...
- 股票k线
与上一篇文章相比k线图主要的难点 1.tooltip的定制化显示: 当手指触摸手机屏幕上下拖动可能会手指的事件陷入图表无法进行上下拖动 tooltip:{followMouseMove} follow ...
随机推荐
- Struts2学习笔记(拦截器配置添加)
一.拦截器工作原理: 根据Struts2的工作原理图,拦截器在action执行前进行顺序调用,之后执行Action并返回结果字符串,再逆序调用拦截器.(结构类似递归方式...)大部分时候,拦截器方法都 ...
- 记一些之前忘记积累的问题(fiddler 学习、XP系统不能上网、XP不能装fiddler、注册表快速找到)
记一些之前忘记积累的问题: fiddler学习:http://www.cnblogs.com/kingwolf_JavaScript/archive/2012/11/07/FiddlerUI.html ...
- MySQL字符串处理函数的几种常见用法
1.字符串大小写转化: (1).将tbl_student表的user_name字段所有小写字母,替换为大写: update tbl_student set user_name=UPPER(user_n ...
- TOJ2647
2647: How Many Tables 时间限制(普通/Java):1000MS/ ...
- Android中ExpandableListView的使用
ExpandableListView是Android中可以实现下拉list的一个控件,具体的实现方法如下: 首先:在layout的xml文件中定义一个ExpandableListView < L ...
- 【Cocos2d-x 3.x】 场景切换生命周期、背景音乐播放和场景切换原理与源码分析
大部分游戏里有很多个场景,场景之间需要切换,有时候切换的时候会进行背景音乐的播放和停止,因此对这块内容进行了总结. 场景切换生命周期 场景切换用到的函数: bool Setting::init() { ...
- spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js...
问题:spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js... web.x ...
- [BZOJ 2819]Nim
最近都忙的没空写题解了喵- 看到 1= 终于是保住了也算是一个小小的安慰吧 555…… 湖北省队互测题,据说会爆栈,但 Linux 下 栈空间=内存=128M 真的吃不下? 反正我是写了个人工栈- 这 ...
- 两种设置disabled属性以及三种方法移除disabled属性
//两种方法设置disabled属性 $('#areaSelect').attr("disabled",true); $('#areaSelect').attr("dis ...
- 手写json
json的意思是JavaScript 对象表示法 '{"0":0,"b":[3,4,5],"c":"0","d ...