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

Exception during resize

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

Peter7 wrote at 2012-02-01 10:50:

Hello,

thank you for this great tool, suited perfectly.

During testing our WPF application I encountered an exception in OxyPlot.DataPointSeries.AddDataPoints.
It happened once when I was resizing a window with a plot in it, but I was not able to reproduce this situation.
The plot data are updated periodically in my project, so maybe there was a race condition between updating and resizing?

Maybe the stack trace shown below will help to track down a potential problem.
Anyway I was not able to reproduce it.

Kind regards
Peter

 

Collection was modified; enumeration operation may not execute.

   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at OxyPlot.DataPointSeries.AddDataPoints(IList`1 dest, IEnumerable itemsSource, String dataFieldX, String dataFieldY) in D:\Codeplex\OBJO\OxyPlot\trunk\Source\OxyPlot\Series\DataPointSeries.cs:line 313
   at OxyPlot.DataPointSeries.AddDataPoints(IList`1 points) in D:\Codeplex\OBJO\OxyPlot\trunk\Source\OxyPlot\Series\DataPointSeries.cs:line 284
   at OxyPlot.DataPointSeries.UpdateData() in D:\Codeplex\OBJO\OxyPlot\trunk\Source\OxyPlot\Series\DataPointSeries.cs:line 223
   at OxyPlot.AreaSeries.UpdateData() in D:\Codeplex\OBJO\OxyPlot\trunk\Source\OxyPlot\Series\AreaSeries.cs:line 289
   at OxyPlot.PlotModel.Update(Boolean updateData) in D:\Codeplex\OBJO\OxyPlot\trunk\Source\OxyPlot\PlotModel\PlotModel.cs:line 1083
   at OxyPlot.Wpf.Plot.UpdateModel(Boolean updateData) in D:\Codeplex\OBJO\OxyPlot\trunk\Source\OxyPlot.Wpf\Plot.cs:line 1265
   at OxyPlot.Wpf.Plot.CompositionTargetRendering(Object sender, EventArgs e) in D:\Codeplex\OBJO\OxyPlot\trunk\Source\OxyPlot.Wpf\Plot.cs:line 1032
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at Keba.KSDD.App.App.Main() in C:\work\Keba.KSDD.SDK\Keba.KSDD.App\obj\x86\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

objo wrote at 2012-02-01 11:30:

thanks for reporting the bug! I'll have a look at the DataPointSeries.

the invalidate/update logic in the wpf Plot control should be thread safe (unless I did something wrong). Are you updating the PlotModel directly from your code? I see the PlotModel should also be made thread safe, will add it as an issue!


TorePaulsson wrote at 2014-02-28 09:39:

Hi,
I have same problem now. Not able to solve it.
In WPF application with MVVM pattern, I have the following timer method in the model:
public int ctr = 0;
        void RefreshElapsed(object sender, ElapsedEventArgs e)
        {
            if (Simulated)
            {
                var link = ctr % 10;
                var series = GetDummySeries("Left" + ctr);
                AddSeriesLeft(series, ChartTypeEnum.Voltage, link);
                series = GetDummySeries("Right" + ctr);
                AddSeriesRight(series, ChartTypeEnum.Voltage, link);
            }
            RightPlot.FadeSeries(127, OxyColors.Blue);
            LeftPlot.FadeSeries(127, OxyColors.Blue);
            Application.Current.Dispatcher.BeginInvoke(new Action(() =>
            {
                RightPlot.RefreshPlot(true);
                LeftPlot.RefreshPlot(true);
            }));
            ctr++;
        }
I get the following exception:
A first chance exception of type 'System.InvalidOperationException' occurred in OxyPlot.dll

Additional information: XAxis not defined.

Stack:    at OxyPlot.Series.XYAxisSeries.VerifyAxes() in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\Series\XYAxisSeries.cs:line 417
First I did not have the invoke but I thought it was a race condition so I made it run in the correct thread, but still something is wrong. Also the XAxis is not defines is really strange, since I actually add xaxis like so in the constructor of the view model:
            LeftPlot.Axes.Add(new LinearAxis(AxisPosition.Bottom, "Time [ms]"));
            RightPlot.Axes.Add(new LinearAxis(AxisPosition.Bottom, "Time [ms]"));
