protected override void SetupChart() { this.flexChart1.ChartType = ChartType.Line; this.flexChart1.Header.Content = "Stock Price Forecast"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.DataSource = FinancialDataSource.GetQuotes(DateTime.Today, 1000); this.flexChart1.BindingX = "Date"; this.flexChart1.Series.Add(new Series { Binding = "High" }); var dtGroupProvider = new DateTimeGroupProvider(); dtGroupProvider.GroupTypes.Add(TimeUnits.Month); dtGroupProvider.GroupTypes.Add(TimeUnits.Quarter); dtGroupProvider.GroupTypes.Add(TimeUnits.Year); this.flexChart1.AxisX.GroupProvider = dtGroupProvider; this.flexChart1.AxisX.GroupVisibilityLevel = 1; this.flexChart1.AxisX.GroupSeparator = AxisGroupSeparator.Horizontal; this.flexChart1.AxisX.LabelAngle = 90; this.flexChart1.AxisX.Format = "dd-MM-yyyy"; this.flexChart1.Rendered += (s, e) => { _udVisibilityLevel.Value = flexChart1.AxisX.GroupVisibilityLevel; }; }
protected override void SetupChart() { this.flexChart1.Header.Content = "Futures & Commodities Investment Analysis"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.BindingX = "Age"; this.flexChart1.Options.BubbleMaxSize = 60; this.flexChart1.Options.BubbleMinSize = 10; this.flexChart1.ToolTip.Content = "AOI : {x}\n{seriesName} : {Amount:c}\nReturn : {Return:p}"; Series series = new Series { Binding = "Amount,Return", Name = "Investment" }; this.flexChart1.Series.Add(series); this.flexChart1.AxisY.Format = "c0"; this.flexChart1.AxisY.Title = "Investment Amount"; this.flexChart1.AxisY.TitleStyle.Font = StyleInfo.AxisTitleFont; this.flexChart1.AxisX.Title = "Investment Duration (Years)"; this.flexChart1.AxisX.TitleStyle.Font = StyleInfo.AxisTitleFont; this.flexChart1.ChartType = ChartType.Bubble; this.flexChart1.DataSource = FinancialDataSource.GetInvestmentData(); }
protected override void SetupChart() { this.flexChart1.BindingX = "Month"; _waterfall = new C1.Win.Chart.Waterfall() { Binding = "PChange", Name = "Increment,Decrement,Total" }; _waterfall.IntermediateTotalLabels = new string[] { "Q1", "Q2", "Q3", "Q4" }; _waterfall.IntermediateTotalPositions = new int[] { 3, 6, 9, 12 }; _waterfall.Start = 0.15; _waterfall.StartLabel = (DateTime.Now.Year - 2).ToString(); _waterfall.TotalLabel = (DateTime.Now.Year - 1).ToString(); _waterfall.StartStyle.FillColor = Color.FromArgb(unchecked ((int)0xff7dc7ed)); _waterfall.FallingStyle.FillColor = Color.FromArgb(unchecked ((int)0xffdd2714)); _waterfall.RisingStyle.FillColor = Color.FromArgb(unchecked ((int)0xff0f9d58)); _waterfall.RisingStyle.StrokeColor = Color.FromArgb(unchecked ((int)0xff0f9d58)); _waterfall.IntermediateTotalStyle.FillColor = Color.FromArgb(unchecked ((int)0xff7dc7ed)); _waterfall.TotalStyle.FillColor = Color.FromArgb(unchecked ((int)0xff7dc7ed)); _waterfall.ConnectorLineStyle.StrokeColor = Color.FromArgb(unchecked ((int)0xff030303)); _waterfall.ConnectorLineStyle.StrokeDashPattern = new float[] { 3, 3 }; _waterfall.ConnectorLineStyle.StrokeWidth = 2; this.flexChart1.Series.Add(_waterfall); this.flexChart1.DataSource = FinancialDataSource.GetProfitStatement(); this.flexChart1.Header.Content = string.Format("{0} : Profit Analysis", DateTime.Now.Year - 1); this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.AxisX.LabelAngle = 30; this.flexChart1.AxisY.Format = "p0"; this.flexChart1.AxisY.Title = "Profit Percent(%)"; this.flexChart1.AxisY.TitleStyle.Font = StyleInfo.AxisTitleFont; }
protected override void SetupChart() { var data = FinancialDataSource.GetQuotes(90); var minPrice = data.Min((q) => q.Low); var maxPrice = data.Max((q) => q.High); var orderedVolume = data.OrderBy((q) => q.Volume); this.flexChart1.Header.Content = "Daily Price Movement"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.BindingX = "Date"; this.flexChart1.ToolTip.Content = "High:{High:C2}\nLow:{Low:C2}\nOpen:{Open:C2}\nClose:{Close:C2}\nVolume:{Volume}"; var _sPrice = new Series { Name = "Price", Binding = "High,Low,Open,Close", ChartType = ChartType.Candlestick, }; var _sVolume = new Series { Name = "Volume", Binding = "Volume", AxisY = new Axis { Position = Position.Right, Format = "#,##0,,M", Max = 2.5 * orderedVolume.Last().Volume - orderedVolume.First().Volume }, }; this.flexChart1.AxisY.Min = 2 * minPrice - maxPrice; this.flexChart1.AxisX.Format = "MMMM dd"; this.flexChart1.Series.Add(_sPrice); this.flexChart1.Series.Add(_sVolume); this.flexChart1.DataSource = data; }
protected override void SetupChart() { this.flexChart1.Header.Content = "Daily Price Movement"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.BindingX = "Date"; var close = new Series { Name = "Close", Binding = "Close", ChartType = ChartType.Line, }; var Volume = new Series { Name = "Volume", Binding = "Volume", AxisY = new Axis { Max = 800, Position = Position.Right } }; this.flexChart1.Series.Add(close); this.flexChart1.Series.Add(Volume); this.flexChart1.AxisY.Min = 0; this.flexChart1.AxisY.Max = 175; this.flexChart1.DataSource = _stockData = FinancialDataSource.GetFinancialData(); this.flexChart1.MouseMove += FlexChart1_MouseMove; this.flexChart1.Rendered += FlexChart1_Rendered; }
protected override void SetupChart() { var data = FinancialDataSource.GetQuotes(new DateTime(2017, 1, 1)); var monthlyData = data.GroupBy(x => x.Date.Month).SelectMany(grp => grp.Select(val => new { Date = new DateTime(val.Date.Year, grp.Key, 15), Value = grp.Average(x => x.Volume), })).Distinct().ToList(); this.flexChart1.ChartType = ChartType.Line; this.flexChart1.Header.Content = "Stock Exchange Analysis"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.DataSource = data; this.flexChart1.BindingX = "Date"; this.flexChart1.Binding = "Volume"; var ser1 = new Series { Name = "Daily" }; var ser2 = new Series { Name = "Monthly (Avg)", Binding = "Value", ChartType = ChartType.LineSymbols, DataSource = monthlyData, }; this.flexChart1.Series.Add(ser1); this.flexChart1.Series.Add(ser2); this.flexChart1.ToolTip.Content = "{y:n0}"; this.flexChart1.AxisX.TimeUnit = TimeUnits.Month; this.flexChart1.AxisX.MajorUnit = 1; }
protected override void SetupChart() { this.flexChart1.ChartType = ChartType.Line; this.flexChart1.Header.Content = "Stock Price Forecast"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.DataSource = FinancialDataSource.GetQuotes(DateTime.Today, 1000); this.flexChart1.BindingX = "Date"; this.flexChart1.Series.Add(new Series { Binding = "High" }); // Instantiate and assign the AxisGroupProvider, // and set the TimeUnits for each desired level. // To use the built-in provider: //DateTimeGroupProvider mtgp = new DateTimeGroupProvider(flexChart1.AxisX); // For the purposes of the sample, use the included provider. this.flexChart1.AxisX.GroupProvider = new MyDateTimeGroupProvider(flexChart1.AxisX); this.flexChart1.AxisX.GroupSeparator = AxisGroupSeparator.Horizontal; this.flexChart1.AxisX.Format = "dd-MMM"; this.flexChart1.AxisX.LabelAngle = 90; this.flexChart1.Rendered += (s, e) => { _cbXGroupSeparator.SelectedItem = flexChart1.AxisX.GroupSeparator; }; }
protected override void SetupChart() { this.flexChart1.ChartType = ChartType.Spline; this.flexChart1.BindingX = "Date"; flexChart1.DataSource = FinancialDataSource.GetQuotes(); var series = new Series { Name = "Price", Binding = "Close", }; flexChart1.Series.Add(series); this.flexChart1.Header.Content = "Daily Price Movement"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; }
protected override void SetupChart() { this.flexChart1.ChartType = ChartType.Line; this.flexChart1.DataSource = FinancialDataSource.GetQuotes(100); this.flexChart1.BindingX = "Date"; this.flexChart1.Series.Add(new Series { Binding = "High", Name = "Highs" }); this.flexChart1.Series.Add(new Series { Binding = "Low", Name = "Lows" }); this.flexChart1.Header.Content = "Daily Price Movement"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; }
protected override void SetupChart() { var data = FinancialDataSource.GetQuotes(); var minPrice = data.Min((q) => q.Low); var maxPrice = data.Max((q) => q.High); var orderedVolume = data.OrderBy((q) => q.Volume); //Setup Main Chart this.flexChart1.Header.Content = "Daily Price Movement"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.DataSource = data; this.flexChart1.BindingX = "Date"; var _sPrice = new Series { Name = "Price", Binding = "High,Low,Open,Close", ChartType = ChartType.Candlestick, }; var _sVolume = new Series { Name = "Volume", Binding = "Volume", AxisY = new Axis { Position = Position.Right, Format = "#,##0,,M", Max = 2 * orderedVolume.Last().Volume - orderedVolume.First().Volume }, }; this.flexChart1.AxisY.Min = 2 * minPrice - maxPrice; this.flexChart1.Series.Add(_sPrice); this.flexChart1.Series.Add(_sVolume); this.flexChart1.Legend.Position = Position.Top; this.flexChart1.ToolTip.Content = "High:{High}\nLow:{Low}\nOpen:{Open}\nClose:{Close}\nVolume:{Volume}"; //Setup Range Selector Chart _fcChartRangeSelector.ChartType = ChartType.Line; _fcChartRangeSelector.DataSource = this.flexChart1.DataSource; _fcChartRangeSelector.BindingX = "Date"; _fcChartRangeSelector.Series.Add(new Series { Binding = "High" }); _fcChartRangeSelector.Rendered += (s, e) => { SetupRangeSelector(); }; }
protected override void SetupChart() { this.flexChart1.Header.Content = "Daily High Prices"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.ChartType = C1.Chart.ChartType.LineSymbols; this.flexChart1.DataSource = FinancialDataSource.GetQuotes(100).OrderBy(x => x.Date); this.flexChart1.BindingX = "Date"; var high = new Series { Name = "High Price", Binding = "High" }; this.flexChart1.Series.Add(high); this.flexChart1.DataLabel.Content = "{y}"; this.flexChart1.DataLabel.Position = C1.Chart.LabelPosition.Center; this.flexChart1.DataLabel.Overlapping = C1.Chart.LabelOverlapping.Show; this.flexChart1.LabelRendering += FlexChart1_LabelRendering; }
protected override void SetupChart() { _data = FinancialDataSource.GetInvestmentData(); this.flexChart1.Binding = "Amount"; this.flexChart1.BindingX = "Age"; this.flexChart1.DataSource = _data; this.flexChart1.AxisY.Format = "c0"; this.flexChart1.AxisY.Max = 1200000; this.flexChart1.AxisY.Min = 0; this.flexChart1.AxisY.Title = "Investment Amount"; this.flexChart1.AxisY.TitleStyle.Font = StyleInfo.AxisTitleFont; this.flexChart1.AxisX.Min = 0; this.flexChart1.AxisX.Title = "Age Of Investment(Years)"; this.flexChart1.AxisX.TitleStyle.Font = StyleInfo.AxisTitleFont; this.flexChart1.ChartType = ChartType.Line; this.flexChart1.Series.Add(new Series()); }
protected override void SetupChart() { this.flexChart1.Header.Content = "Daily Price Movement"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.BindingX = "Date"; this.flexChart1.ChartType = ChartType.Line; var high = new Series { Binding = "High", Name = "High" }; var low = new Series { Binding = "Low", Name = "Low" }; this.flexChart1.Series.Add(high); this.flexChart1.Series.Add(low); this.flexChart1.AxisY.Format = "c0"; this.flexChart1.Rendering += FlexChart1_Rendering; this.flexChart1.DataSource = FinancialDataSource.GetQuotes(); }
protected override void SetupChart() { this.flexChart1.ChartType = ChartType.Line; this.flexChart1.Header.Content = "Daily Price Movement"; this.flexChart1.Header.Style.Font = StyleInfo.ChartHeaderFont; this.flexChart1.DataSource = FinancialDataSource.GetQuotes(1000); this.flexChart1.BindingX = "Date"; this.flexChart1.Series.Add(new Series { Binding = "High" }); this.flexChart1.Rendering += (s, e) => { if (_horizontalScrollbar != null && _verticalScrollbar != null) { return; } _horizontalScrollbar = new C1.Win.Chart.Interaction.AxisScrollbar(flexChart1.AxisX); _horizontalScrollbar.UpperValue = _horizontalScrollbar.LowerValue + 150; _verticalScrollbar = new C1.Win.Chart.Interaction.AxisScrollbar(flexChart1.AxisY); _verticalScrollbar.ScrollButtonsVisible = false; }; }