Ejemplo n.º 1
0
 /// <summary>
 /// Pies the chart view model on pie click.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The e.</param>
 private void OnSerieClick(object sender, LiveCharts.ChartPoint e)
 {
     if (Enum.TryParse <CurrencyType>(e.SeriesView.Title, true, out var value))
     {
         var trades = this._leagueTrades.Where(t => t.Price.CurrencyType == value);
         var chart  = new ColumnChartViewModel(trades.Select(t => t.ItemName).ToArray());
         chart.Add(e.SeriesView.Title, trades.Select(t => t.Price.NumberOfCurrencies));
         this._tradesChart = chart;
         this.ActiveChart  = this._tradesChart;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Items the class chart on serie click.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The e.</param>
 private void ItemClassChart_OnSerieClick(object sender, LiveCharts.ChartPoint e)
 {
     if (Enum.TryParse <ItemClass>(e.SeriesView.Title, true, out var value))
     {
         var trades = this._leagueTrades.Where(t => t.ItemClass == value);
         var chart  = new ColumnChartViewModel(trades.Select(t => t.ItemName).ToArray());
         chart.Add(e.SeriesView.Title, trades.Select(t => t.Price.CalculateValue()));
         this._tradesChart = chart;
         this.ActiveChart  = this._tradesChart;
     }
 }