I will try and put some Keys for the default x axis.

objo wrote at 2014-02-28 11:56:

This is something we should investigate closer.
I don't want to simply add a null reference test inside XYAxisSeries before we understand what is happening. I think this may be solved on a higher level, maybe with some synchronization code.
Is it possible to make a unit test that reproduces this error? I guess it is a bit challenging to make this, but that should make defining the issue and solving it much easier!

objo wrote at 2014-03-01 13:16:

Could it be a syncrhonization problem? The model should not be updated while the plot is being refreshed.
I have added a note on this in https://oxyplot.codeplex.com/workitem/10144.

How to Plot from an XML or Database

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

UNTEngineer wrote at 2012-07-22 22:52:

Im trying to plot some data points saved in an XML file. Can someone direct me to how to do that? Is there an example in the source code that covers this?


ckoo wrote at 2012-07-23 00:45:

You would have to read the XML file first to get the data you are interested in. Once you have the data you can use it to plot. There is no inbuilt function that will do that for you automatically.

There is a WorldStatisticsDemo project in the DemoApplications folder, that shows you how to import csv files and plot their data, which you could inspire yourself from.


UNTEngineer wrote at 2012-07-23 04:55:

ckoo wrote:There is a WorldStatisticsDemo project in the DemoApplications folder, that shows you how to import csv files and plot their data, which you could inspire yourself from.

Thanks a lot for that. Its helped a bit.


objo wrote at 2012-08-09 00:34:

oxyplot does not support XPath bindings (as wpf). But you can use binding to properties (reflection, not very fast), or create a collection of data points from the contents of the xml file.

See also http://oxyplot.codeplex.com/wikipage?title=Performance&referringTitle=Documentation

Will add more documentation later.

Is there a replacement for KeyboardPanHorizontalStep in XAML?

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

DrStrangeLove wrote at 2014-03-27 15:07:

I am updating my graphs to use the newest version, and noticed that KeyboardPanHorizontalStep and KeyboardPanVerticalStep are no longer allowed in the plot definition in xaml, is there something else that allows the same functionality as these two commands.

Tephyrnex wrote at 2014-08-12 15:40:

DrStrangeLove,

Did you ever find a solution for this. I am in the same predicament.

Thanks.

DateTimeAxis minimum value incorrect?

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

Denisio wrote at 2011-04-19 08:26:

I'm open SilverlightDemo project and modify filling:

            var tmp = new PlotModel("Test");
            tmp.Axes.Add(new LinearAxis(AxisPosition.Left) { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, TickStyle = TickStyle.Outside});
            DateTime dt = new DateTime(201011);
            tmp.Axes.Add(new DateTimeAxis(dt, dt.AddDays(1), AxisPosition.Bottom, nullnullDateTimeIntervalType.Hours)
                             {
                                 MajorGridlineStyle = LineStyle.Solid,
                                 Angle = 90,
                                 StringFormat = "HH:mm",
                                 MajorStep = 0.041666/2// 1/24 = 1 hour, 1/24/2 = 30 minutes
                                 IsZoomEnabled = true,
                                 MaximumPadding = 0,
                                 MinimumPadding = 0,
                                 TickStyle = TickStyle.None
                             });
            
            var ls = new LineSeries("Line1") {DataFieldX = "X", DataFieldY = "Y" };
            List<Item> ii = new List<Item>();
            
            for (int i = 0; i < 24; i++)
                ii.Add(new Item() {X = dt.AddHours(i), Y = i*i});
            ls.ItemsSource = ii;
            tmp.Series.Add(ls);
            tmp.PlotMargins = new OxyThickness(400040);          
            plot1.Model = tmp;

As you see, series contain 24 points, one point per each hour:

But, how I can set minimum value to 00:00 and points 00:30, 01:00, 01:30 and so on?

I playing with some Minimum / ActualMinimum and other properties of DateTimeAxis axis, but I can't found solution for my task.


objo wrote at 2011-04-19 10:58:

