<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的更多相关文章

  1. android 企业级高性能图表库 SciChart (付费)

    1.官网 https://www.scichart.com/ 2.特性 2.1 链接 https://www.scichart.com/android-chart-features/ https:// ...

  2. 小白学Python(14)——pyecharts 绘制K线图 Kline/Candlestick

    Kline-基本示例 from pyecharts import options as opts from pyecharts.charts import Kline data = [ [2320.2 ...

  3. python kline

    # -*- coding: utf-8 -*- # Qt相关和十字光标 from qtpy.QtGui import * from qtpy.QtCore import * from qtpy imp ...

  4. RealTimePerformanceDemoView

    using System;using System.Diagnostics;using System.Timers;using System.Windows;using System.Windows. ...

  5. 一些对数学领域及数学研究的个人看法(转载自博士论坛wcboy)

    转自:http://www.math.org.cn/forum.php?mod=viewthread&tid=14819&extra=&page=1 原作者: wcboy 现在 ...

  6. irc操作小记

    IRC客户端 HexChat 跨平台支持,目前正在Windows上使用,暂无不满意的地方 polari 支持的命令太少了,功能有限. Empathy 重量级,支持各种消息协议 weechat/irss ...

  7. Java性能提示(全)

    http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLi ...

  8. Android自定义View绘图实现拖影动画

    前几天在"Android绘图之渐隐动画"一文中通过画线实现了渐隐动画,但里面有个问题,画笔较粗(大于1)时线段之间会有裂隙,我又改进了一下.这次效果好多了. 先看效果吧: 然后我们 ...

  9. 股票k线

    与上一篇文章相比k线图主要的难点 1.tooltip的定制化显示: 当手指触摸手机屏幕上下拖动可能会手指的事件陷入图表无法进行上下拖动 tooltip:{followMouseMove} follow ...

随机推荐

  1. 随机生成UUID(GUID)的方法

    - (NSString *)UUID { CFUUIDRef uuid_ref = CFUUIDCreate(NULL); CFStringRef uuid_string_ref= CFUUIDCre ...

  2. 出现( linker command failed with exit code 1)错误总结 (转)

    这种问题,通常出现在添加第三方库文件或者多人开发时. 这种问题一般是找不到文件而导致的链接错误. 我们可以从如下几个方面着手排查. 1.以如下错误为例,如果是多人开发,你同步完成后发现出现如下的错误. ...

  3. ASP.NET中Cookies的使用

    准备开始写后台代码了,不过刚看到cookies就傻眼了,网上搜集了一些资料,总结了一下,初学者可以看看. 创建COOKIES System.Web.HttpCookie cookie=new Http ...

  4. hdu2348题解

    又恬不知耻的开始写题解了,暑假到了,QAQ然而想我这样的弱逼是没有暑假的sad,还是老老实实刷题吧. 题目大意:给一个小车的宽度和长度和两条道路的宽度,判断小车能否通过. 思路:可以先看下面的图,我们 ...

  5. Servlet页面注册用户的小程序(一)

    本实例实现用userreg.jsp页面中的表单提交注册请求,把注册信息提交给regservlet写入数据库并且查询新用户显示出来. 一.准备工作. 1.jdbc数据驱动开发包mysql-connect ...

  6. jquery'中的匿名函数

        //jquery'中的匿名函数 (function(){ alert("this is a test"); })(); //和这个基于jQuery的比较下: $(funct ...

  7. Torch 日志文件的保存 logroll

    Torch 日志文件的保存 logroll 怎样将 Torch 在终端显示的信息,保存到 log 文件中 ?   现在介绍一种方法:利用 logroll 的方式.  参考 https://github ...

  8. golang调用c++的dll库文件

    最近使用golang调用c++的dll库文件,简单了解了一下,特作此笔记:一.DLL 的编制与具体的编程语言及编译器无关 dll分com的dll和动态dll,Com组件dll:不管是何种语言写的都可以 ...

  9. etcd第二集

    参考文章:https://github.com/coreos/etcd/blob/master/Documentation/v2/api.mdhttp://www.cnblogs.com/zhengr ...

  10. oracle case when

    http://www.cnblogs.com/kevin2013/archive/2010/07/02/1769682.html