Rendering contexts
cpuserdi wrote at 2013-08-01 21:24:
objo wrote at 2013-08-07 13:07:
There were also some visual issues with the other rendering contexts that I did not have with the one based on shapes.
To improve performance in WPF, I would rather look at DirectX based solutions as in VisiBlox and LightningChart!
(WinRT) Styling a PieSeries in XAML
rukko wrote at 2013-03-12 11:38:
I'm trying to use a PieSeries in XAML, so that I can bind the values of the PieSlices directly to properties, letting me wrap the entire thing in a UserControl.
I'm having trouble specifying the Fill property. OxyColor does not support conversion from a string, and I can't stick one in a page resource because XAML does not support conversion from string to bytes (required to specify the R, G and B values of the colour).
Here is the XAML (where metro: is OxyPlot.Metro, and oxy is OxyPlot)
<metro:Plot Width="50" Height="50">
<metro:Plot.Model>
<oxy:PlotModel>
<oxy:PlotModel.Series>
<oxy:PieSeries InnerDiameter="0.7"
StartAngle="-90">
<oxy:PieSeries.Slices>
<oxy:PieSlice Value={Binding Progress} Fill="???"/>
<oxy:PieSlice Value={Binding ProgressComp}/>
</oxy:PieSeries.Slices>
</oxy:PieSeries>
</oxy:PlotModel.Series>
</oxy:PlotModel>
</metro:Plot.Model>
</metro:Plot>
I wrote a converter to convert a Color to an OxyColor (and then assigning the value to the Fill property of the slice), but I receive a XamlParseException: Unable to assign to property 'Fill' at runtime.
Any help?
DateTimeAxis Interpolation
Jumaga2015 wrote at 2013-05-06 17:41:
It is possible to generate a DateTimeAxis with only the days in the serie?
Dates may behave in the serie like a ordinal serie?
congratulations, OxyPlot is a great job.
objo wrote at 2013-06-08 11:40:
- DateTime values are converted to double values (days since 1900, like Excel)
- tries to find automatix major/minor intervals that are 'nice'
- converts the double values to DateTime before formatting labels
DateTimeAxis.ToDouble
static method to get the ordinal values for the dates.
Undefined points should not be plotted, if you want to interpolate you must do this in your code.
TIFF export
ambrein2 wrote at 2014-01-24 17:47:
objo wrote at 2014-01-25 22:50:
Or do you want to export plots in a report to TIFF?
Only PNG is supported - see the
PngExporter
on most platforms. http://oxyplot.org/doc/API/OxyPlot.Wpf.PngExporter.html
For WPF you can easily add TIFF export: Create a class like
PngExporter
, and replace the
PngBitmapEncoder
by a TiffBitmapEncoder
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.tiffbitmapencoder(v=vs.110).aspx
ambrein2 wrote at 2014-01-27 17:21:
Yes I want to be able to export plots in a report to TIFF. Thanks for the links to TiffBitmapEncoder. I will try out what you have suggested. Do you think the quality of exported tiff will be good using TiffBitmapEncoder? One of my requirements is that when zoomed in to the TIFF report should still have high quality(no jaggies).
Thanks,
Mandar
objo wrote at 2014-01-27 19:16:
If you implement a exporter based on TiffBitmapEncoder, try
TiffCompressOption.None
:
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.tiffcompressoption(v=vs.110).aspx
Tornado Plots
RobUrsem wrote at 2012-03-08 05:07:
I'm looking at OxyPlot for use in our application and I'm very impressed by the functionality but also the incredible speed.
Since our application is very heavy on statistical analysis, we require rendering of Tornado Plots (http://en.wikipedia.org/wiki/Tornado_diagram). I tried to recreate this with the bar chart in OxyPlot, but I cannot get it to work. One reason for this is that the bar plot assumes there is only a single value, where the tornado plots usually have two (a minimum and a maximum). Furthermore I need each bar to have a different color. If I use a collection of 'items' I don't see a way to specify a minimum and a maximum value as well as a bar color.
It would be great if this could be considered as a feature in the near future.
I'm hoping that with a simple extension this can be achieved, but as I only have looked at the toolkit recently and the documentation currently is rather 'thin' I have no idea where to start doing that. If it is relatively straight forward to implement this type of plot, could anyone give me a shove in the right direction?
objo wrote at 2012-03-09 08:44:
It is possible to create a tornado plot by two stacked BarSeries where you set the BaseValue property. The Maximum and Minimum values must be relative to the BaseValue. I will add an example on this.
But I see a custom "TornadoBarSeries" would be easier to use, and it should be quite easy to implement.
- should it only support horizontal bars (not columns)?
- two colours only? (one for the minimum and one for the maximum values)
- labels at the minimum and maximum? (I didn't quite understand the numbers on the wikipedia page)
- automatic sorting? (sort by length of bar?)
RobUrsem wrote at 2012-03-09 15:54:
Objo,
Only horizontal bars would be needed. Indeed they are sorted such that the longest bar is always at the top.
Yes the labels at the min and the max are needed. Usually they have two colors but in the plots that we have in our current product, each of the bars have a different color. If we would be able to provide a collection of colors that would be best.
objo wrote at 2012-03-12 06:25:
I added a "TornadoBarSeries" where you can specify a BaseValue and a collection of Minimum, Maximum values. Sorting of the items is not implemented, that should be done by the code that creates the series. It is possible to set the color of the "minimum" and "maximum" parts of the bars in the TornadoBarSeries, or for each item.
See the TornadoBarSeries example in the ExampleLibrary/ExampleBrowser.
Polar / Linear axes on the same plot
tboloo wrote at 2013-02-28 21:15:
I am trying to recreate following chart
So far I have achieved such effect:
which is not quite what I want. My question is: is it possible at all to create such plot using oxyplot (with radial plot being clipped by linear, etc.) ?
Looking forward for the answer,
Bolek.
objo wrote at 2013-03-13 21:38:
Annotation
base class contains references to the X and Y axes, and there are
IRenderContext
extension methods that supports line clipping!tboloo wrote at 2013-03-18 09:09:
Thank you for the reply, I managed to get the desired effect with annotations.
Regards,
Bolek.
David_NET wrote at 2013-12-09 10:30:
objo wrote at 2013-12-09 21:45:
OxyPlot LineSeries Tracker Property DataPoint
I have a List of DataPoints, rendered as a LineSeries. I was working on converting these datapoints to a custom format to add my own property that should be calculated just-in-time (if possible) or beforehand if not.
As the IDataPoint Interface is missing I can not have a function on my CustomDataPoint to calculate the difference to a certain value as I intended to build:
(With TrackerString = "....{difference}")
MyDataPoint : IDataPoint
{
public string difference
{
get
{
return (certainDataValue-X)
...
As DataPoint is a struct I can not expand it to add this calculation. Do you know of any way that I can achieve this without implementing my own tracker feature?
Thanks alot!
0x54726F6E
OxyPlot with dynamic data series
cpuserdi wrote at 2013-07-30 21:09:
everytimer wrote at 2013-08-01 00:10:
cpuserdi wrote at 2013-08-01 14:58:
everytimer wrote at 2013-08-01 17:23:
Good luck
Contour Plot
nitekonline wrote at 2014-06-03 15:43:
I'm trying to plot a contour map/heatmap to produce a representation of a wafer thickness.
I only have xyz dataset as follows:
X Y Z
0.025 6.915 202.17
-50.116 61.255 144.99
50.123 61.295 172.92
50.166 -47.425 218.53
-50.074 -47.465 162.61
-0.018 115.635 152.77
100.233 88.494 192.23
125.325 6.964 155.08
100.297 -74.586 145.74
0.078 -128.985 216.98
-100.183 -74.664 146.37
-125.275 6.866 134.94
-100.247 88.416 119.83
-75.198 115.605 127.53
75.162 115.664 178.94
75.248 -101.776 159.43
-75.112 -101.835 150.74
Could someone provide me some guidance on how to plot this? Thanks
cureos wrote at 2014-06-03 16:15:
ContourSeries
and
HeatMapSeries
expect a 2-D rectilinear grid of data.
If this is indeed the case, you would first need to sample your scattered 2-D data onto a rectilinear grid with some kind of interpolation technique (Wikipedia). Then, initialize your
ContourSeries
or HeatMapSeries
using the resampled rectilinear grid. You'll find sufficient code examples in the
example browser for defining these types of series.nitekonline wrote at 2014-06-03 16:50:
Selection of range
amity2001 wrote at 2012-10-09 08:08:
First of all, thank you very much for such a great library.
I am looking for feature of selection of range in graph.
Is it possible to select particular area on graph similar to rectangular zooming by dragging mouse with middle button?
Please refer similar feature of FLOT library here, http://people.iola.dk/olau/flot/examples/selection.html
Thanks in advance.
objo wrote at 2012-10-09 21:08:
Yes, this should be possible by handling mouse events on the PlotModel and modifying a RectangleAnnotation. See the mouse event examples in the example browser, which do almost the same thing.
objo wrote at 2012-10-09 21:52:
See the new example in the the example browsers: "Mouse events | Select range"
Servicio de atención al cliente por UserEcho