hi Denisio, your 'step' size is inaccurate - replace with "MajorStep = 1.0/24/2" and it should work.

I see the AxisBase.CreateTickValues might need some improvements to handle floating point precision issues better.

Also note that the DateTimeAxis and TimeSpanAxis are not quite finished yet, I will do some refactoring soon.


Denisio wrote at 2011-04-19 11:11:

Excellent! Thank you very much!

set LinearAxis AxisPosition.left and LogarithmicAxis AxisPosition.bottom plot uncorrecttly

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

ProCodeMyth wrote at 2012-04-18 10:28:

Hi Objo,

Have been looking around at the source code and your project looks very interesting.

i want plot a x (Logarithmic)-y(Linear) plot ,below is my code

var model = new PlotModel("LogPlotTest");
model.Axes.Add(new LinearAxis(AxisPosition.left, "Depth") {  MinorGridlineStyle = LineStyle.Solid);
model.Axes.Add(new LogarithmicAxis(AxisPosition.bottom, "Rs") {MinorGridlineStyle = LineStyle.Solid});
var data = new LineSeries();
for (double j = 0.1; j < 500;j=j+0.5 )
            {
                double t = Math.Log10(Math.Pow(j,2));
                data.Points.Add(new DataPoint(j,t));
            }
model.Series.Add(data);
this.DataContext = model;

if i set new LinearAxis(AxisPosition.bottem) and LogarithmicAxis(AxisPosition.left),

it can plot perfect as i want to do;

but if i set

model.Axes.Add(new LinearAxis(AxisPosition.left, "Depth") { MinorGridlineStyle = LineStyle.Solid);
model.Axes.Add(new LogarithmicAxis(AxisPosition.bottom, "Rs") {MinorGridlineStyle = LineStyle.Solid});

 

i get wrong plot effect?

please help me:

thanks


objo wrote at 2012-04-18 20:03:

I am not sure if I understand the problem - are your coordinates switched? The bottom/top axis will be used for the x coordinate, and the left/right axis will be used for the y coordinate of your data points.

ps. your series can also be expressed as a 

FunctionSeries(x=>Math.Log10(Math.Pow(x,2)),0.1,500,0.5)


procodemyth wrote at 2012-04-19 02:22:


very thanks your reply 

The default bottom/top axis must be the x coordinate and the default left/right axis must be the y coordinate for  datapoint(x,y)?

for my datapoint(x,y), i want to plot x in left/right axis and y in bottom/top axis, but the plot is not the some as x in bottom and y in left  ,then RotateTransform 90.

PlotAreaBackground in WPF

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

Kcsorensen wrote at 2013-12-16 19:39:

Hi all

If I want to change the plot area color I use this code in c#

ex.
MyPlotModel.PlotAreaBackground = OxyColors.Gray;

But how would I do this direcly in WPF ?

This is no PlotAreaBackground in <oxy:Plot>. Background is for the whole graph.

Thanks in advance.
Kcsorensen

objo wrote at 2013-12-16 20:55:

I added the property

Kcsorensen wrote at 2013-12-16 22:01:

Thanks

I have updated the library so its 16. december through NuGet but I still dont see it?

Should I be able to write it like this ?

ex.
<oxy:Plot PlotAreaBackground="Gray">

Regards
Kcsorensen

objo wrote at 2013-12-16 22:11:

Yes, it should be included in version 2013.2.142.1

Kcsorensen wrote at 2013-12-16 22:21:

I only had 2013.2.141.1.

I can confirm it works with 2013.2.142.1. Thanks alot!

Development Environment

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

rustykey wrote at 2013-04-05 20:51:

I am having trouble getting the source code to run after download. What is the targeted development environment?
0
Under review

Build error after upgrading NuGet package.

Azalin 8 years ago updated 8 years ago 2

Hi,

I upgraded OxyPlot for Xamarin.forms NuGet to 1.0.0-unstable1886 and it upgraded Xamarin.Forms to 1.5.0.6447. No problems on iOS and Android however I keep getting the errors below when I try to build the WP8 project.

I can't be sure if this is whether OxyPlot or Xamarin based so please forgive me posting here.

Any help would be very appreciated.

Best,

Suat

Error 8 Cannot resolve dependency to assembly 'Xamarin.Forms.Core, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

Error 9 Cannot resolve dependency to assembly 'Xamarin.Forms.Core, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

Series visibility, Smooth refresh, CornerRadius/ShowPointer Tracker

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

ChevyCP wrote at 2012-01-18 18:52:

Hi,

    Great package!!  I'm using it in a mission critical package for use at sea on research vessels.  I have three (hopefully) quick questions.  (This is all done in WPF.)

I have about 18 basic line series.  I have a matching checkbox for each and I would like to bind the IsChecked of the checkbox to the visibility of the lineseries.  (Using a boolean to visibility converter like this:  Visibility="{Binding ElementName=CHECKBOX_NAME, Path=IsChecked, Converter={StaticResource BoolToVisConvert}}" )

Unfortunately this doesn't hide the series.  Even manually setting the series to collapsed in the xaml doesn't make it disapear.  What am I missing?  How can I hide a series?  The only (very ugly) solution I could come up with is to bind the itemssource of the lineseries to the tag property of the checkbox which would store the list of datapoints when checked and null when unchecked.

 

The second question has to do with triggering a refresh.  I have the color property of a lineseries bound to a color picker.  This works great and when I change the color in my color picker, the line is instantly updated with the correct color.  I thought this would work with the smooth property, but it doesn't trigger a refresh.  I have the Smooth property bound to a checkbox.  When checked, it does change the Smooth property to true and if you zoom/pan the chart, the lineseries is smoothed.  It just isn't refreshed automatically the way the color property is. 

Is there a notification event on the color but not on the smooth property?  Is this possible or would I have to manually create a refresh when the checkbox is selected/unselected?

 

The last, very minor question I had was it is possible to have both cornerradius and showpointer on the tracker?  Basically I want the default tracker functionality, but with round corners.  When I set the showpointer to true and cornerradius of the trackercontrol, the pointer is not displayed.  Is there anyway to easily do this or would I have to create a custom canvas with a border, textbox and a callout?

 

Thanks a lot!


objo wrote at 2012-01-27 07:58:

Hi, cool to hear that you are using the library on a real mission :)

#1: I added IsVisible bool property to the Series. I added one example in the example library. For Wpf.Series use the Visibility dependency property.

#2: Fixed the bug for all dependency properties in the Wpf.LineSeries

#3: Sorry, this is not currently possible. See TrackerControl.CreatePointerBorderGeometry if you want to improve this. Please send a patch if you can make it work!

See changelist 74393.


ChevyCP wrote at 2012-01-27 15:38:

Awesome!  Thanks!  I just downloaded the source and will try it out.

 

As for as the tracker control, I will check it out sometime, just don't know if I am good enough to come up with a solution for that.  I could design something in expression design and export it as a control or drawing brush and somehow bind the point of the pointer to the location on the series.  Or create some kind of opacity mask.  Or just add a point more line segments to make it look rounder...   Maybe one of those could work, I will let you know if I can come up with anything, once I get some free time.

 

I've been updating software from winforms vb.net to wpf c# and adding lots of new features.  We use it on NOAA research vessels to instantly validate the performance of fishing trawls using data that is streamed back to the ship from all kinds of sensors on the net and ship.  We need to make sure that all our tows meet certain exact standards and my software makes sure that it happens.  The graphing side of this app is extremely helpful in visualizing all our data.  With funding cuts, we don't have the budget to use one of those overpriced third-party apps, so your solution is perfect.  Just thought you'd like to know how your code is being used.  Again, thanks for creating this!


ChevyCP wrote at 2012-01-27 15:48:

lol, and I just noticed that you also coded the helix 3d toolkit.  I am also using that in this same project!  (And these two packages are the only third party code I am using in this program besides the ESRI wpf api.)   You're good.  

 

Instead of make a boring app with pop up windows for my different view like a settings page, a mapping page, a charting page, etc.  I put the whole thing on a 3d cube and when the user presses a button to see, say the charting window, instead of a popup, it rotates the cube the side with the charts.   Much prettier :-)   (and still very functional without being an assault on the eyes.  I made that mistake on my first wpf app and went overboard with the animations and effects...)


