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 ...
随机推荐
- 小夜灯V2.0成本
物料清单: Arduino Nano *1 17.98 HC-05主从机一体蓝牙模块 *1 15.9 RGB灯珠1W大功率带铝基板 *1 3.3 奶白灯罩 *1 32.5 锐澳9cm发光底座 *1 ...
- parsec-2.1 编译错误
OS: Ubuntu 14.04 LTS (x86_64) 参考:https://forums.freebsd.org/threads/security-openssl-build-failure.4 ...
- github最简单的操作方法
其实,说实话,到目前为止,我还没有研究透那些gitbush上面的命令,所以,往github上面上传自己的文件,我采用最简单的操作方式.嘻嘻.下面,将为大家讲述一下. 首先,要在github上面注册新用 ...
- Swift建立栈的泛型结构体以及top()、push()、pop()定义函数的定义
首先可以使用swift定义Stack的结构体 //泛型表达 struct Stack<T> { var items = <T>() //定义栈顶函数,返回栈顶元素 mutati ...
- 通过sougou输入法,解决卡在Setup Wizard(小绿人)界面
本人使用海信EG900手机(安卓2.3.5,已root),为了使用google的服务,先后手动复制和CWM recovery刷入google服务包(gapps-gb-20110828-signed.z ...
- mysql 根据某字段特定值排序
比如: 表 :user 字段:orders (值为 1,2,3) 要求根据字段 orders 按2 -> 1 -> 3 排序 使用以下语句实现SELECT *FROM userORDER ...
- CentOS6.5恢复误删除的文件
系统环境:CentOS release 6.5 (Final) 内核版本:2.6.32-431.el6.x86_64 需要的源码包:extundelete-0.2.4.tar.bz2 解压bz2包: ...
- eclipse安装ADT后在windows菜单下找不到android SDK and AVD Manager
eclipse安装ADT后在windows菜单下找不到android SDK and AVD Manager选项的解决办法 - zhjr1220的专栏 - 博客频道 - CSDN.NET http: ...
- 【转载】关于OpenGL的图形流水线
本文转载自 http://blog.csdn.net/racehorse/article/details/6593719 GLSL教程 这是一些列来自lighthouse3d的GLSL教程,非常适合入 ...
- JSON.stringify 在OA差旅中转换为字符串传给后端,(使用from表单的形式)
$('#bookForm').find('#formData').val(transInfo.fromData).end().submit(); 这里的val()中的transInfo.fromDat ...