none
C# WPF live charts RRS feed

  • Question

  • ok I am getting to follow this example : https://lvcharts.net/App/examples/v1/wpf/Data%20Pagination

    but make a few changes

    now I have this  :

     public float From
            {
                get { return _from; }
                set
                {
                    _from = SeriesCollection[0].ActualValues ;
                    OnPropertyChanged("From");
                }
            }

    but I keep getting an error that says " Cannot implicitly convert type 'LiveCharts.IChartValues' to 'float'"

    now they have this :

    public double From
            {
                get { return _from; }
                set
                {
                    _from = value;
                    OnPropertyChanged("From");
                }
            }

    but there value is this :

     public ChartValues<double> Values { get; set; }
    
     Values = new ChartValues<double>();

    how is there working but mines is now ?


    Friday, May 10, 2019 2:59 PM

All replies

  • You can make a primitive type float be a primitive type double without coving through a conversation.

    https://www.tutorialspoint.com/csharp/csharp_data_types.htm

    http://www.convertdatatypes.com/Convert-double-to-float-in-CSharp.html

    Friday, May 10, 2019 4:13 PM
  • ok I am getting to follow this example : https://lvcharts.net/App/examples/v1/wpf/Data%20Pagination

    but make a few changes

    now I have this  :

     public float From
            {
                get { return _from; }
                set
                {
                    _from = SeriesCollection[0].ActualValues ;
                    OnPropertyChanged("From");
                }
            }

    but I keep getting an error that says " Cannot implicitly convert type 'LiveCharts.IChartValues' to 'float'"

    now they have this :

    public double From
            {
                get { return _from; }
                set
                {
                    _from = value;
                    OnPropertyChanged("From");
                }
            }

    but there value is this :

     public ChartValues<double> Values { get; set; }
    
     Values = new ChartValues<double>();

    how is there working but mines is now ?



    Hi     Btb4198,

    As far as I know, the ChartValues type may the special type in LiveCharts(may be a data collection). You need to go to theSupport issue center for getting suitable help.


    Thank you for your understanding.

    Best Regards

    Yong Lu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 13, 2019 5:29 AM