void OnBubbleSelectionChanged(object sender, DevExpress.XamarinForms.Charts.SelectionChangedEventArgs e)
 {
     if (e.SelectedObjects.Count > 0 && e.SelectedObjects[0] is DataSourceKey dataSourceKey)
     {
         if (dataSourceKey.DataObject is FilmData bubbleDataObject)
         {
             bubbleSeries.HintOptions = new SeriesHintOptions();
             bubbleSeries.HintOptions.PointTextPattern = bubbleDataObject.Name + "\nProduction budget: {V$$#M}\nWordwide grosses: {W$$#.##B}";
             bubbleChart.ShowHint(0, dataSourceKey.Index);
         }
     }
 }
Ejemplo n.º 2
0
 void OnBubbleSelectionChanged(object sender, DevExpress.XamarinForms.Charts.SelectionChangedEventArgs e)
 {
     if (e.SelectedObjects.Count > 0)
     {
         var keyData = e.SelectedObjects[0] as HighestGrossingFilmsByYearData.KeyData;
         if (keyData != null)
         {
             bubbleSeries.HintOptions = new SeriesHintOptions();
             bubbleSeries.HintOptions.PointTextPattern = keyData.Name + "\nProduction budget: {V$$#M}\nWordwide grosses: {W$$#.##B}";
             bubbleChart.ShowHint(0, keyData.Index);
         }
     }
 }
 void OnBubbleColorizerChanged(object sender, DevExpress.XamarinForms.Charts.SelectionChangedEventArgs e)
 {
     if (e.SelectedObjects.Count > 0 && e.SelectedObjects[0] is DataSourceKey dataSourceKey)
     {
         if (dataSourceKey.DataObject is CountryStatistic countryStatistic)
         {
             series.HintOptions = new SeriesHintOptions();
             series.HintOptions.PointTextPattern = string.Format("{0}\nGDP per capita: {1:0}$\nPopulation: {2:0.00}M\nHPI: {3:0.00}",
                                                                 countryStatistic.Country,
                                                                 countryStatistic.Gdp,
                                                                 countryStatistic.Population / 1000000,
                                                                 countryStatistic.Hpi);
             chart.ShowHint(0, dataSourceKey.Index);
         }
     }
 }