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

Add Information to the Tracker (solved)

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

Artiga wrote at 2013-10-15 17:16:

Hello!!!

Hey, using the property "TrackerFormatString" is possible to display different information when you click in a series ... but doing this, you loose the primary functionality (show the X,Y coordinates), how should I do to add new information and keep the old functionality?

Artiga wrote at 2013-10-15 18:08:

Ok, i should use {2} for X-value, and {4} for Y-value, thx
0

WPF Linear and logarithmic axes ignore Visiblity property

wiyosaya il y a 9 ans mis à jour il y a 9 ans 1
I declared three axes in wpf. One is a linear axis on the left, one is a linear axis on the bottom, and the third is a logarithmic axis on the bottom. I have different sets of data that I am using, and based on which set of data is shown at any particular time, I would like to hide one of the bottom axes. So, through a style, I set the appropriate axis to visible and the other to collapsed. The problem is that both of the bottom axes still show. I explicitly tried setting one of the axes to collapsed in xaml, leaving the other visible, and both axes still show.

I figure that I am either missing something, or that this is a bug.

Any thoughts on how to handle this?

Thanks.

WPF LineSegmentSeries

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

michaeldjackson wrote at 2013-07-22 19:39:

Is the LineSegmentSeries available in the WPF? Can't find it.
MDJ

everytimer wrote at 2013-07-22 22:44:

It's a custom class created directly in ExampleLibrary Solution. Specifically LineSegmentSeries.cs.

Good luck

[Metro] Plot area background

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

Nicothekrug wrote at 2013-04-10 15:44:

Hi,

