See https://oxyplot.codeplex.com/workitem/10134
↧
Created Unassigned: Rendering by Direct2D / SharpDX [10160]
↧
Edited Unassigned: Rendering by WriteableBitmapEx [10159]
see
https://oxyplot.codeplex.com/workitem/10134
https://oxyplot.codeplex.com/workitem/10134
↧
↧
Commented Unassigned: Poor live data performance [10134]
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: Anjdreas: we are currently using standard WPF Shapes. I have also tested rendering by `DrawingContext`, but could not see significant performance improvements. There were also issues regarding antialiasing when using DrawingContext. But it would be very interesting to see rendering by WriteableBitmapEx or D3DImage / SharpDX. I added https://oxyplot.codeplex.com/workitem/10159 https://oxyplot.codeplex.com/workitem/10160
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: Anjdreas: we are currently using standard WPF Shapes. I have also tested rendering by `DrawingContext`, but could not see significant performance improvements. There were also issues regarding antialiasing when using DrawingContext. But it would be very interesting to see rendering by WriteableBitmapEx or D3DImage / SharpDX. I added https://oxyplot.codeplex.com/workitem/10159 https://oxyplot.codeplex.com/workitem/10160
↧
New Post: Protobuf-net to serialize plot model
I am currently exploring how to use protobuf-net to serialize oxyplot.
It should be a nice tool that help on saving and reading plot
But here I got a "Common Language Runtime detected an invalid program." on line "Serializer.Serialize"
Anyone know the issue?
The following code works. difference is NewDataPoint is a class, instead of structure.
It should be a nice tool that help on saving and reading plot
But here I got a "Common Language Runtime detected an invalid program." on line "Serializer.Serialize"
Anyone know the issue?
var PolygonAnnotationType = RuntimeTypeModel.Default.Add(typeof(PolygonAnnotation), false).Add("Points"); var IDataPointType = RuntimeTypeModel.Default.Add(typeof(IDataPoint), false).Add("X", "Y"); IDataPointType.AddSubType(100, typeof(DataPoint)); var poly = new PolygonAnnotation(); IList<IDataPoint> ps = new List<IDataPoint>() { new DataPoint(0, 0), new DataPoint(1, 0) }; poly.Points = ps; MemoryStream ms = new MemoryStream(); Serializer.Serialize<PolygonAnnotation>(ms, poly); string stringBase64 = Convert.ToBase64String(ms.GetBuffer(), 0, (int)ms.Length); byte[] byteAfter64 = Convert.FromBase64String(stringBase64); MemoryStream afterStream = new MemoryStream(byteAfter64); var newPlot = Serializer.Deserialize<PolygonAnnotation>(afterStream); Console.Write(stringBase64);
privatestaticvoid Test1() { var poly = new NewPolygon() { Points = new List<IDataPoint>(){ new NewDataPoint(0,0),new NewDataPoint(1,1) } }; RuntimeTypeModel.Default.Add(typeof(NewPolygon), false).Add("Points"); RuntimeTypeModel.Default.Add(typeof(IDataPoint), false).Add("X","Y").AddSubType(100,typeof(NewDataPoint)); MemoryStream ms = new MemoryStream(); Serializer.Serialize<NewPolygon>(ms, poly); string stringBase64 = Convert.ToBase64String(ms.GetBuffer(), 0, (int)ms.Length); byte[] byteAfter64 = Convert.FromBase64String(stringBase64); MemoryStream afterStream = new MemoryStream(byteAfter64); var newpoly = Serializer.Deserialize<NewPolygon>(afterStream); Console.Write(stringBase64); } class NewDataPoint : IDataPoint { publicdouble X { get; set; } publicdouble Y { get; set; } public NewDataPoint() { } public NewDataPoint(double x, double y) { this.X = x; this.Y = y; } } class NewPolygon : TextualAnnotation { public IList<IDataPoint> Points { get; set; } }
↧
New Post: Auto-scroll/pan for real-time data
Hi,
I am also currently using Oxyplot to display real time data too.. The plot data are coming from serial port per 100 ms.
The auto-pan method suggested above does work but I'm not able to sync panning and plotting speed.
Plotted line appear to accelerate (or the perhaps it's the panning speed that decelerate) and eventually the line end point will be gone from the plot screen. (i.e Panning speed lags behind)
Any pointer?
Thanks in advance.
I am also currently using Oxyplot to display real time data too.. The plot data are coming from serial port per 100 ms.
The auto-pan method suggested above does work but I'm not able to sync panning and plotting speed.
Plotted line appear to accelerate (or the perhaps it's the panning speed that decelerate) and eventually the line end point will be gone from the plot screen. (i.e Panning speed lags behind)
Any pointer?
Thanks in advance.
↧
↧
Commented Issue: DateTimeAxis auto tick intervals [7988]
Improve the automatic tick intervals of the DateTimeAxis.
Comments: Hello All, i have reworked DateTimeAxis implementation to correctly work with all types of intervals (starting from seconds). Ticks for resolutions of days / months / years account for time zone and should correctly start at day / month / year break. Decision on size of major / minor steps is also somewhat more intelligent than it was before. For adjusted DateTimeAxis.cs see attachment
Comments: Hello All, i have reworked DateTimeAxis implementation to correctly work with all types of intervals (starting from seconds). Ticks for resolutions of days / months / years account for time zone and should correctly start at day / month / year break. Decision on size of major / minor steps is also somewhat more intelligent than it was before. For adjusted DateTimeAxis.cs see attachment
↧
Commented Issue: DateTimeAxis auto tick intervals [7988]
Improve the automatic tick intervals of the DateTimeAxis.
Comments: Some notes: One should leave interval types to Auto to be able to zoom in/out correctly DST change between ticks can result in irregularly-sized intervals Replaced custom DateTime<->double conversion by ToOADate() and FromOADate() methods
Comments: Some notes: One should leave interval types to Auto to be able to zoom in/out correctly DST change between ticks can result in irregularly-sized intervals Replaced custom DateTime<->double conversion by ToOADate() and FromOADate() methods
↧
New Post: while lines between series
Hey I'm seeing this gaps between my lines:
![Image]()
![Image]()
Do you know what am I doing wrong or if this is a bug?
Thanks.


Do you know what am I doing wrong or if this is a bug?
Thanks.
↧
Commented Issue: DateTimeAxis auto tick intervals [7988]
Improve the automatic tick intervals of the DateTimeAxis.
Comments: RuslanBek: that's great work, but I can't get it to compile. Are you using some methods that are not available in portable class libraries? Also, we need unit tests and/or examples before any changes to the DateTimeAxis can be accepted! Please create a fork and make a pull request when the feature is working.
Comments: RuslanBek: that's great work, but I can't get it to compile. Are you using some methods that are not available in portable class libraries? Also, we need unit tests and/or examples before any changes to the DateTimeAxis can be accepted! Please create a fork and make a pull request when the feature is working.
↧
↧
New Post: while lines between series
I've used older versiones of OxyPlot a lot and never experienced that issue. Could you provide the data to test it myself? It seems to me that your data may have duplicate points (or nearly duplicate) there.
Edit: If you have some point that is Undefined or his y-value is NaN you may experience a gap as yours. Are you doing mathematical operations (divisions) with your data?
Edit: If you have some point that is Undefined or his y-value is NaN you may experience a gap as yours. Are you doing mathematical operations (divisions) with your data?
↧
New Post: plotting data on X-Axis based on days of the weeks sunday, monday,.......saturaday
Thanks Objo for your kind Suggestions.
↧
Created Unassigned: iOS Adding an Axis to Model then Rendering Throws NullReferenceException [10161]
See discussion - https://oxyplot.codeplex.com/discussions/538962
See the running example code in the OxyPlot.XamarinIOS Example Browser app in the fork [https://oxyplot.codeplex.com/SourceControl/network/forks/benhysell/PlotViewModelIssue](https://oxyplot.codeplex.com/SourceControl/network/forks/benhysell/PlotViewModelIssue)
With ```PlotView``` unsealed I can now do the following:
```
public class GraphViewBad : PlotView
{
public GraphViewBad ()
{
}
public void BuildGraph()
{
Model = new PlotModel ("Bad Plot");
Model.TitleFontSize = 12;
Model.TitleFont = "Helvetica";
Model.TitleFontWeight = FontWeights.Normal;
Model.TitlePadding = 0;
Model.Padding = new OxyPlot.OxyThickness (3, 0, 0, 12);
Model.PlotAreaBackground = OxyColors.White;
Model.PlotAreaBorderThickness = 0;
Model.Background = OxyColors.Red;
//once an axis is added application fails with null ref
Model.Axes.Add (new LinearAxis (AxisPosition.Left) {
TickStyle = TickStyle.Outside,
AxislineStyle = LineStyle.Solid,
MajorStep = 1,
Minimum = 0,
Maximum = 10
});
}
}
```
Nothing fancy, a red background with a y-axis...enough to show the error.
When I run this code I get a ```System.NullReferenceException``` in ```PlotElement.cs```
```
/// <summary>
/// Gets the actual font.
/// </summary>
protected internal string ActualFont
{
get
{
return this.Font ?? this.PlotModel.DefaultFont;
}
}
```
If I change my code to the following the view displays as expected:
```
public class GraphViewGood : PlotView
{
PlotModel model;
public GraphViewGood ()
{
}
public void BuildGraph()
{
model = new PlotModel ("Good Plot");
model.TitleFontSize = 12;
model.TitleFont = "Helvetica";
model.TitleFontWeight = FontWeights.Normal;
model.TitlePadding = 0;
model.Padding = new OxyPlot.OxyThickness (3, 0, 0, 12);
model.PlotAreaBackground = OxyColors.White;
model.PlotAreaBorderThickness = 0;
model.Background = OxyColors.Red;
model.Axes.Add (new LinearAxis (AxisPosition.Left) {
TickStyle = TickStyle.Outside,
AxislineStyle = LineStyle.Solid,
MajorStep = 1,
Minimum = 0,
Maximum = 10
});
Model = model;
}
}
```
See the running example code in the OxyPlot.XamarinIOS Example Browser app in the fork [https://oxyplot.codeplex.com/SourceControl/network/forks/benhysell/PlotViewModelIssue](https://oxyplot.codeplex.com/SourceControl/network/forks/benhysell/PlotViewModelIssue)
With ```PlotView``` unsealed I can now do the following:
```
public class GraphViewBad : PlotView
{
public GraphViewBad ()
{
}
public void BuildGraph()
{
Model = new PlotModel ("Bad Plot");
Model.TitleFontSize = 12;
Model.TitleFont = "Helvetica";
Model.TitleFontWeight = FontWeights.Normal;
Model.TitlePadding = 0;
Model.Padding = new OxyPlot.OxyThickness (3, 0, 0, 12);
Model.PlotAreaBackground = OxyColors.White;
Model.PlotAreaBorderThickness = 0;
Model.Background = OxyColors.Red;
//once an axis is added application fails with null ref
Model.Axes.Add (new LinearAxis (AxisPosition.Left) {
TickStyle = TickStyle.Outside,
AxislineStyle = LineStyle.Solid,
MajorStep = 1,
Minimum = 0,
Maximum = 10
});
}
}
```
Nothing fancy, a red background with a y-axis...enough to show the error.
When I run this code I get a ```System.NullReferenceException``` in ```PlotElement.cs```
```
/// <summary>
/// Gets the actual font.
/// </summary>
protected internal string ActualFont
{
get
{
return this.Font ?? this.PlotModel.DefaultFont;
}
}
```
If I change my code to the following the view displays as expected:
```
public class GraphViewGood : PlotView
{
PlotModel model;
public GraphViewGood ()
{
}
public void BuildGraph()
{
model = new PlotModel ("Good Plot");
model.TitleFontSize = 12;
model.TitleFont = "Helvetica";
model.TitleFontWeight = FontWeights.Normal;
model.TitlePadding = 0;
model.Padding = new OxyPlot.OxyThickness (3, 0, 0, 12);
model.PlotAreaBackground = OxyColors.White;
model.PlotAreaBorderThickness = 0;
model.Background = OxyColors.Red;
model.Axes.Add (new LinearAxis (AxisPosition.Left) {
TickStyle = TickStyle.Outside,
AxislineStyle = LineStyle.Solid,
MajorStep = 1,
Minimum = 0,
Maximum = 10
});
Model = model;
}
}
```
↧
Created Unassigned: iOS CoreText Slowing Down Plot Render on First Draw [10162]
See discussion - [https://oxyplot.codeplex.com/discussions/538545](https://oxyplot.codeplex.com/discussions/538545)
Latest OxyPlot where CoreText is now being used for the text...everything looks great, but it feels like we lost a good deal of speed while rendering the plots. I have a noticeable lag from launching the application to first render on 5s and iPad 3.
Hooking up Instruments, I can dig down and see all of the time is being spent in CoreText inside OxyPlot.
This is noticeable on the simulator, and becomes in your face on the device.
In the example OxyPlot program check out the 'LineSeries' examples. Pick a plot, any plot, and you'll have a bit of a pause, and then the graph draws. After this, pick any other LineSeries and you won't have the lag, and it draws fine. Same thing happens on device and in the simulator. Using Instruments to profile I see the same results, a lot of time spent down in CoreText.
If you kill the application, start it up again, and pick a different plot you'll see the same results, long pause, draw plot, and then any other plot after that will draw fine.
Latest OxyPlot where CoreText is now being used for the text...everything looks great, but it feels like we lost a good deal of speed while rendering the plots. I have a noticeable lag from launching the application to first render on 5s and iPad 3.
Hooking up Instruments, I can dig down and see all of the time is being spent in CoreText inside OxyPlot.
This is noticeable on the simulator, and becomes in your face on the device.
In the example OxyPlot program check out the 'LineSeries' examples. Pick a plot, any plot, and you'll have a bit of a pause, and then the graph draws. After this, pick any other LineSeries and you won't have the lag, and it draws fine. Same thing happens on device and in the simulator. Using Instruments to profile I see the same results, a lot of time spent down in CoreText.
If you kill the application, start it up again, and pick a different plot you'll see the same results, long pause, draw plot, and then any other plot after that will draw fine.
↧
↧
Created Unassigned: iOS CoreText Off Center [10163]
The move to CoreText appears to have placed titles off center, see the attached screenshot...the title should line up nicely under the clock, but appears skewed.
↧
Edited Unassigned: iOS CoreText Off Center [10163]
The move to CoreText appears to have placed titles off center, see the attached screenshot...the title should line up nicely under the clock, but appears skewed.


↧
Commented Unassigned: Poor live data performance [10134]
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: Looks good now, thanks. So from my side you can close the issue.
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: Looks good now, thanks. So from my side you can close the issue.
↧
New Post: Dashes property of LineSeries has no effect on the line style in the latest snapshot
Tried to modify one of the examples to see the effect of the Dashes property like so:
[Example("#10076: Dashed line test")]
public static PlotModel DashedLineTest()
{
var model = new PlotModel("Dashed line test");
for (int y = 1; y <= 10; y++)
{
var line = new LineSeries
{
StrokeThickness = y,
Dashes = new double[] { 1, 2, 3}
};
for (int i = 0; i < 20; i++)
{
line.Points.Add(new DataPoint(i + 1, y));
}
model.Series.Add(line);
}
return model;
}
No effect. The line was still solid. Am I doing something wrong?↧
↧
Commented Issue: DateTimeAxis auto tick intervals [7988]
Improve the automatic tick intervals of the DateTimeAxis.
Comments: Sorry, but i do not have PCL target installed (VS2013 express) and therefore cannot test it.
Comments: Sorry, but i do not have PCL target installed (VS2013 express) and therefore cannot test it.
↧
Source code checked in, #8c3720a3448d
PlotModel: correct error in update method that affected series depending on
CategoryAxis (ColumnSeries, BarSeries etc)
↧
Source code checked in, #0f7fb4e9a8bc
Fix comments
↧