Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all 2061 articles
Browse latest View live

New Post: Rectangle annotation click

$
0
0
Thanks, that set me off down a different route:
var rect1 = new RectangleAnnotation();
rect1.Fill = GlassMainColor.ToOxyColor();
rect1.StrokeThickness = 1;
rect1.MinimumX = g1;
rect1.MaximumX = g2;
rect1.MinimumY = 0;
rect1.MaximumY = 100;

rect1.MouseDown += (s, e) =>
{
    SelectedPane = pane;
};
Where "SelectedPane" is a public property. On the setter of the property, the plot is re-drawn and if the CurrentPane == SelectedPane then the annotation renders in a different colour, and the SelectedPane object is exposed publicly.

New Post: iOS CoreText Slowing Down Plot Render on First Draw?

$
0
0
I played around with caching CTFont and did not get the performance benefit I thought I might. After a little more digging I turned up http://stackoverflow.com/questions/6062420/core-text-performance.

tldr
The more attributes a string has the longer it takes to draw.

I've since changed the code to:
var attributedString = new NSAttributedString (text, new CTStringAttributes {
//              ForegroundColorFromContext = true,
//              Font = new CTFont (fontFamily, (float)fontSize)
            });
Commenting out the color and font greatly improves performance, I'd say it is as fast as it was before moving to CoreText.

New Post: Xamarin ios timespan axis freezes on iphone 4

$
0
0
Liam,

Can you run instruments against your iPhone 4 and see where your app is spending all of its time?

-ben

Commented Unassigned: Poor live data performance [10134]

