Add color scheme examples
↧
Source code checked in, #6fdea04fd512
↧
New Post: Color saturation in Oxyplot Column Series
The bug in ColumnSeries should be fixed. I added a few more examples. Was inspired by colorbrewer2.org :-)
↧
↧
Source code checked in, #82f9a51af0a7
Fix WinForms build error
↧
New Post: OxyPlot in Xamarin Studio
I am currently preparing a Xamarin component for both iOS and Android. This should include some simple instructions how to get started. In the meantime you can look at the OxyPlot.XamarinAndroid solution.
↧
Source code checked in, #51604a38a99a
Add RectangleAnnotation mouse event example [discussion:539495]
↧
↧
New Post: Rectangle annotation click
I added the following example to the 'example browser':
It has not yet been decided whether the mouse events should go...
https://oxyplot.codeplex.com/workitem/10132
var annotation = new RectangleAnnotation() { MinimumX = 10, MaximumX = 60, MinimumY = 10, MaximumY = 20 }; plotModel.Annotations.Add(annotation); int i = 0; annotation.MouseDown += (s, e) => { annotation.Text = "Clicked " + (++i) + " times."; plotModel.InvalidatePlot(false); };
https://oxyplot.codeplex.com/workitem/10132
↧
Commented Unassigned: Remove mouse events from plot elements [10132]
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: It seems to be quite convenient to use the events. Or is that valid only for the simple demos?
https://oxyplot.codeplex.com/workitem/9625
* Better separation of controller logic and model
* Less code
* Better performance of PlotController
Comments: It seems to be quite convenient to use the events. Or is that valid only for the simple demos?
↧
Source code checked in, #f7c6faae0891
Wpf: set canvas background color from PlotModel.Background [discussion:539449]
↧
New Post: Background color doesn't change from white in WPF
Thanks, I see the background of the WPF control was not set by the Background property of the PlotModel. Should be fixed in build 257.
↧
↧
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: can we close this 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: anjdreas: can we close this issue?
↧
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: can we close this 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: @anjdreas: can we close this issue?
↧
Commented Unassigned: ColumnSeries Not Showing Data [10158]
I am having issue on generating a Column/Bar Chart since upgraded to VS2013. After spending days on searching solution from web and testing, I finally believe it doesn't work in the new OxyPlot package...
Below is the test code. It works when I use the NoPCL.2013.1.51.1 version, however when I replaced the OxyPlot by downloading the latest version from NuGet (version 2014.1.249.1) it shows only an empty chart (only show the axes but no data or no column).
* __View__
```
<Window x:Class="test.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:oxy="http://oxyplot.codeplex.com"
Title="MainWindow" Height="350" Width="525">
<Grid>
<oxy:Plot Model="{Binding PivotData}" />
</Grid>
</Window>
```
* __ViewModel__
```
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Series;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
namespace test
{
public class MainViewModel : ViewModelBase
{
private ObservableCollection<SalesModel> salesData;
public ObservableCollection<SalesModel> SalesData
{
get { return salesData; }
set { salesData = value; OnPropertyChanged("SalesData"); }
}
private PlotModel pivotData;
public PlotModel PivotData
{
get { return pivotData; }
set { pivotData = value; OnPropertyChanged("PivotData"); }
}
public MainViewModel()
{
GenerateSalesData();
CreatePivotChart();
UpdatePivotData();
}
private void GenerateSalesData()
{
SalesData = new ObservableCollection<SalesModel>();
SalesData.Add(new SalesModel(new DateTime(2013, 11, 1), 12000));
SalesData.Add(new SalesModel(new DateTime(2013, 12, 1), 13000));
SalesData.Add(new SalesModel(new DateTime(2014, 1, 1), 12500));
SalesData.Add(new SalesModel(new DateTime(2014, 2, 1), 14000));
}
private void CreatePivotChart()
{
PivotData = new PlotModel();
PivotData.Title = "Sales Monthly Summary";
}
private void UpdatePivotData()
{
var axisX = new CategoryAxis(AxisPosition.Bottom) { ItemsSource = SalesData, LabelField = "Date" };
PivotData.Axes.Add(axisX);
var axisY = new LinearAxis(AxisPosition.Left) { Title = "USD" };
PivotData.Axes.Add(axisY);
var dataSeries = new ColumnSeries() { ItemsSource = SalesData, ValueField = "Amount" };
PivotData.Series.Add(dataSeries);
}
}
public class SalesModel : ViewModelBase
{
private string date;
public string Date { get { return date; } set { date = value; OnPropertyChanged("Date"); } }
private int amount;
public int Amount { get { return amount; } set { amount = value; OnPropertyChanged("Amount"); } }
public SalesModel(DateTime _date, int _amount)
{
date = new DateTimeFormatInfo().GetAbbreviatedMonthName(_date.Month) + "/" + (_date.Year).ToString();
amount = _amount;
}
}
public abstract class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged(string prop)
{
var pc = PropertyChanged;
if (pc != null)
pc(this, new PropertyChangedEventArgs(prop));
}
}
}
```
Comments: I just fixed an error related to category axes/column series. Can you check if this bug persists in the newest version?
Below is the test code. It works when I use the NoPCL.2013.1.51.1 version, however when I replaced the OxyPlot by downloading the latest version from NuGet (version 2014.1.249.1) it shows only an empty chart (only show the axes but no data or no column).
* __View__
```
<Window x:Class="test.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:oxy="http://oxyplot.codeplex.com"
Title="MainWindow" Height="350" Width="525">
<Grid>
<oxy:Plot Model="{Binding PivotData}" />
</Grid>
</Window>
```
* __ViewModel__
```
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Series;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
namespace test
{
public class MainViewModel : ViewModelBase
{
private ObservableCollection<SalesModel> salesData;
public ObservableCollection<SalesModel> SalesData
{
get { return salesData; }
set { salesData = value; OnPropertyChanged("SalesData"); }
}
private PlotModel pivotData;
public PlotModel PivotData
{
get { return pivotData; }
set { pivotData = value; OnPropertyChanged("PivotData"); }
}
public MainViewModel()
{
GenerateSalesData();
CreatePivotChart();
UpdatePivotData();
}
private void GenerateSalesData()
{
SalesData = new ObservableCollection<SalesModel>();
SalesData.Add(new SalesModel(new DateTime(2013, 11, 1), 12000));
SalesData.Add(new SalesModel(new DateTime(2013, 12, 1), 13000));
SalesData.Add(new SalesModel(new DateTime(2014, 1, 1), 12500));
SalesData.Add(new SalesModel(new DateTime(2014, 2, 1), 14000));
}
private void CreatePivotChart()
{
PivotData = new PlotModel();
PivotData.Title = "Sales Monthly Summary";
}
private void UpdatePivotData()
{
var axisX = new CategoryAxis(AxisPosition.Bottom) { ItemsSource = SalesData, LabelField = "Date" };
PivotData.Axes.Add(axisX);
var axisY = new LinearAxis(AxisPosition.Left) { Title = "USD" };
PivotData.Axes.Add(axisY);
var dataSeries = new ColumnSeries() { ItemsSource = SalesData, ValueField = "Amount" };
PivotData.Series.Add(dataSeries);
}
}
public class SalesModel : ViewModelBase
{
private string date;
public string Date { get { return date; } set { date = value; OnPropertyChanged("Date"); } }
private int amount;
public int Amount { get { return amount; } set { amount = value; OnPropertyChanged("Amount"); } }
public SalesModel(DateTime _date, int _amount)
{
date = new DateTimeFormatInfo().GetAbbreviatedMonthName(_date.Month) + "/" + (_date.Year).ToString();
amount = _amount;
}
}
public abstract class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged(string prop)
{
var pc = PropertyChanged;
if (pc != null)
pc(this, new PropertyChangedEventArgs(prop));
}
}
}
```
Comments: I just fixed an error related to category axes/column series. Can you check if this bug persists in the newest version?
↧
Source code checked in, #fda8721ce7ca
iOS: add launch images for example browser
↧
↧
Source code checked in, #f3bc161c95ca
Android: correct output paths
↧
Source code checked in, #58b9a7fe45d5
Add Xamarin tools
↧
Source code checked in, #71f79561e3d2
Add Xamarin component scripts
↧
Source code checked in, #a08bb581de71
Merge
↧
↧
New Post: iOS CoreText Slowing Down Plot Render on First Draw?
I went back to Instruments with my app, it appears most of the time is spent in
Does anyone have a preferred method for caching the possible different font sizes/font families?
public override OxySize MeasureText (string text, string fontFamily, double fontSize, double fontWeight)
specificallyvar attributedString = new NSAttributedString (text, new CTStringAttributes {
ForegroundColorFromContext = true,
Font = new CTFont (fontFamily, (float)fontSize)
});
The time killer is the new CTFont (fontFamily, (float)fontSize)Does anyone have a preferred method for caching the possible different font sizes/font families?
↧
New Post: Xamarin ios timespan axis freezes on iphone 4
I have created a timespan axis graph that is the same as the example in the oxyplot monotouch examples app.
When the app goes to load the graph is freezes when running on an iphone 4. I have tested this with an iphone 5 and it runs perfectly. There is no error reported in the application output in xamarin studio. The app just completely freezes.
This also happens with the oxyplot monotouch examples app when selecting the timespan axis graph.
Any ideas why this is happening?
Liam
When the app goes to load the graph is freezes when running on an iphone 4. I have tested this with an iphone 5 and it runs perfectly. There is no error reported in the application output in xamarin studio. The app just completely freezes.
This also happens with the oxyplot monotouch examples app when selecting the timespan axis graph.
Any ideas why this is happening?
Liam
↧
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: @objo: We should port these changes to Silverlight (and maybe WinRT) also.
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: @objo: We should port these changes to Silverlight (and maybe WinRT) also.
↧