Is there a way change the background of the plot area only ? (in Metro - The Background property isn't what I want because it changes the whole background of the control, not only the plot area background).

Thanks in advance,

Nicolas

raphay wrote at 2013-04-10 16:32:

I think you can use a rectangle annotation on the entire chart (with no min/max x/y).

Nicothekrug wrote at 2013-04-10 17:09:

Nice idea !

But with this code, the background don't change :
RectangleAnnotation plotBackground = new RectangleAnnotation();
plotBackground.Fill = OxyColors.Pink;
PlotModel.Annotations.Add(plotBackground); 
What am I doing wrong ?

raphay wrote at 2013-04-11 15:20:

Try to update your plotModel and your graphic component...

Nicothekrug wrote at 2013-04-11 15:27:

Already tried it, without better results :(

No code in online Example Browser

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

TonHadry wrote at 2014-02-15 22:06:

There is no "code" tab in online silverlight version of example browser ( http://www.oxyplot.org/ExampleBrowser/ ). Why?
Or - am I blind?
It is very usefull, to display code in examples like in desktop app (OxyPlot.WPF Example Browser)...

objo wrote at 2014-02-16 14:32:

Why not make RenderContext of Plot selectable by user

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

sunwayking wrote at 2013-09-04 03:36:

I made an Extension for Plot named PlotEx using writeablebitmap method to render sharps.
This method brought me dozens of performance improvement when PlotEx was rendering 5,000 points with 500 FPS.
Why must I make a new class, PlotEx?
It's because Plot doesn't include IRenderContext, but use a specified SharpRenderContext.
If so, IRenderContext becomes meaningless.

BTW, How to contribute my work about Plot?

objo wrote at 2013-09-04 20:07:

It would be very interesting to see how you have implemented this render context based on writable bitmaps!
Can you create a fork? Then make a pull request, and I will review!

sunwayking wrote at 2014-07-12 14:00:

objo wrote:
It would be very interesting to see how you have implemented this render context based on writable bitmaps!
Can you create a fork? Then make a pull request, and I will review!
Hi objo, I don't know how to create a fork and make a pull request. I put source code on a network disk. You can download it yourself.
Supporting directly downloading with IE:
Download OxyPlot.Wpf.Extension (for WPF only)

And, objo, may you feel like this one: Change Current DrawingContext to one using OpenGL

Axis label angle set to 90 degrees

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

bsguedes wrote at 2014-06-18 14:37:

Hello,

When I tried to create a category axis with its labels' angles set to 90 degrees, I have the following result:

Image

As we can see, the axis title is not shown correctly and labels that are to big are not displayed correctly.

Is this a bug or should I be setting a different property to display this information correctly?

Thanks!

bsguedes wrote at 2014-06-30 20:07:

Any ideas? :(

everytimer wrote at 2014-07-01 06:57:

Adjust the AxisTitleDistance property of the axis:
model.Axes[0].AxisTitleDistance = 100;
Good luck.

objo wrote at 2014-07-02 12:45:

what is the value of model.PlotMargins.Bottom? If set to NaN, the margin should be adjusted automatically. If that is not working, then it is a bug! Using the AxisTitleDistance is a work-around :-)

OxyPlot disappear after RefreshPlot(true)

Oystein Bjorke il y a 10 ans 0
This discussion was imported from CodePlex

scheang wrote at 2013-04-11 18:59:

Hi ALL, I have a program which takes OxyDataItem and plot it using LineSeries (DateTime Axis vs LinearAxis). However once I have used the function on RefreshPlot(true) the plot seems to disappear. Any idea why would this happen?


public void MyOxyPlot(string GraphName, string GraphType, DateTime StartDate, DateTime EndDate)
    {

        var tmp = new PlotModel(GraphName + " " + GraphType);
        tmp.Axes.Add(new OxyPlot.Axes.LinearAxis(OxyPlot.Axes.AxisPosition.Left) { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot });
        tmp.Axes.Add(new OxyPlot.Axes.DateTimeAxis(OxyPlot.Axes.AxisPosition.Bottom, StartDate, EndDate, null, null, OxyPlot.Axes.DateTimeIntervalType.Hours)
        {
            MajorGridlineStyle = LineStyle.Solid,
            Angle = 90,
            StringFormat = "yyyy",
            MajorStep = 365.0,
            //MajorStep = 1.0 / 24 / 2, // 1/24 = 1 hour, 1/24/2 = 30 minutes
            IsZoomEnabled = true,
            MaximumPadding = 0,
            MinimumPadding = 0,
            //TickStyle = TickStyle.None
        });
        var ls = new OxyPlot.Series.LineSeries("Line1") { DataFieldX = "X", DataFieldY = "Y" };
        List<OxyDataItem> ii = new List<OxyDataItem>();
        foreach (DataRow dtr in TSDataTable.Rows)
        {
            if ((DateTime)dtr["Time Stamp"] >= StartDate && (DateTime)dtr["Time Stamp"] <= EndDate)
                ii.Add(new OxyDataItem { X = (DateTime)dtr["Time Stamp"], Y = (double)dtr[GraphType] }); 
        ls.ItemsSource = ii;
        tmp.Series.Add(ls);
        if (MyMDDPlotModel == null)
        {   
            MyMDDPlotModel = tmp;
            MyMDDPlotModel.InvalidatePlot(false);
            MyMDDPlotModel.RefreshPlot(true);
        }
    }
À l'étude

Heatmap interpolation color

Oystein Bjorke il y a 10 ans mis à jour il y a 10 ans 3
This discussion was imported from CodePlex

AvanDiepen wrote at 2014-01-16 11:43:

When I create a heatmap with say +10 is red, 0 is green and -10 is blue, the interpolated color of two adjacent cells of +10 and -10 is not green (0). I expect that the color between these two cells is green! Or is there a setting to change this behaviour?

objo wrote at 2014-01-17 07:59:

Interesting :) I think this is a bug when Interpolate = true.
The heat map is rendered by interpolating a bitmap, and this is not the same as the interpolation of the palette.
At the center of each pixel it will be correct, but between pixels may be wrong.

It can be reproduced by
        [Example("D501409: Interpolation Issue")]
        public static PlotModel InterpolationIssue()
        {
            var data = new double[2, 3];
            data[0, 0] = -10;
            data[0, 1] = 10;

            var model = new PlotModel("HeatMapSeries");
            model.Axes.Add(new LinearColorAxis { Position = AxisPosition.Right, Palette = new OxyPalette(OxyColors.Red, OxyColors.Green, OxyColors.Blue) });

            var hms = new HeatMapSeries
            {
                CoordinateDefinition = HeatMapCoordinateDefinition.Edge,
                X0 = 0,
                X1 = 2,
                Y0 = 0,
                Y1 = 3,
                Data = data,
                Interpolate = true,
                LabelFontSize = 0.2
            };
            model.Series.Add(hms);
            return model;
        }
Does anyone know how this can be fixed?

AvanDiepen wrote at 2014-05-15 08:07:

Someone found a solution for this 'bug'?
À l'étude

Collapse part of Axis?

Oystein Bjorke il y a 10 ans mis à jour par anonymous il y a 10 ans 2
This discussion was imported from CodePlex

Roigaard wrote at 2013-09-03 13:43:

Does anyone know if it is possible, in lack of better words, to collapse parts of an axis, more specifically a DateTimeAxis, in order to bring segments of the graph closer together?

Example (for sake of argument, not real world):
I am mapping a velocity for a moving object as a function of a datetime. At certain points in the lifetime of the observation, the object has no velocity (not just velocity 0, but no velocity). Lets say that the period mapped is 1 day (24 hours from midnight to midnight). In the middle 6 hours (0900 hours to 1500 hours), there is nothing to map, which leaves a wide gap in the graph between the first and the second segment of the graph with nothing in it. I would like to draw those two parts together by "collapsing" the timeaxis, such that 09 hours and 1500 hours on the axis is only seperated by some symbol (e.g. curly lines or dots).

This could of course be accomplished by using two different Plots side by side, but I would like to use the same graph.

objo wrote at 2013-09-03 13:49:

I think this is in the issue list
http://oxyplot.codeplex.com/workitem/8903
It is not possible with the standard axes, but should not be too hard to implement (need to change the transform methods)