-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BoxPlotSeries to OxyPlot.WPF #425
Comments
I've now tried to set the items directly instead of using ItemsSource and suddenly it magically works. So the problem seems to be somewhere with the ItemsSource Binding stuff. Please anyone got an idea why this doesn't work? <classes:BoxPlotSeries Fill="Orange">
<classes:BoxPlotSeries.Items>
<series:BoxPlotItem BoxBottom="15"
BoxTop="25"
LowerWhisker="10"
Median="20"
UpperWhisker="30"
X="1" />
</classes:BoxPlotSeries.Items>
</classes:BoxPlotSeries> PS: The BoxPlotItem implementation should probably check if Outliers are null before trying to merge them as it results in an error. I currently fixed it by this: if (this.ItemsSource == null)
{
s.Items.Clear();
foreach (var item in this.Items)
{
var boxPlotItem = (OxyPlot.Series.BoxPlotItem)item;
if (boxPlotItem.Outliers == null)
boxPlotItem.Outliers = new List<double>();
s.Items.Add(boxPlotItem);
}
} |
I borrowed some code from BarBaseSeries and got it to work, but I had to do some changes on OxyPlot.Series.BoxPlot. I will try to make a pullrequest later. |
I'm trying to add a BoxPlotSeries for WPF (and want to create a pull request for it later), but for some reason I can't get it to work.
Does anyone see what's wrong with my code?
View:
ViewModel:
Implementation:
The text was updated successfully, but these errors were encountered: