Add Quarter interval for datetime axis
Hello,
I've added for a private project a new interval for the datetime axis, this is the quarter interval.
Idea: Waffle Charts
Examples are here:
https://eagereyes.org/blog/2008/engaging-readers-with-square-pie-waffle-charts
http://www.r-bloggers.com/making-waffle-charts-in-r-with-the-new-waffle-package/
Is there any chance of an implementation?
Italic Text
PlotView fails to render under wpf adorner
Resetting the axes/zoom in Xamarin.Android
Modifications to two color series
ChevyCP wrote at 2012-03-19 21:36:
Hi,
The two color series is great, but I was wondering if it could be used exactly the same, but have the limit on the X axis instead of the Y axis (so it would be a vertical split instead of just horizontal split).
Also, it would be cool if it could have two limits. So that below a min limit and above a max limit would be color2, but between the limits would be color1.
Thanks!
objo wrote at 2012-03-20 18:22:
See the implementation of the TwoColorLineSeries, it is easy to create similar custom series that support vertical or multiple limits. The TwoColorLineSeries could also be extended to support all these cases!
ChevyCP wrote at 2012-03-20 21:02:
Cool, I'm working on it now and think I've got it.... except that I'm having a problem with using the axis.transform function on the datetime axis. Even though I converted my "limit" to a double using DateTimeAxis.ToDouble from a datetime, I'm having problems getting the screen coordinates for the position I want. Any thoughts?
ChevyCP wrote at 2012-03-22 15:27:
I was able to find a way to get this to work on a datetime axis. I created a vertical annotation and bound the limit of the custom two color series to the X property of the annotation. That worked fine. If you want to add a 2 color vertical line series that uses a max and min limit, this is the code I used. Feel free to clean it up and add it to oxyplot if you think it would help. I only tested this for wpf, but it worked perfectly. First I created copies TwoColorLineSeries.cs in oxyplot/series and TwoColorLineSeries in oxyplot.wpf/series in their respective folders and called them both TwoColorVerticalLineSeries. After updating the files to allow for a MinLimit and MaxLimit and changing the names when needed, the only important code that was any different came from the .cs in the main oxyplot TwoColorVerticalLineSeries with the RenderSmoothefLine function. This is the code I used in place of what was in there. I don't think it will work for a reversed X axis, and might need an error check on the max/min limit, but here it is:
protected override void RenderSmoothedLine(IRenderContext rc, OxyRect clippingRect, IList<ScreenPoint> pointsToRender) { double right = clippingRect.Right; double minX = this.XAxis.Transform(this.MinLimit); double maxX = this.XAxis.Transform(this.MaxLimit); if (minX < clippingRect.Left) minX = clippingRect.Left; if (minX > right) minX = right; if (maxX < clippingRect.Left) maxX = clippingRect.Left; if (maxX > right) maxX = right; if (maxX < minX) maxX = minX; clippingRect.Right = minX; rc.DrawClippedLine( pointsToRender, clippingRect, this.MinimumSegmentLength * this.MinimumSegmentLength, this.Color2, this.StrokeThickness, this.LineStyle2, this.LineJoin, false); clippingRect.Left = minX; clippingRect.Width = maxX - minX; rc.DrawClippedLine( pointsToRender, clippingRect, this.MinimumSegmentLength * this.MinimumSegmentLength, this.Color, this.StrokeThickness, this.LineStyle, this.LineJoin, false); clippingRect.Left = maxX; clippingRect.Width = right - maxX; rc.DrawClippedLine( pointsToRender, clippingRect, this.MinimumSegmentLength * this.MinimumSegmentLength, this.Color2, this.StrokeThickness, this.LineStyle2, this.LineJoin, false); }
objo wrote at 2012-03-30 13:38:
thanks, I will try to create a "LimitedLineSeries" later :) see http://oxyplot.codeplex.com/workitem/9951
Dashes property of LineSeries has no effect on the line style in the latest snapshot
johnkesselman wrote at 2014-03-18 19:50:
[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?objo wrote at 2014-03-19 08:15:
objo wrote at 2014-03-19 08:22:
PlotView has always fixed width
schwaiger wrote at 2014-08-04 10:24:
and thanks for your awesome library.
I am using OxyPlot with WPF. When putting the PlotView in a ScrollViewer and fill the model with realtime data, the width of the control does not change.
I would like to achive that the PlotView.Width grows with every added DataPoint.
Is this possible?
Thanks
Adding more information to AxisChangedEventArgs
Slxe wrote at 2014-07-14 16:38:
The main reasoning behind this for me is that this will make things like syncing axis changes easier. For example if you have two or three axes displayed on the left side, being able to use the same screen coordinates for panning would be a lot easier than having to Transform then InverseTransform the ActualMin/Max values to try and sync them.
I'd also like to suggest adding more types to AxisChangedTypes, for the different kinds of zoom (scale, range and factor) and pan (screen points and delta), again for similar reasons as above.
Axis tranform and axis scale factor seems to be wrong
magikorion wrote at 2014-07-30 17:36:
See the screenshot
According to this picture, you can see that the gradient shifts a little on the right. It's because the transform method seems to be not only based on the plot area rectangle but also on the plot area width plus the Y labels width.
The code :
.
var screenPoint = xAxis.Transform(dataPoint.X, dataPoint.Y, this.yAxis);.
return new Point(screenPoint.X, screenPoint.Y);
So, each time I use transform, the scale shifts again and again the real coords.
Have you already met this problem or can you help me solving this issue.
Thanks a lot.
Service d'assistance aux clients par UserEcho