$
0
0
Based on [this article](https://oxyplot.codeplex.com/discussions/281036) I'm using PlotModel.RefreshPlot(true) frequently to load live data, approximately 20 times per second or so, but the performance is not good. It is sluggish and lags behind.

I have 8 line series with 1000 samples/sec each, but reducing the data frequency does not seem to help much, so this does not seem directly related to drawing performance.

There are a few issues:
* RefreshPlot(true) seems to queue on the GUI thread, probably with BeginInvoke, so that if it runs sluggishly it will also start lagging behind with several seconds in a short time.
* RefreshPlot generally feels very slow for a live data scenario
* The GUI thread is locked for big chunks of the time, so even moving the parent window is very sluggish

I am on a powerful PC with pretty recent CPU and GPU, so that should not be the problem. Running Windows 8, but same is seen on Win7.

I have not yet dug into the source code of Oxyplot, but are there any tips on how to improve live data rendering?
Comments: agree on that, these three controls should be aligned.

New Post: OxyPlot in Xamarin Studio

$
0
0
So doing further research into this, I've found some info that other people in my situation should know. If you try to open the OxyPlot.XamarinAndroid solution in Xamarin Studio, you will receive the following errors:

Could not load project 'OxyPlot\OxyPlot.csproj' with unknown item type '{786C830F-07A1-408B-BD7F-6EE04809D6DB}'
Could not load project 'Examples\ExampleLibrary\ExampleLibrary.csproj' with unknown item type '{786C830F-07A1-408B-BD7F-6EE04809D6DB}'

if you google 786C830F-07A1-408B-BD7F-6EE04809D6DB, you will find these pages:

http://stackoverflow.com/questions/10802198/visual-studio-project-type-guids
http://stackoverflow.com/questions/14515007/vs-2010-sp1-the-project-type-is-not-supported-by-this-installation

Which lets you know that this is an issue with Portable Class Libraries, and specifically deals with not having the Portable Library Tools installed. Now according to this page, it's possible to use Portable Library Tools in Xamarin Studio:

http://forums.xamarin.com/discussion/12105/pcl-in-xamarin-studio

But according to this page, the only way to install Portable Library Tools is to first have Visual Studio 2010 SP1 Pro or later installed:

http://msdn.microsoft.com/en-us/library/vstudio/gg597391(v=vs.100).aspx

So, plain and simple, the only way to use Oxyplot for Android or iOS before the component is officially released is if you have a copy of Visual Studio 2010 SP1 Pro or later installed so that you can build the project (or get someone else that does have it to build it for you). Past that, you're out of luck.

New Post: OxyPlot in Xamarin Studio

New Post: OxyPlot in Xamarin Studio

$
0
0
So I think that I've just about got this all figured out. So with just the Portable Library Tools, you'll run into issues about not having .net portable v4.0 profile 136. To get around this issue as well as the others, here's what you need to do:
  1. Download Portable Library Tools 2 from here: http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981/
  2. Use the command line to run: PortableLibraryTools.exe /buildmachine
  3. Download the Microsoft .NET Portable Library Reference Assemblies 4.6 from here: http://www.microsoft.com/en-us/download/details.aspx?id=40727
  4. Run the exe file.
  5. Running the exe file will put the file PortableReferenceAssemblies.zip here: C:\Program Files (x86)\Microsoft .NET Portable Library Reference Assemblies 4.6
  6. Extract the zip file to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable (this is where you get profile 136)
  7. Install Xamarin Studio and Xamarin.Android
  8. Download and install StyleCop from here: https://stylecop.codeplex.com/releases/view/79972
  9. Download the Oxyplot source code and open the solution in Xamarin Studio and build it.
At this point everything should be building without error.

Created Unassigned: Remove PlotModel.RefreshPlot() [10166]

$
0
0
RefreshPlot() was meant to be the synchronous version (waiting for rendering) of InvalidatePlot().
Most platforms does not allow to use synchronous code in UI for a good reason.
Thus RefreshPlot() is often nothing more than a redirect to InvalidatePlot().

Please remove RefreshPlot() so there is only one way to invalidate the plot.
So users are not confused on what method they should use to invalidate the plot.

Source code checked in, #1c4fd6bfd094

$
0
0
Fix StyleCop errors, improve comments Remove Plot.Properies partial class for Silverlight and Metro

Source code checked in, #d3697b151353

New Post: Xamarin ios timespan axis freezes on iphone 4

Commented Unassigned: Remove PlotModel.RefreshPlot() [10166]

$
0
0
RefreshPlot() was meant to be the synchronous version (waiting for rendering) of InvalidatePlot().
Most platforms does not allow to use synchronous code in UI for a good reason.
Thus RefreshPlot() is often nothing more than a redirect to InvalidatePlot().

Please remove RefreshPlot() so there is only one way to invalidate the plot.
So users are not confused on what method they should use to invalidate the plot.
Comments: I agree on this! I see no reason to keep the RefreshPlot method.

Commented Unassigned: Remove mouse events from plot elements [10132]

$
0
0
We can achieve the same functionality by using a `PlotController`
https://oxyplot.codeplex.com/workitem/9625

* Better separation of controller logic and model
* Less code
* Better performance of PlotController
Comments: An alternative could be to add an `EnableMouseEventsInModel` property on the `PlotController`. The default value could be false. When the value is false, the mouse events should not be raised on the `PlotModel` and `PlotElement`s.

New Post: Xamarin ios timespan axis freezes on iphone 4

$
0
0
Liam,

I cannot confirm running on less than 5s and iPad 3...but my app does have an x-axis that is a date axis...I'm about to release a new version of code with OxyPlot in it. Thus if there is a major issue with the 4 I'm concerned.

Basically with Instruments I'm looking for where all the time is being spent. From your snapshot start at the top and keep hitting down arrows until the function that is using up all of the time is exposed.

Although I can't see exactly where the code is falling down, I can at least point you in the correct direction. From your Instruments after I clicked down through all of the calls:

Image

TimeSpan axis correct? OxyPlot/Axes/TimeSpanAxis.cs line 173
protected override double CalculateActualInterval(double availableSize, double maxIntervalSize)
From Instruments it looks like the line 188 is just spinning
double nextInterval = goodIntervals.FirstOrDefault(i => i > interval);
I'd start poking around here with the debugger and see why that FirstOrDefault is never ending, or why it is being called so many times

Commented Unassigned: Poor live data performance [10134]

$
0
0
Based on [this article](https://oxyplot.codeplex.com/discussions/281036) I'm using PlotModel.RefreshPlot(true) frequently to load live data, approximately 20 times per second or so, but the performance is not good. It is sluggish and lags behind.

I have 8 line series with 1000 samples/sec each, but reducing the data frequency does not seem to help much, so this does not seem directly related to drawing performance.

There are a few issues:
* RefreshPlot(true) seems to queue on the GUI thread, probably with BeginInvoke, so that if it runs sluggishly it will also start lagging behind with several seconds in a short time.
* RefreshPlot generally feels very slow for a live data scenario
* The GUI thread is locked for big chunks of the time, so even moving the parent window is very sluggish

I am on a powerful PC with pretty recent CPU and GPU, so that should not be the problem. Running Windows 8, but same is seen on Win7.

I have not yet dug into the source code of Oxyplot, but are there any tips on how to improve live data rendering?
Comments: I still haven't been able to test the latest changes as I'm not quite sure where they are. Can you please link me the fork or changeset to test with? Then I'll do another benchmark in my own sample app. Thanks.

Commented Unassigned: Poor live data performance [10134]

$
0
0
Based on [this article](https://oxyplot.codeplex.com/discussions/281036) I'm using PlotModel.RefreshPlot(true) frequently to load live data, approximately 20 times per second or so, but the performance is not good. It is sluggish and lags behind.

I have 8 line series with 1000 samples/sec each, but reducing the data frequency does not seem to help much, so this does not seem directly related to drawing performance.

There are a few issues:
* RefreshPlot(true) seems to queue on the GUI thread, probably with BeginInvoke, so that if it runs sluggishly it will also start lagging behind with several seconds in a short time.
* RefreshPlot generally feels very slow for a live data scenario
* The GUI thread is locked for big chunks of the time, so even moving the parent window is very sluggish

I am on a powerful PC with pretty recent CPU and GPU, so that should not be the problem. Running Windows 8, but same is seen on Win7.

I have not yet dug into the source code of Oxyplot, but are there any tips on how to improve live data rendering?
Comments: No fork, already integrated in official source ;-) Please, use InvlalidatePlot() instead of RefreshPlot(), as it will be removed (#10166).

Commented Unassigned: Poor live data performance [10134]

$
0
0
Based on [this article](https://oxyplot.codeplex.com/discussions/281036) I'm using PlotModel.RefreshPlot(true) frequently to load live data, approximately 20 times per second or so, but the performance is not good. It is sluggish and lags behind.

I have 8 line series with 1000 samples/sec each, but reducing the data frequency does not seem to help much, so this does not seem directly related to drawing performance.

There are a few issues:
* RefreshPlot(true) seems to queue on the GUI thread, probably with BeginInvoke, so that if it runs sluggishly it will also start lagging behind with several seconds in a short time.
* RefreshPlot generally feels very slow for a live data scenario
* The GUI thread is locked for big chunks of the time, so even moving the parent window is very sluggish

I am on a powerful PC with pretty recent CPU and GPU, so that should not be the problem. Running Windows 8, but same is seen on Win7.

I have not yet dug into the source code of Oxyplot, but are there any tips on how to improve live data rendering?
Comments: Thanks, will test this over the weekend and report my results. We can close this afterwards.

Commented Unassigned: oxyplot - 2014.1.245.1 get_ActualFont Error [10157]

$
0
0
Hi All,

After updating to new version of oxyplot, I am getting below error. Could you please help me to resolve this. Attached sample code.

__<package id="OxyPlot.Core" version="2014.1.245.1" targetFramework="net40" />
<package id="OxyPlot.Wpf" version="2014.1.245.1" targetFramework="net40" />__

Object reference not set to an instance of an object.
at OxyPlot.PlotElement.get_ActualFont() in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\PlotModel\PlotElement.cs:line 106
at OxyPlot.Axes.Axis.Measure(IRenderContext rc) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\Axes\Axis.cs:line 985
at OxyPlot.PlotModel.MaxSizeOfPositionTier(IRenderContext rc, IEnumerable1 axesOfPositionTier) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\PlotModel\PlotModel.Rendering.cs:line 174
at OxyPlot.PlotModel.AdjustAxesPositions(IRenderContext rc, IList1 parallelAxes) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\PlotModel\PlotModel.Rendering.cs:line 249
at OxyPlot.PlotModel.AdjustPlotMargins(IRenderContext rc) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\PlotModel\PlotModel.Rendering.cs:line 212
at OxyPlot.PlotModel.Render(IRenderContext rc, Double width, Double height) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot\PlotModel\PlotModel.Rendering.cs:line 76
at OxyPlot.Wpf.Plot.UpdateVisuals() in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot.Wpf\Plot.cs:line 1119
at OxyPlot.Wpf.Plot.ArrangeOverride(Size arrangeBounds) in c:\TeamCity\buildAgent\work\3b9fcf1ba397d0ed\Source\OxyPlot.Wpf\Plot.cs:line 564
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
Comments: Latest version 2014.1.259.1 fixes the issue.

Created Unassigned: Nuget packages should use versoin on dependencies [10167]

$
0
0
The nuget packages that reference the OxyPlot.Core package should use the exact version for this dependency:
```xml
<dependency id="OxyPlot.Core" version="[2014.1.1]"/>
```

So the Nuget does automatically update the core package and you don't have problems with different versions between core and e.g. Wpf.

The drawback is that the OxyPlot build server has to update the nuspec files.
Or maybe nuget supports to specify the version as a parameter for the pack command (don't know).

Commented Unassigned: XAML Canvas ancestor causes issues with OxyPlot.WPF.Plot [10155]

$
0
0
I am trying to use a OxyPlot.WPF.Plot with a Canvas as its immediate ancestor and am running into graphical issues. I noticed that the Plot is by default non-visible. The only way to resolve this is by static setting the width and height. I would like to be able to use bindings of some sort to set the height and width instead.

I am using version 2014.1.240.1.
Comments: This is not an OxyPlot issue when you place the plot inside an canvas and don't specify its size.
Viewing all 2061 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>