Exemplo n.º 1
0
        /// <summary>
        /// Called when the value of the SelectedItem property changes.
        /// </summary>
        /// <param name="d">DynamicSeries that changed its SelectedItem.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnSelectedItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DataPointSeries source   = (DataPointSeries)d;
            object          oldValue = (object)e.OldValue;
            object          newValue = (object)e.NewValue;

            source.OnSelectedItemPropertyChanged(oldValue, newValue);
        }
Exemplo n.º 2
0
        /// <summary>
        /// IsSelectionEnabledProperty property changed handler.
        /// </summary>
        /// <param name="d">DynamicSeries that changed its IsSelectionEnabled.
        /// </param>
        /// <param name="e">Event arguments.</param>
        private static void OnIsSelectionEnabledPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DataPointSeries source   = (DataPointSeries)d;
            bool            oldValue = (bool)e.OldValue;
            bool            newValue = (bool)e.NewValue;

            source.OnIsSelectionEnabledPropertyChanged(oldValue, newValue);
        }
Exemplo n.º 3
0
 public ScoreChart(DataPointSeries series)
     : base(series)
 {
 }
 public YearReleasedChart(DataPointSeries series)
     : base(series)
 {
 }
Exemplo n.º 5
0
 public ImportDateChart(DataPointSeries series)
     : base(series)
 {
 }
Exemplo n.º 6
0
 public CountryChart(DataPointSeries series)
     : base(series)
 {
 }
Exemplo n.º 7
0
 public GenreChart(DataPointSeries series)
     : base(series)
 {
 }
Exemplo n.º 8
0
 public ChartDataBase(DataPointSeries series)
 {
     this.Series = series;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Creates a legend item.
 /// </summary>
 /// <returns>A legend item for insertion in the legend items collection.
 /// </returns>
 /// <param name="owner">The owner of the new LegendItem.</param>
 protected virtual LegendItem CreateLegendItem(DataPointSeries owner)
 {
     LegendItem legendItem = new LegendItem() { Owner = owner };
     legendItem.SetBinding(LegendItem.StyleProperty, new Binding(ActualLegendItemStyleName) { Source = this });
     legendItem.SetBinding(LegendItem.ContentProperty, new Binding(TitleName) { Source = this });
     return legendItem;
 }
Exemplo n.º 10
0
 public DynamicRangeChart(DataPointSeries series)
     : base(series)
 {
 }
Exemplo n.º 11
0
 public ReplayGainChart(DataPointSeries series)
     : base(series)
 {
 }
Exemplo n.º 12
0
        private void UpdateChart()
        {
            chart1.Series.Clear();

            string ChartStyle1 = Settings.Set["StudentMarksChartStyle"];

            if (ChartStyle1 == "Bar")            series1 = new BarSeries();
            else if (ChartStyle1 == "Pie")       series1 = new PieSeries();
            else if (ChartStyle1 == "Area")      series1 = new AreaSeries();
            else if (ChartStyle1 == "Column")    series1 = new ColumnSeries();
            else if (ChartStyle1 == "Line")      series1 = new LineSeries();

            //string ChartStyle2 = Settings.Set["StudentPreformanceChartStyle"];

            //if (ChartStyle2 == "Bar")           series2 = new BarSeries();
            //else if (ChartStyle2 == "Pie")      series2 = new PieSeries();
            //else if (ChartStyle2 == "Area")     series2 = new AreaSeries();
            //else if (ChartStyle2 == "Column")   series2 = new ColumnSeries();
            //else if (ChartStyle2 == "Line")     series2 = new LineSeries();

            series1.DependentValuePath = "Score";
            series1.IndependentValuePath = "Name";
            series1.Title = "Marks scored";
            chart1.Series.Add(series1);

            //series2.DependentValuePath = "dPerformance";
            //series2.IndependentValuePath = "Name";
            //series2.Title = "Performance of student";
            //chart2.Series.Add(series2);

            Analyse();
        }
        private void UpdateChart()
        {
            if(series1!=null)
                chart1.Series.Remove(series1);

            string ChartStyle1 = cmbGraph.Text;

            if (ChartStyle1 == "Pie") series1 = new PieSeries();
            else if (ChartStyle1 == "Line") series1 = new LineSeries();
            else if (ChartStyle1 == "Column") series1 = new ColumnSeries();
            else series1 = new ColumnSeries();
            //else if (ChartStyle1 == "Bar") series1 = new BarSeries();
            //else if (ChartStyle1 == "Area") series1 = new AreaSeries();

            series1.DependentValuePath = "Score";
            series1.IndependentValuePath = "Name";
            series1.Title = "Marks scored";
            chart1.Series.Add(series1);

            Analyse();
        }
 private void FillDataAsync(DataPointSeries target, Func<Release[], IEnumerable> source)
 {
     var items = source(this.releases);
     this.Dispatcher.BeginInvokeAction(() =>
     {
         try
         {
             target.ItemsSource = items;
         }
         catch
         {
         }
     });
 }
Exemplo n.º 15
0
        /// <summary>
        /// LegendItemStyleProperty property changed handler.
        /// </summary>
        /// <param name="d">DataPointSeries that changed its LegendItemStyle.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnLegendItemStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            DataPointSeries source = d as DataPointSeries;

            source.OnLegendItemStylePropertyChanged((Style)e.OldValue, (Style)e.NewValue);
        }