Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all articles
Browse latest Browse all 2061

New Post: Examples and Documentation

$
0
0
For a WPF application,

1) should I import all the following 3 references:
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Wpf;
If I do, then for the following code:
var dateTimeAxis1 = new DateTimeAxis();
var linearAxis1 = new LinearAxis();
I get errors:
'DateTimeAxis' is an ambiguous reference between 'OxyPlot.Axes.DateTimeAxis' and 'OxyPlot.Wpf.DateTimeAxis'
'LinearAxis' is an ambiguous reference between 'OxyPlot.Axes.LinearAxis' and 'OxyPlot.Wpf.LinearAxis'

Can the example code use fully qualified path to avoid ambiguity?

For WPF Axis objects, should I use OxyPlot.Axes. or OxyPlot.Wpf. ?


2) for the code:
var lineSeries1 = new LineSeries();
lineSeries1.MarkerFill = OxyColor.FromArgb(255, 78, 154, 6);
I get error:
Cannot implicitly convert type 'OxyPlot.OxyColor' to 'System.Windows.Media.Color'

How to use OxyColorConverter in this case?

3) For the code:
OxyPlot.Series.LineSeries opLS = new OxyPlot.Series.LineSeries();
opLS.Points.Add(new DataPoint(41363, 0));

OxyPlot.Wpf.LineSeries opWpfLS = new OxyPlot.Wpf.LineSeries();
opWpfLS.__???__
Method 'Points' is available for OxyPlot.Series.LineSeries and not for OxyPlot.Wpf.LineSeries

Thanks,
-srinivas y.

Viewing all articles
Browse latest Browse all 2061

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>