private void graph_DataItemOver(object sender, ChartDataEventArgs e) { if (this.ShowTime) { this.graph.Tooltips.FormatString = e.RowLabel + "\r\n" + e.ColumnLabel + "\r\n" + Convert.ToString(e.DataValue); } else { this.graph.Tooltips.FormatString = e.RowLabel + "\r\n" + e.ColumnLabel.Substring(0, 10) + "\r\n" + Convert.ToString(e.DataValue); } }
void UpdateChart(IEnumerable <bool> left, IEnumerable <bool> right) { // left double[] leftRawInputYs = left.Select(x => x ? 2.25 : 1.25).ToArray(); double[] leftDebouncedInputYs = CreateDebouncedInput(left, Debounce.LeftButtonPressDebounceTime, Debounce.LeftButtonReleaseDebounceTime) .Select(x => x ? 2.25 : 1.25) .ToArray(); // right double[] rightRawInputYs = right.Select(x => x ? 1.0 : 0.0).ToArray(); double[] rightDebouncedInputYs = CreateDebouncedInput(right, Debounce.RightButtonPressDebounceTime, Debounce.RightButtonReleaseDebounceTime) .Select(x => x ? 1.0 : 0.0) .ToArray(); // chart update event var eventArgs = new ChartDataEventArgs(leftRawInputYs, rightRawInputYs, leftDebouncedInputYs, rightDebouncedInputYs); PlotEventPasserThing.RaiseChartDataUpdatedEvent(this, eventArgs); }
private void UpdateChart(object sender, ChartDataEventArgs e) { if (e.LeftRawInputYs != null) { var leftRawInputPlot = (SignalPlot)SignalView.Plot.GetPlottables()[0]; leftRawInputPlot.Ys = e.LeftRawInputYs; } if (e.LeftDebouncedInputYs != null) { var leftDebouncedInputPlot = (SignalPlot)SignalView.Plot.GetPlottables()[1]; leftDebouncedInputPlot.Ys = e.LeftDebouncedInputYs; } if (e.RightRawInputYs != null) { var rightRawInputPlot = (SignalPlot)SignalView.Plot.GetPlottables()[2]; rightRawInputPlot.Ys = e.RightRawInputYs; } if (e.RightDebouncedInputYs != null) { var rightDebouncedInputPlot = (SignalPlot)SignalView.Plot.GetPlottables()[3]; rightDebouncedInputPlot.Ys = e.RightDebouncedInputYs; } countersPlotted = new bool[5000]; // clear all text var allText = SignalView.Plot.GetPlottables().Where((plot) => plot.GetType() == typeof(Text)); foreach (IPlottable text in allText) { SignalView.Plot.Remove(text); } countersPlotted = new bool[5000]; if (SignalView.Plot.GetAxisLimits().XSpan < COUNTER_VISIBLE_THRESHOLD) { PlotCounters(); } SignalView.Render(); }
private void handleChartDataClicked(object sender, ChartDataEventArgs e_) { if (m_mode == ListeningMode.NotListening) return; var date = m_analysisResult.SeasonalPattern.Dates[e_.DataColumn]; var patternValue = m_analysisResult.SeasonalPattern.ValueOnDate(date); if (m_range.Any()) { var last = m_range.Last(); last.EndDate = date; last.TradeDirection = (m_lastClickedPatternValue < patternValue) ? TradeDirection.Long : TradeDirection.Short; } var n = new CalendarAnalysisTradeRange() { StartDate = date, TradeDirection = TradeDirection.Unknown }; m_range.Add(n); m_lastClicked = date; m_lastClickedPatternValue = patternValue; }
private void handleChartDataClicked(object sender, ChartDataEventArgs e_) { string heading = dt.Rows[e_.DataRow]["Label"] as string; Console.WriteLine(heading); }
protected async void ChartOnChartDataClicked(object sender, ChartDataEventArgs e) { await GetChartTemperatur(); if (btnDrillBack.Visible) { btnDrillBack.Visible = false; SessionData.TemperaturDrillMonat = 0; return; } var month = DateTime.Parse(e.ColumnLabel).Month; SessionData.TemperaturDrillMonat = month; this.ChartTemperatur.Drill.DrillElements[0].DrillDown.Drill( e.DataRow, e.DataColumn, Infragistics.UltraChart.Shared.Styles.ChartType.LineChart, (await KlimaService.GetTemperaturMohtsDrill(calculateRequest, month)).ToList()); // Me.UltraChart1.Drill.DrillBack() btnDrillBack.Visible = true; //btnDrillBack.Focus(); }