This is the discussion forum for OxyPlot.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!

Knowing when InvalidePlot (Rendering) has completed

csharpuser 6 years ago in API updated by SHK 3 years ago 3
I have a plot with a large number of points (>300000) and when I call, PlotView.InvalidatePlot(true), it takes a while to render. This is acceptable but I would like to put up an hourglass or some other indication that things will take a while. I'm having some problems though as I don't know when the Rendering is complete. I can't find an event that I can subscribe to. Is there one?

I call MyPlot.InvalidatePlot(true); from the main GUI thread. If my understanding is correct, InvalidatePlot works on another thread. Presumeably, it must get back on the GUI thread to actually plot data. I tried using the following:

Mouse.OverrideCursor = Cursors.Wait;
Mouse.OverrideCursor = null;

and other similar ideas but to no avail. I'm guessing that InvalidatePlot is a non blocking call. What I really need to do is switch to Cursors.Wait and then in some event, set the cursor back again. I was hoping for something like:

MyPlot.RenderingCompleted or some such thing. Can someone give me some pointers?


Keeping the X axis scale and scrolling to the rightmost?

Jeong-hun Sin 7 years ago in API updated 7 years ago 1
My work is almost done, and this is the last (I hope) barrier I have encountered.
The X axis is time, and data points are added in real time. The default behaviour seems (I did nothing but calling InvalidatePlot(true)) showing all data points by shrinking the entire graph. This is not what I want.

What I want is keeping the current scale (whichever the user has set by his/her mouse wheel) of the X axis as it is, and scrolling to the rightmost when new data points are added. Note that the data points are not added in the exactly same time interval. That is, one can be added at 0:01, the next one at 0:03 and the next one at 0:04.

Is this possible? I tried to set Minimum (users may scroll horizontally to the left before the first visible data point) and Absolute Maximum (users are not allowed to scroll horizontally to the right beyond the last data point) but it still was shrinking.
Under review

multiple plots

mike 6 years ago in API updated 6 years ago 6

I would like to know if there is an easy way to create multiple subplots in a single PlotModel. 
Obviously I can just create several PlotModels and achieve something similar, but is there a better more elegant way to do it?


Adjust ColumnSeries.ColumnWidth / CategoryAxis.IntervalLength

Chris 5 years ago in API 0


I'm using the current version of Oxyplot.Silverlight. By the way, thx for this great library!

I have a CategoryAxis with 2 stacked column series. They can contain very few items (<10) or a lot of items(>50). The Plotview/x-axis should cover the whole available drawing area, but if there are less than 10 items, the columns get stretched which looks very ugly. Counterwise, if there are more than 50 values, the items are way too thin, so the labels overlap. I already used rotated labels with an angle of 90°.

I did not found a way to force the column width to a specified value without shortening the x-axis too. I already tried ColumnSeries.ColumnWidth and CategoryAxis.IntervalLength, but they didn't work out as expected.

Am I missing something?

Thx in advance for your help.

Under review

WPF tracker multiple value

pitipilot 6 years ago in API updated by Oystein Bjorke 5 years ago 6
Hi all,
Currently, I've two line series for one plot model. I want to know if it's possible to have a tracker with multiple value like this example :

Best regards.

Axis label next to tickmarks

Andrew Strickland 6 years ago in API updated by chaselfromal 3 years ago 1
I have design that call for have the axis label info to be to the left of the major tick lines. I know how to set the Tick lines below the the axis line, but the only thing I see for label is how to format the text and change the angle. Is there a way to change the position?
Under review

What should I use instead of LineSeries?

Jeong-hun Sin 7 years ago in API updated by anonymous 7 years ago 1
I am upgrading from a two-year old version. LineSeries is marked as [Obsolete], but there is no information what class I should use instead.
Under review

Render a part of a series.

fuc2wi 6 years ago in API updated by justSomeone 5 years ago 2

I'm using OxyPlot 2014.1.546.0 in a WPF project. I've 10 stairstep series with each ~11000 Points.
To increase performance I want to render only every nth point depending of the zoom?
Eg: Render every 10th point if I see the whole x-Axis and render every 5th point if I see the half of the x-Axis, and so on?

Thanks for your help in advance.
Best regards

Individual column/bar selection.

bkboggy 6 years ago in API updated 6 years ago 6
I've been trying to figure this out all night and haven't managed to find any code or any discussions to assist me with this one.  Similar discussions were focused on points in scatter and line charts, but nothing regarding columns or bars.

I have a requirement of being able to select individual columns in a column chart to access related data; however, none of my attempts at handling selection changed or mouse down produced any viable results.  SelectionChanged event doesn't even fire for me and no visible selection happens.  SelectionColor for the model does not appear to do anything and SelectionMode doesn't produce any visible behavior with selection enabled in the ColumnSeries.

syncronize x axes between two plots during panning/zooming

Mischa Vreeburg 6 years ago in API 0
I had a question about how to sync the displayed area and the axes between two plotmodels.
I want to be able to zoom / pan in one plot and have the other move and keep the x axis in sync.
How would I do this.