Is it possible to use this library for periodical data ?

Jun 5, 2012 at 3:24 PM

Hi all, this is very amazing control library - i like it and i wont to use it in my project, but there is some question, which i wont to ask before.

Is it possible to use this library for periodic data ? I prepared some example - please look at it. Can i make somethink look like this using your library ?

Coordinator
Jun 5, 2012 at 6:40 PM

You can add undefined DataPoints in a LineSeries to create gaps in the line. See the 'filtering invalid points' example in the 'example browser'. The horizontal axis can probably be defined by a TimeSpanAxis or DateTimeAxis.

Jun 5, 2012 at 8:54 PM
Edited Jun 8, 2012 at 12:23 PM

Thank You for your answer! I think - the point of interest is TimeSpanAxis. I am using D3 library now - unfortunately, there are some points, which i can't reach. And, that is why I am looking alternative (WPF) charting library.  Ok, if You don't mind - I will ask some more questions:

(Obsolete) 1. Can I programmatically set visible DateTime period using horizontal TimeSpanAxis (or DateTimeAxis) ? - i have custom timeline control in my project - user can set visible period only using it (pan and zoom functionality also available). 

2. Can I add some visual elements into plotter ? I mean line, rectange etc. (I need to paint over the area on a plotter using a translucent color - for example - to paint over a period of time when the application runs and draw a few graphs on top of this area. If it is not clear - i can provide some example - what I wont).

UPD: I tried to use RectangleBarSeries - sometimes it works good and exactly how I want, but sometime not:

var rectangleBarItem = new RectangleBarItem { 
X0 = DateTimeAxis.ToDouble(activityEntry.From), 
Y0 = double.MinValue, 
X1 = DateTimeAxis.ToDouble(activityEntry.To), 
Y1 = double.MaxValue,
Color = oxyColor };

rectangleBar.Items.Add(rectangleBarItem);

(Obsolete) 3. Can I combine different types of visualization objects in one plotter ? (I mean - few LineSeries with undefined DataPoints plus few ScatterSeries - some about 10 - 15 ;) ). 

(Obsolete) 4. Can I customize legend ? (For example - add some image for element in legend, programmatically (or using binding) set visibility of legend ?)

(Obsolete) 5. Can I programmatically or using binding set visibility of LineSeries (ScatterSeries) ?

(Obsolete) 6. Is there some built in scaling functionality ? 

(Obsolete) 7. Is there some "auto fit to view" functionality or "fit to view" method ? (If I add one LineSeries with max Y value 10 and after that add new LineSeries with max Y value 1000 - vertical axis change it max value to 1000 automatically?).

Thank You again! (... and sorry for my bad english :) )

Jun 8, 2012 at 10:47 AM
Edited Jun 8, 2012 at 10:57 AM

UP!

I tried to set MajorGridlineStyle and MinorGridlineStyle for axis - when plotter contains some series - it looks good, but if I remove all series from plotter - i get next: pic1 pic2

Coordinator
Jun 8, 2012 at 11:26 AM

See http://oxyplot.codeplex.com/discussions/357350

Jun 8, 2012 at 11:48 AM

Good, thank You! Just replace MinorGridlineStyle = LineStyle.Dot to MinorGridlineStyle = LineStyle.Dash and problem is gone!

How about my question from previous post (#2) - is there some solution ?

Coordinator
Jun 8, 2012 at 11:56 AM

#2: it seems there is some bug in the RectangleBarSeries. Will try to reproduce this later.

You can also add line and polygon "Annotations", these will not show up in the legends box.

#4: oxyplot does currently not support bitmap images. You can create custom marker symbols, see one of the examples.

Jun 8, 2012 at 12:23 PM
objo wrote:

#2: it seems there is some bug in the RectangleBarSeries. Will try to reproduce this later.

You can also add line and polygon "Annotations", these will not show up in the legends box.

#4: oxyplot does currently not support bitmap images. You can create custom marker symbols, see one of the examples.

You can reproduce this using RectangleBarSeriesExamples.cs class from ExampleBrowser:

var s1 = new RectangleBarSeries { Title = "RectangleBarSeries 1" };
s1.Items.Add(new RectangleBarItem { X0 = 2, X1 = 8, Y0 = 1, Y1 = double.MaxValue });
s1.Items.Add(new RectangleBarItem { X0 = 6, X1 = 12, Y0 = 6, Y1 = 7 });
model.Series.Add(s1);

I tried to use poligon annotations and AreaSeries - but such solution doesn't work well for me. RectangleBarSeries is a best solution (item in the legend box, only one object for manipulation in code etc.).

Jun 13, 2012 at 2:05 PM

Hello again, Objo! Did you try to reproduce issue with RectangleBarItem? 

Coordinator
Jun 19, 2012 at 10:28 AM

I will look into this later! I don't think MaxValue/MinValue should be valid data (e.g. these values will be filtered out in the LineSeries). Should create a custom series instead!