This is the discussion forum for OxyPlot.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
0

Add Quarter interval for datetime axis

Mischa Vreeburg 9 years ago 0

Hello,


I've added for a private project a new interval for the datetime axis, this is the quarter interval.



0
Under review

Idea: Waffle Charts

Noah Pflugradt 10 years ago updated by Oystein Bjorke 10 years ago 3
For a lot of applications using waffle charts is a vastly superior way to showing data compared to either stacked columns or pie 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?
0

Italic Text

petricorde 9 years ago 0
I'm wondering if there's a way to have text in italics (in graph title or in annotations) or in bold italic. If it's not yet possible, it'd be nice.
0

PlotView fails to render under wpf adorner

Pavel Pilar 9 years ago 0
I can render the model except for when doing this in OnRender method of the adorner. In such case nothing but background is rendered and no exception is thrown.
0

Resetting the axes/zoom in Xamarin.Android

Mark Abermoske 9 years ago 0
I have searched extensively and I can't seem to find any examples of someone triggering a Model.ResetAllAxes() in Xamarin.Android. Is there anyway to trigger a reset with a gesture? I can obviously do it with a button click, but it would be nicer if I could trigger it with a double tap or something else, and I can't seem to figure out how to do that.

Modifications to two color series

Oystein Bjorke 10 years ago updated by ChevyCP 10 years ago 3
This discussion was imported from CodePlex

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

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

johnkesselman wrote at 2014-03-18 19:50:

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?

objo wrote at 2014-03-19 08:15:

This is a bug, thanks for the report!
https://oxyplot.codeplex.com/workitem/10164

objo wrote at 2014-03-19 08:22:

Should be fixed now.

PlotView has always fixed width

Oystein Bjorke 10 years ago updated by Samuel Guedon 9 years ago 2
This discussion was imported from CodePlex

schwaiger wrote at 2014-08-04 10:24:

Hello
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

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

Slxe wrote at 2014-07-14 16:38:

I'd like to propose adding some more information to AxisChangedEventArgs, just simple things like the original screen points used for a zoom or pan, and the scale or factor used.

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

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

magikorion wrote at 2014-07-30 17:36:

Hi everybody,

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.