objo wrote at 2012-01-29 20:48:

cool to hear how you are using the libraries!   

The tracker control is changing size depending on the contents, and the alignment and pointer position is depending on the tracked point position (to make sure the contents never is outside the view). You should check how it is implemented in the TrackerControl code, it should not be too difficult to refactor the code to accept rounded corners (maybe it is possible to make some general code that is used for all 8 configurations...) 


GaganKapoor wrote at 2013-02-28 09:36:

Objo/ChevyCP,
  Regarding #1, I am also trying to add a checkbox to each legend series. Is there an example available where I can get reference ?

ChevyCP wrote at 2013-02-28 16:33:

Here are the key parts on how I did it. It should work the same for any series. This is just a customized lines that had two colors, with a center color and the end colors being the same (so it would go red, greeen, red on the same line).
<Grid.Resources>
     <BooleanToVisibilityConverter x:Key="BoolToVisConvert" />

 <CheckBox Name="exampleChartCB"
                  Grid.Row="1"
                  Content="Example"
                  Style="{StaticResource chartCB}" />

<oxy:Plot.Series>
     <oxy:CustomTwoColorLineSeries Name="exampleLineSeries"
                                                     DataContext="{Binding}"
                                                      ItemsSource="{Binding exampleChartLine}"
                                                      MaxLimit="{Binding ElementName=endLineLA, Path=X}"
                                                      MinLimit="{Binding ElementName=startLineLA, Path=X}"
                                                      Style="{StaticResource oxyLineSeriesStyle}"
                                                      TrackerFormatString="Example&#10;{2:yyyy-MM-dd HH:mm:ss}&#10;{4}"
                                                      Visibility="{Binding ElementName=exampleChartCB, Path=IsChecked, Converter={StaticResource BoolToVisConvert}}"
                                                      YAxisKey="{Binding ElementName=exampleAxisRB, Path=Tag}"
                                                      Color="{Binding ElementName=exampleColorPick, Path=SelectedColor}" />

