WPF version mouse down cannot fire if invalidatePlot in PlotModel.MouseMove
sharethl wrote at 2014-08-07 16:41:
The reason could be the invalidate plot function makes PlotView too busy on drawing itself.
Result is:
Cannot make an annotation following mouse cursor and do the mouse down even at the same time.
Possible solution:
Use something like tracker, which doesn't call InvalidatePlot.
plotModel.MouseMove += (s, e) => { //lineAnnotation.X = lineAnnotation.InverseTransform(e.Position).X; plotModel.InvalidatePlot(false); };
- Open WPF Example browser.
- Open "Clicking on an annotation"
- Add the top code to it.
- Monitor PlotView's OnMouseDown.
Unable to open ExampleBrowser.exe
faroskalin wrote at 2013-12-03 15:41:
I have Silverlight installed, and I don't think it is my firewall that is blocking access to that domain (does ExampleBrowser.exe use Silverlight/internet to access the code samples)?
Anyone have this issue? Thank you.
objo wrote at 2013-12-03 20:43:
The online example browser is based on Silverlight 4 and seems to be ok here. Is something wrong with the configuration?
faroskalin wrote at 2013-12-04 19:49:
objo wrote at 2013-12-04 19:54:
Remove a specific series from Legend
RezaShirazian wrote at 2014-05-22 20:06:
objo wrote at 2014-05-23 08:11:
Title
of the series. When it is null
it will not be shown.RezaShirazian wrote at 2014-05-23 17:56:
Live data?
dominikjeske wrote at 2014-04-30 22:48:
ETA on production (non pre-release) NuGet package for Xamarin.Android?
Full source code of the browser example
For instance, on the "Candles + Volume (combined volume), adjusting Y-axis" the Y-axis is auto adjusted when panning, but there is not a line of code in the code tab that does it.
Same for example that requires a mouse click, the piece of code that is call when the event is triggered (an also how the event is triggered) is not accessible.
This would massively help me as the examples are quite complete.
Customizing the selected area annotation
oriches wrote at 2014-06-11 12:49:
Is this possible, and if so is there an example for it?
thanks
Ollie.
How to add dragable ArrowAnnotation like example
By clicking a button I want to allow dragable arrow annotations in my plot including some data as text annotation . But I can't reach like in the example browser.
Possible memory leak issue
I am building a Xamarin.Forms app that needs to plot several graphs that update with new data every second. I've found Oxyplot to be a good library to use, but I've encountered memory issues. To see if the problem was being caused by Oxyplot and not somewhere else in the code, I created a simple Xamarin.Forms app that has a single line series to which a new data point is added every second and ran it through the Xamarin Profiler.
What I find is that the memory usage continues to slowly but steadily grow over time. According to the profiler, there are a number of System.Collections.Generic.Dictionary.Entry<System.IntPtr,System.Collections.Generic.List<System.WeakReference>>[] which continue to grow in size over time. With every call to InvalidatePlot(true), the memory usage increases.
I've included the code here, it's just about the most simple example of what I need the graph to do in my actual application.
namespace SimpleGraph{ public class MyPage : ContentPage { PlotModel myPlotModel = new PlotModel (); PlotView myPlotView = new PlotView(){ VerticalOptions = LayoutOptions.Fill, HorizontalOptions = LayoutOptions.Fill, }; public MyPage () { int ctr = 3; myPlotView.Model = myPlotModel; Content = myPlotView; SetupGraphs (); Device.StartTimer (new TimeSpan (0, 0, 0, 1), () => { Random r = new Random (); ctr++; UpdateGraphs(ctr); myPlotView.Model.InvalidatePlot(true); return true; }); } public void SetupGraphs() { Random r = new Random (); myPlotModel.Axes.Add (new LinearAxis { Position = AxisPosition.Bottom }); myPlotModel.Axes.Add (new LinearAxis { Position = AxisPosition.Left, Maximum = 10, Minimum = 0 }); LineSeries series1 = new LineSeries { MarkerType = MarkerType.Circle, MarkerSize = 4, MarkerStroke = OxyColors.White }; series1.Points.Add (new DataPoint (0.0, r.Next(0, 10))); series1.Points.Add (new DataPoint (1.4, r.Next(0, 10))); series1.Points.Add (new DataPoint (2.0, r.Next(0, 10))); myPlotModel.Series.Add (series1); } public void UpdateGraphs(int ctr) { Random r = new Random (); DataPoint dp = new DataPoint(ctr, r.Next (0, 10)); LineSeries series1 = myPlotModel.Series [0] as LineSeries; series1.Points.Add (dp); if (series1.Points.Count > 30) { series1.Points.RemoveAt (0); } } } }
Just to make things more interesting, the issue only occurs when using Android 5 or above.
I am new to mobile development, so I apologize if I've done something stupid, or am just using OxyPlot incorrectly.
I am using version 1.0.0-unstable1957 of Oxyplot.
Any assistance would be greatly appreciated.
Служба підтримки клієнтів працює на UserEcho