![](/s/cache/3c/17/3c175025a120dab5a1c928e93ae3e018.png)
WPF ContextMenu for Markers of LineSeries and ScatterSeries
Hi, Im trying to create a ContextMenu for markers of LineSeries and ScatterSeries.
Due there's no build in option, Im trying to get the current clicked (or nearest) clicked marker of multiple series inside the Plot.
I refered to the MouseEventExample, but I don't know how to transform the mouse position in WPF, because there are many methods that have been used in the example missing.
Any Ideas?
For more information here, refer to my question on StackOverflow:
http://stackoverflow.com/questions/33873750/oxyplot-contextmenu-for-markers-in-wpf
![](https://cdn.userecho.com/characters/79.png?1)
Building OxyPlot for WP8
PatrykCwiek wrote at 2013-04-08 15:41:
I have managed to get OxyPlot working on WP8, but there's a strange issue I'm experiencing when trying to set up a project to build one DLL.
If I include the OxyPlot (core) and OxyPlot.Silverlight_SL4 projects, then reference them both from WP8 project, I get fully working plots out of the box, even though Visual Studio complains that I'm referencing a Silverlight project which might not work properly . You can't include SL5 version - "The reference must be a Windows Phone project that targets the current or earlier version of the Windows Phone OS".
Now I can move the sources to WP8 project and build it - everything goes smoothly, it just works on the build stage. But then when I try to use this particular project in a WP8 app, I get blank screens - plots don't get rendered at all, I tried fiddling with various options to no avail.
Now, I have no idea why the exact same code works when it's in a SL4 project, but doesn't when in WP8 project, so I'd appreciate any thoughts.
If it's (relatively) easy to fix, I could just create a fork with the WP8 project and submit a pull request later on...
![](https://cdn.userecho.com/characters/79.png?1)
Change Current DrawingContext to one using OpenGL
sunwayking wrote at 2014-07-12 14:01:
Recently, I had a try on OpenGL and soon fell in love with it:)
Why I finally choose OpenGL? Here're some reasons.
*Best performance!Hardware acceleration!
*cross platform: Windows, Unix, Linux, Mac OS,Andorid,WP....
*supporting .net on all platform with the help with Mono project, but only window support WPF.
*More Low-Level APIs which are easy to use.
To use OpenGL cross platform, I recommend OpenTK(Open Toolkit). The Open Toolkit is an advanced, low-level C# library that wraps OpenGL, OpenCL and OpenAL. There's another outstanding OpenGL library on .net framework whose name is SharpGL. However SharpGL just supports Windows while OpenTK supports all.
To make a new DrawingContext is not easy, I think it's necessary to give some changes to PlotView in order to maintain compatibility with existing DrawingContexts. So do you agree with me, objo?
In the end, BitmapDrawingContext is available for you all:
Supporting directly downloading with IE:
Download OxyPlot.Wpf.Extension (for WPF only)
![](https://cdn.userecho.com/characters/79.png?1)
Programatically (or via XAML) Define color for each bar in ColumnSeries
jg11 wrote at 2014-04-30 20:30:
I have a Plot with seven ColumnSeries. I need to set each bar color (in each of the series) based on a property in the model.
From the code, I tried defining a list of colors in DefaultColors the chart is drawn where all the bars in the 1st series are drawn with DefaultColor[0] and all the bars in the 2nd series are drawn with DefaultColors[1], etc.
eg: plotModel.Series.Add(new ColumnSeries { Title = "V1", ItemsSource = CellList, ValueField = "CellVoltage" });
OxyColor defaultColor = OxyColor.Parse("#FF000080"); // Default -- blue
plotModel.DefaultColors.Add(defaultColor);
...
From XAML, I tried to set FillColor binding to a method that should return a bar color, but it appears to return the same color for all bars in the series. eg: <oxy:ColumnSeries Title="V1" ItemsSource="{Binding Path=CellList}" ValueField="Voltage" FillColor="{Binding Path=CellBarColor}" />
Thank you for your help jg
![](https://cdn.userecho.com/characters/79.png?1)
Moving the project to GitHub
See also the Google trends
github/codeplex/bitbucket/google code
hg/git
But is there a reason why GitHub has not included this?
Is stack overflow an alternative for questions on how to use the library, and then use the issue tracker to discuss defects and new features?
http://programmers.stackexchange.com/questions/87049/how-come-many-project-hosting-sites-doesnt-have-a-forum-feature
http://discuss.atom.io/t/why-discourse-instead-of-github-issues/3986
Some projects like to use the issue tracker for asking question, but I find it gets crowded quickly and you end up having hard time trying to sort bugs/features requests and questions.
Hmm looks like you can use Pelican to setup github.io pages (link1 link2 link3) and use reStructuedText (or 3 other markups). Now I don't have an excuse anymore lol.
The main reason for changing would be to make it easier to collaborate and manage contributions. It would be interesting to know if changing to GitHub would make more people interested in contributing to the project!
But the lack of discussion forum + loosing issue and discussion history + the work of moving 157 issues could be reason enough to stay with CodePlex...
I would be more interested in contributing to the project. GitHub is a site with more focus on developers who want to help coding OxyPlot while CodePlex seems to have more focus on the discussions. I find more information on StackOverflow than on CodePlex when i have some problems, so i mostly don't use CodePlex. And when i have some bugs i would rather find the OxyPlot code and fix it on GitHub than on CodePlex because it's more clear and easier for me.
An example: I got an NullReferenceException on OxyPlot/Series/XYAxisSeries.cs: Line 181. I search in CodePlex, find the file but it does not show any lines. So i have to count the lines to get line 181?!
I agree with the forum problem: it would be better if there is a discussion site like on CodePlex. I would suggest a simple forum with phpBB or vBulletin. For discussions but also for wishes, problems, future versions, examples, download versions, etc.
PS: Notice, that there is no download button in GitHub for end user downloads. These must be provided by the discussion site or project site.
I will do some testing with github next week, I have created
https://github.com/objorke/oxyplot
and pushed the history from the codeplex repository (with kiln).
I will try to transfer the issues from codeplex to https://github.com/objorke/oxyplot/issues
Is it possible to automate this? Or can someone help transferring manually?
I also created
http://objorke.github.io/oxyplot/
It will be interesting to see if this can replace the content of http://oxyplot.org (which means the content of ~/Documentation and ~/Web should be moved and the folders can be removed from the repository)
Note: Codeplex is still the official location for discussions, issues and code.
I'd be happy to help out moving the issues over on the weekend if you want to coordinate it somehow, also found this: Codeplex Issue Importer. Depending on what you're using to generate the github.io page it should be pretty simple to rewrite it in Markdown or reStructuredText and make it look nice, I've seen quite a few nice ones to use as an example out there.
Also, again, welcome back Objo! No clue where you went, but it's nice to see you active again =).
Here is a test repository with imported issues:
https://github.com/objorke/oxyplot-issueimport-test/issues
note:
- not including closed issues
- attachments are not included
https://oxyplot.userecho.com/topic/489030-oxyplot-moving-the-project-to-github/
The new repository is at https://github.com/oxyplot/oxyplot
It seems like also some of the committers are recognized at GitHub!
I guess there are only a few things left, that maybe needed:
- a download button/section for the binaries
- maybe one more hint about the license (in FAQ section?)
![](https://cdn.userecho.com/characters/79.png?1)
wpf CanTrackerInterpolatePoints
ChevyCP wrote at 2012-01-30 16:08:
Hi,
Would it be possible to expose the "CanTrackerInterpolatePoints" property in xaml for the line series? It would just be a lot easier than getting at it in code. Just a suggestion.
Thanks!
objo wrote at 2012-01-30 19:47:
try the latest version, change set 74462.
ChevyCP wrote at 2012-01-30 20:17:
Awesome! Thanks!
![](https://cdn.userecho.com/characters/79.png?1)
Multiple LineSeries Binding
everytimer wrote at 2013-06-19 20:39:
I'm looking for something like this:
<oxy:Plot>
<oxy:Plot.Series>
<oxy:LineSeries ItemsSource="{Binding myCollectionOfLineSeries}" />
</oxy:Plot.Series>
</oxy:Plot>
Where myCollectionOfLineSeries is:
private ObservableCollection<LineSeries> _myCollectionOfLineSeries ;
public ObservableCollection<LineSeries> myCollectionOfLineSeries
{
get
{
return _myCollectionOfLineSeries ;
}
set
{
_myCollectionOfLineSeries = value;
OnPropertyChanged("myCollectionOfLineSeries ");
}
}
objo wrote at 2013-06-19 20:49:
LineSeries
for each line you want to show.
Create a
PlotModel
and bind the Model
property or use code-behind to manipulate the Series collection more dynamically.
I am sure there are also other ways to do it in XAML only (maybe using an attached property??)
everytimer wrote at 2013-06-19 21:17:
http://stackoverflow.com/questions/17198926/multiple-lineseries-binding-in-oxyplot/17199040?noredirect=1#comment24910980_17199040
I'll try to do it trough the PlotModel.
DJDAS wrote at 2013-06-20 14:59:
I had a similar situation some months ago when I needed to "bind" a plot to a custom class which had a set of data representing plot series (mainly StairStepSeries and AreaSeries).
My solution was quite simple: I created a viewmodel which contains one property for each series (List<DataPoint>), binding (in XAML) one OxyPlot series to the corresponding property (the only limitation here is that the series are statically added in XAML but it was ok for my purposes).
To fill in the values I used a simple "SetData" method in my model with my custom class as parameter, the method assigns each "class series" to the corresponding viewmodel property and fills the series using Points.Add(DateTimeAxis.CreateDataPoint(...)) calls.
Hoping to be helpful :)
Bye!
everytimer wrote at 2013-06-20 21:57:
DJDAS wrote at 2013-06-21 09:50:
Bye :)
everytimer wrote at 2013-06-21 15:32:
![](https://cdn.userecho.com/characters/83.png?1)
Customize position of labels in Polar chart
It is possible to change the position of the labels? I've marked in green where it should be located.
![Image 4](/s/attachments/13970/1/7/1aa6f95c6b5bff9368322487b2d3a6d8.png)
![](https://cdn.userecho.com/characters/79.png?1)
DateTime Axis with label dates not 1 January each year
kirbatious wrote at 2014-07-02 16:07:
Is there any way to specify that the x axis labels should instead be every 30 June (or indeed any other date in the year)?
![](https://cdn.userecho.com/characters/79.png?1)
AngleAxis.StartAngle in WPF
ScottyDoesKnow wrote at 2014-04-17 19:45:
The examples in the example browser use StartAngle and EndAngle to solve both of these issues, but those properties don't seem to exist in OxyPlot.Wpf
Is there any way to do this in WPF?
objo wrote at 2014-04-19 08:37:
Customer support service by UserEcho