GaganKapoor wrote at 2013-03-01 12:16:

Thanks ChevyCP

My oxyplot is bound to a model which creates the series dynamically. What I did eventually is to overlay a checkbox list on top of the plot and hide the default legend. Everything works fine excep I couldn't work out how to place the overlay checkbox list in proper place on top of plot. I coudn't get the exact x and y axis locations so that I can place my control properly. Do you know how to get the location ? Any help would be highly appreciated.

This is what I have in my xaml:
<Grid>
<oxy:Plot x:Name="plot"
              Margin="3"
              Focusable="True"
              Model="{Binding OxyModel, Mode=OneWay, NotifyOnTargetUpdated=True}"/>
<!-- could't get how to set margin of below stackpanel so that It aligns with the bottom right corner of plot--> <StackPanel Name="legendPanel" Orientation="Vertical" VerticalAlignment="Bottom" Margin="0,0,20,30">
        <ListBox ItemsSource="{Binding Path=LegendItems}" 
                 Background="Transparent"
                 MaxWidth="140" 
                 HorizontalAlignment="Right" 
                 VerticalAlignment="Bottom">
            <ListBox.Resources>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Setter Property="Opacity" Value="0.9" />
                </Style>
            </ListBox.Resources>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
                        <CheckBox IsChecked="{Binding Path=IsChecked}" Margin="0,0,1,0" BorderThickness="0" BorderBrush="Transparent"/>
                        <Border Width="15" Margin="0,1,0,1" CornerRadius="2" Background="{Binding Path=Background}"/>
                        <TextBlock Text="{Binding Path=DisplayText}" Margin="1,0,0,0" FontSize="10"/>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>            
    </StackPanel>
</Grid>
0

where is the Title property of Plotview

darkeria 8 years ago 0

I upgraded my program and reinstalled oxyplot by nuget, after that VS reported a mistake that plotview didn't contain the Title property. Can anyone tell me where is the title go?

My oxyplot version is 1.0.0.0. I use VS2015 and the program is based on .net4.5