Polar Plot with negative magnitude
thepurpleplatypus wrote at 2012-10-13 21:03:
Is it possible to create a polar plot with a non-zero magnitude axis? I have data in the range -2 to +2.
I've tried setting MagnitudeAxis(-2,+2) but the origin is always zero.
Plotting negative data on a chart where the axis are, say, 0 to +2 results in data appearing 180deg out out position.
Am I doing something silly or is this just not possible?
thanks
objo wrote at 2012-10-15 06:56:
This is currently not supported. Should be easy to fix! I added the issue http://oxyplot.codeplex.com/workitem/10010
thepurpleplatypus wrote at 2012-10-18 17:59:
Thanks for the confirmation. I look into implementing the change myself shortly.
WPF Pie Chart
GreggHorry wrote at 2014-01-06 16:20:
Is it possible to work with pie chart in WPF ?
I find AreaSeries, BarSeries, ColumnSeries, LineSeries, ScatterSeries, TwoColorLineSeries but not PieSeries...
I find nothing in documentation... https://oxyplot.codeplex.com/wikipage?title=PieSeries&referringTitle=Series
objo wrote at 2014-01-07 22:07:
But it should probably not be difficult to implement the OxyPlot.Wpf.PieSeries and get a pull request accepted :-)
GreggHorry wrote at 2014-01-09 14:59:
Re: Hi I wanted to know if oxyplot will work for the Windows Phone [oxyplot:4...
doctorj wrote at 2013-11-20 21:43:
From: objo
The core library targets Windows Phone 7 and higher, but there is currently not implemented a control for Windows Phone. It should probably not be very difficult :)
MinimumY/MaximumY for Non-Vertical Line Annotations
seveland12 wrote at 2012-10-26 16:32:
I know it's a simple matter to calculate the MaximumX for an intended MaximumY value, but is there a reason you have to specify MaximumX and not MaximumY for non-vertical LineAnnotations?
Give an example of Multiple Charts in a single chart control
zhaozhhtiger wrote at 2013-10-11 12:07:
In discussion:268305 You mentioned.
Thanks!
everytimer wrote at 2013-10-11 14:55:
Plot model should only keep a weak reference to the plot control
tibel wrote at 2014-01-24 08:46:
OxyPlot.PlotModel
is described as the ViewModel part of the plot.
The model should not keep a strong reference on the view (plot control).
As this would keep the control alive when the containing view of the plot control gets closed.
Using a
WeakReference
here would do the decoupling. What do you think?
objo wrote at 2014-01-24 20:51:
WeakReference
would probably be a good solution.
I have added https://oxyplot.codeplex.com/workitem/10119
Show Tracker in Winforms
JacksonMartinez wrote at 2014-02-01 14:24:
can you please add the tracker for WinForms.
I really like the oxyplot project and i use it for winforms and WPF but i miss the tracker for WinForms.
https://oxyplot.codeplex.com/discussions/355004
objo wrote at 2014-02-02 20:58:
The code is now submitted, and a new issue to improve it is created:
https://oxyplot.codeplex.com/workitem/10125
How can I show the plot points in Oxyplot for a line Graph WPF?
JBurlison wrote at 2014-02-04 16:30:
http://stackoverflow.com/questions/21557334/how-can-i-show-the-plot-points-in-oxyplot-for-a-line-graph
Any Ideas?
objo wrote at 2014-02-04 19:13:
Marker*
properties in the LineSeries
See examples in the Example browser.
JBurlison wrote at 2014-02-04 20:15:
ColumnSeries doesn't show the data
rchan510 wrote at 2014-03-12 23:18:
Can someone please advise what's wrong with my code? it is a very simple test to create a column chart but whatever I do I can only see the chart without any columns (no data).
using OxyPlot;using OxyPlot.Axes;
using OxyPlot.Series;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
namespace test
{
public class MainViewModel : ViewModelBase
{
private ObservableCollection<ReportModel> content;
public ObservableCollection<ReportModel> Content { get { return content; } set { content = value; OnPropertyChanged("Content"); } }
private PlotModel plotModel;
public PlotModel PlotModel { get { return plotModel; } set { plotModel = value; OnPropertyChanged("PlotModel"); } }
public MainViewModel()
{
Content = new ObservableCollection<ReportModel>();
PlotModel = new PlotModel();
SetupContent();
SetupModel();
}
private void SetupModel()
{
var dateAxis = new DateTimeAxis(AxisPosition.Bottom, "Date", "MM/yy")
{
MajorGridlineStyle = LineStyle.Solid,
MinorGridlineStyle = LineStyle.Dot,
IntervalLength = 80
};
//PlotModel.Axes.Add(dateAxis);
var valueAxis = new LinearAxis(AxisPosition.Left, 0)
{
MajorGridlineStyle = LineStyle.Solid,
MinorGridlineStyle = LineStyle.Dot,
Minimum = 13000,
Maximum = 16000,
Title = "Value"
};
//plotModel.Axes.Add(valueAxis);
var lineSeries = new ColumnSeries() { ItemsSource = Content, ValueField = "Amount" };
PlotModel.Series.Add(lineSeries);
}
private void SetupContent()
{
Content.Add(new ReportModel("12/1/2013", 14000));
Content.Add(new ReportModel("1/1/2014", 15000));
Content.Add(new ReportModel("2/1/2014", 14500));
}
}
public class ReportModel : ViewModelBase
{
private DateTime date;
public DateTime Date { get { return date; } set { date = value; OnPropertyChanged("Date"); } }
private int amount;
public int Amount { get { return amount; } set { amount = value; OnPropertyChanged("Amount"); } }
public ReportModel(string date, int amount)
{
Date = Convert.ToDateTime(date);
Amount = amount;
}
}
public abstract class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propName)
{
Debug.Assert(GetType().GetProperty(propName) != null);
var pc = PropertyChanged;
if (pc != null)
pc(this, new PropertyChangedEventArgs(propName));
}
}
}
objo wrote at 2014-03-13 07:08:
CategoryAxis
and not a DateTimeAxis
. Do you get an exception? it should be thrown by the ColumnSeries.GetCategoryAxis.rchan510 wrote at 2014-03-13 22:24:
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Series;
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
namespace test
{
public class MainViewModel : ViewModelBase
{
private ObservableCollection<ReportModel> content;
public ObservableCollection<ReportModel> Content { get { return content; } set { content = value; OnPropertyChanged("Content"); } }
private PlotModel plotModel;
public PlotModel PlotModel { get { return plotModel; } set { plotModel = value; OnPropertyChanged("PlotModel"); } }
public MainViewModel()
{
Content = new ObservableCollection<ReportModel>();
PlotModel = new PlotModel();
SetupContent();
SetupModel();
}
private void SetupModel()
{
var dateAxis = new CategoryAxis() { ItemsSource = Content, LabelField = "Date" };
PlotModel.Axes.Add(dateAxis);
var valueAxis = new LinearAxis(AxisPosition.Left, 0);
PlotModel.Axes.Add(valueAxis);
var lineSeries = new ColumnSeries() { ItemsSource = Content, ValueField = "Amount" };
PlotModel.Series.Add(lineSeries);
}
private void SetupContent()
{
Content.Add(new ReportModel("12/1/2013", 14000));
Content.Add(new ReportModel("1/1/2014", 15000));
Content.Add(new ReportModel("2/1/2014", 14500));
}
}
public class ReportModel : ViewModelBase
{
private DateTime date;
public DateTime Date { get { return date; } set { date = value; OnPropertyChanged("Date"); } }
private int amount;
public int Amount { get { return amount; } set { amount = value; OnPropertyChanged("Amount"); } }
public ReportModel(string date, int amount)
{
Date = Convert.ToDateTime(date);
Amount = amount;
}
}
public abstract class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propName)
{
Debug.Assert(GetType().GetProperty(propName) != null);
var pc = PropertyChanged;
if (pc != null)
pc(this, new PropertyChangedEventArgs(propName));
}
}
}
rchan510 wrote at 2014-03-16 22:40:
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));
}
}
}
objo wrote at 2014-03-19 08:32:
Zooming Effect in Candle stick chart windows 8 XAML
Jivraj wrote at 2014-03-04 07:18:
Is it possible to drag the screen towards those hidden part in the zooming stage?
please if possible then provide information
thanks in advance.
Сервис поддержки клиентов работает на платформе UserEcho