Stackable LineSeries. Is it possible?
vindex wrote at 2013-07-14 18:15:
I was wondering if it is possible to stack line series, to get something like this:
I've been looking in the examples, but didn't find any similar...
Thank you
everytimer wrote at 2013-07-14 19:31:
If you have different X spacing you can't stack the lines point-per-point, you need first generate intermediate points in both lines, and then proceed with the addition.
Good luck
vindex wrote at 2013-07-14 20:11:
public IEnumerable<AreaSeries> StackLineSeries(IList<LineSeries> series)
{
double[] total = new double[series[0].Points.Count];
LineSeries lineSeries;
AreaSeries areaSeries;
for (int s = 0; s < series.Count; s++)
{
lineSeries = series[s];
areaSeries = new AreaSeries();
for (int p = 0; p<lineSeries.Points.Count; p++)
{
double x = lineSeries.Points[p].X;
double y = lineSeries.Points[p].Y;
areaSeries.Points.Add(new DataPoint(x, total[p]));
total[p] += y;
areaSeries.Points2.Add(new DataPoint(x, total[p]));
}
yield return areaSeries;
}
}
csv export of line series
aec wrote at 2012-08-30 19:17:
Hi obj. You have written an export demo where it is possible to export a plot model to (for instance) csv format. Can you do this also for line series? Than you can use this export routine as well for the export of plot models.
I think that an export of a line series could be interesting for developers. Having such a routine, one is able to write an export function if some clicks on the curve or on the legend to export the raw data.
aec wrote at 2012-08-31 09:42:
Another application is to compare simulation results with measurement data. First you simulate something and plot this into a window. Afterwards you load the measurement data and plot them also to the window.
In such a situation it will be more convenient to have an import/export function for line series because the measurement data are often available in csv format.
objo wrote at 2012-09-05 21:03:
I think this should be the responsibility of the application! But I think it requires the selection feature (http://oxyplot.codeplex.com/workitem/8193) if you want to click and export one curve only.
I see it could also be convenient to have it built-into the plot controls, so I added it as issue http://oxyplot.codeplex.com/workitem/10002!
aec wrote at 2012-09-06 08:32:
Hi objo. Thanks for this support. Of course, I agree with you, that the application should be responsible for such a feature. On the other hand you intend to support a selection feature. I didn't know that before.
But with this information I think that a built-in function is not necessary and yields less flexibility. Think about different possible csv formats ... Instead of a built-in function with minor flexibility an export example based on the selection feature would be sufficient. This could avoid further feature requests because everyone has than a template which can be modified for special purposes.
Fill area above and below baseline
alex4Zero wrote at 2014-03-07 07:12:
Does anybody knows how to paint this kind of graphic with oxyplot?
The idea is to fill areas above of some baseline with one color and another color below baseline?
objo wrote at 2014-03-07 15:24:
TwoColorLineSeries
class. Maybe we can create a new TwoColorAreaSeries
? Or can you suggest a better name?
https://oxyplot.codeplex.com/workitem/10150
alex4Zero wrote at 2014-03-10 09:14:
I think this is a new feature, but it would be nice to add a series type that draws this in the core library! It is somewhat similar to theCurrently we did it with 2 area series. One is above baseline, one is below. For me it looks like an AreaSeries with BaseLine. Probably BaselineAreaSeries?TwoColorLineSeries
class. Maybe we can create a newTwoColorAreaSeries
? Or can you suggest a better name?
https://oxyplot.codeplex.com/workitem/10150
skichuk wrote at 2014-03-10 09:30:
Currently we did it with 2 area series. One is above baseline, one is below. For me it looks like an AreaSeries with BaseLine. Probably BaselineAreaSeries?
Yes it is two AreaSeries and one is LineSeries, user of this type of graph should now only about LineSeries, and two Colors below and above Baseline and the coordinate of this base line if it is horizontal it will be vertical coordinate for example BaseLineY
Set position
Ivan_kol wrote at 2013-07-13 15:27:
For example I have the X-axis date-time, I want to point out is the date on H-time, how do? And put on this place a vertical line.
With the positioning of the options is not even found a line and tried to put an annotation, not too successfully.
Tracker Event?
SlickRick wrote at 2013-06-19 22:49:
I was wondering if it was possible to listen to changes of the nearest item of the tracker?
I was able to get this information by using the series mouse Down and plot mouse move events in combination and retreiving the nearest point of the tracked serie.
Although i was guessing that there might be an easiest way of doing this?
Basically i want to know the current datapoint that is currently displayed by the tracker so that i can syncronize another window with the currently selected information and keep it in sync when the user moves along the lineseries (as long as the tracker is shown)
(sorry if this is a duplicated thread but i have tried to search for similar one but couldn't find any discussion similar to what i want)
Thanks.
Methods are missing on OxyPlot.Wpf when using NuGet
thomasachim wrote at 2014-06-11 19:46:
I just started working with OxyPlot on my WPF project. So the first thing that I noticed is that when I import OxyPlot.Core and OxyPlot.Wpf using NuGet there are some methods missing, e.g. the method RefreshPlot(bool), but there are even more missing. I found another OxyPlot DLL on GitHub where these methods are included. Of course I can use this DLL but I just want to ask if I am doing anything wrong importing this references? Or why are some methods missing when I import the OxyPlot references?
Thanks to everybody in advance!!!
MonoMac version
faufab08 wrote at 2013-04-22 19:27:
objo wrote at 2013-04-24 11:02:
faufab08 wrote at 2013-04-29 08:48:
objo wrote at 2013-04-29 11:13:
faufab08 wrote at 2013-04-29 11:37:
objo wrote at 2013-04-29 12:40:
Axis with fixed values on a stream
user78483 wrote at 2013-10-17 09:18:
is it possible to always show the latest defined range (via minimum and maximum) on a running stream?
I do have a continous stream adding values 1,2,3,4,5sec and so on. My x-axis should only show the last second. The labels should show 0 to 1 for example.
I can do this, always cutting the last second and changing x-values from 0 to 1, but this is not satisfactory.
Any idea how to do that? A plus would be if I can also zoom.
Thanks in advance
everytimer wrote at 2013-10-17 12:13:
user78483 wrote at 2013-10-17 14:27:
I simply added the event like so:
var timeAxis = new LinearAxis(AxisPosition.Bottom, 0) { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, Title = "Time", Unit="s" };
PlotModel.Axes.Add(timeAxis);
timeAxis.AxisChanged +=timeAxis_AxisChanged;
So there is no min/max defined and the axis increases its values as needed.I would like to get a (oscilloscope like) behaviour like this. That the X axis is fixed to a small window of 5 seconds of the newest data, here is an example:
Oxyplot plot not displaying in Prism module loaded by Unity
Servicio de atención al cliente por UserEcho