0
Ülevaatamisel
The TrackerControl template must contain a content container exception
Hi again,
I am using OxyPlot.WIndowsUniversal 2014.1.546.0 in a win8.1 project. I am trying to create a chart witth a category axis, a linear axis and a line series. Below is the code that creates the chart.
System.InvalidOperationException: The TrackerControl template must contain a content container with name +'PART_ContentContainer'
at OxyPlot.WindowsUniversal.TrackerControl.OnApplyTemplate()
Does anybody know why the exception is thrown??
Thanks in advance !!
I am using OxyPlot.WIndowsUniversal 2014.1.546.0 in a win8.1 project. I am trying to create a chart witth a category axis, a linear axis and a line series. Below is the code that creates the chart.
var chartModel = new PlotModel();
CategoryAxis categAxis = new CategoryAxis();
categAxis.Position = AxisPosition.Bottom;
categAxis.ItemsSource = chartvm.DateValues;
categAxis.LabelField = "MN";
categAxis.IsTickCentered = true;
categAxis.IsZoomEnabled = false;
categAxis.IsPanEnabled = false;
categAxis.MaximumPadding = 0;
categAxis.MinimumPadding = 0;
chartModel.Axes.Add(categAxis);
LinearAxis linAxis = new LinearAxis();
linAxis.Position = AxisPosition.Left;
linAxis.IsPanEnabled = false;
linAxis.IsZoomEnabled = false;
linAxis.MaximumPadding = 0;
linAxis.MinimumPadding = 0;
linAxis.LabelFormatter = ((double d) => String.Format("{0:0.00€}", d));
chartModel.Axes.Add(linAxis);
var series = new AreaSeries
{
Color = OxyColor.FromArgb(255, 78, 154, 6),
DataFieldX2 = "OxySeriesValue",
DataFieldY2 = "OxyZeroValue",
DataFieldX = "OxySeriesValue",
DataFieldY = "Value",
MarkerType = MarkerType.Circle,
MarkerSize=3,
MarkerFill = OxyColor.FromRgb(0, 117, 235),
ItemsSource = chartvm.DateValues,
};
series.Color = OxyColor.FromRgb(0, 117, 235);
series.Color2 = OxyColor.FromRgb(0, 117, 235);
chartModel.Series.Add(series);
var children = AllChildren(ChartSection);
PlotView plotView = children[8] as PlotView;
plotView.Model = chartModel;
It all works well until the tracker is required to show. Whrn that happens the following exception occurs.System.InvalidOperationException: The TrackerControl template must contain a content container with name +'PART_ContentContainer'
at OxyPlot.WindowsUniversal.TrackerControl.OnApplyTemplate()
Does anybody know why the exception is thrown??
Thanks in advance !!
0
Ülevaatamisel
Oystein Bjorke 10 aastat tagasi
This sounds like a bug, I don't see any issues with your code. Please create a GitHub issue!
0
panbac88 10 aastat tagasi
Thanks for your answer :). I will create the issue.
0
panbac88 10 aastat tagasi
This issue is solved in v2015.1.840.0
Customer support service by UserEcho