WPF Scatter Series broken again in 263af359f2ef
seveland12 wrote at 2012-05-10 22:06:
Same issue as before, where the overlaid points are invisible.
objo wrote at 2012-05-10 23:16:
thanks for the notice! I see I lost the bug fix when I pulled in some changes and merged to quickly from a fork that had not updated the latest changes. I have re-submitted the fix now.
CategoryAxis Exception Thrown
bsguedes wrote at 2012-04-18 17:16:
Hello,
First of all congratulations for the excellent library! I searched a lot for WPF good charting libraries and I have finally found one!
I'm having an issue trying to plot the BarSeries example. The following exception is thrown: "The y-axis should be a CategoryAxis."
I don't know if I have got it right, but isn't the X axis supposed to be a Category axis? The y-axis would be a linear axis showing the values of each bar for each label, am I right?
Thanks for any help!
Bruno
EDIT: ok, when I run the project BarSeriesDemo it works... I don't understand why we have to set DataContext = this in that example (as it won't work without that line). Could I plot a bar graph the same way I plot a Line graph, i.e., something like this:
var plot = new PlotModel(); // create axes...etc... var lineSeries = new LineSeries(myLabel); // fills lineSeries with my Data plot.Series.Add(lineSeries); myGrid.Children.Add(new OxyPlot.Wpf.Plot { Model = plot };
objo wrote at 2012-04-18 21:01:
The BarSeries is horizontal, the ColumnSeries is vertical.
I will improve the exception message to give more information about this.
It is also important to fill the category labels (the Labels list property, or an ItemsSource and a LabelField) with the same number of items as in the bar/column series.
More documentation on this is coming later as soon as I get time. See the examples.
You need to set the DataContext in order for the binding to the plot model to work (this is standard wpf).
bsguedes wrote at 2012-04-18 21:17:
Thanks for the quick answer! ColumnSeries works fine for me!
Proposal for modified layering
ffiala wrote at 2012-03-08 22:50:
I am very impressed of how easy an implementation of oxyplot is possible.
Many of my plots use a DateTime axis and I am used to change a monolor background to a background wth colored areas which represent the months for example (see the following example).
To implement this I created a new Annotation class "FreeAnnotation" and added two methods in order to be able to draw rectangles an text. This works fine but the annotation can only be added as "BelowSeries" oder "AboveSeries". So when drawing a rectangle as a BelowSerie then a grid ist hidden because it is drawn before the annotation.
So I changed the drawing order in "PlotModel.Rendering.cs from
this.RenderBackgrounds(rc);
this.RenderAxes(rc, AxisLayer.BelowSeries);
this.RenderAnnotations(rc, AnnotationLayer.BelowSeries);
this.RenderSeries(rc);
to
this.RenderBackgrounds(rc);
this.RenderAnnotations(rc, AnnotationLayer.BelowSeries);
this.RenderAxes(rc, AxisLayer.BelowSeries);
this.RenderSeries(rc);
But this is not a good solution because it has to be done with each new release.
My proposal is
- to change the drawing sequence of the two layers (RenderAnnotations(rc, AnnotationLayer.BelowSeries) and RenderAxes(rc, AxisLayer.BelowSeries) or
- to add additional postitions of the annotation layer (like "BelowAxes" or "AsBackGround" or "AboveBackGround") or
- to to add something like a "zIndex" whose initial values represent the order of the respective layer but it is a value which can be changed by program.
objo wrote at 2012-03-09 08:20:
I suggest we add "BelowAxes" to the AnnotationLayer enum and change to
this.RenderBackgrounds(rc);
this.RenderAnnotations(rc, AnnotationLayer.BelowAxes);
this.RenderAxes(rc, AxisLayer.BelowSeries);
this.RenderAnnotations(rc, AnnotationLayer.BelowSeries);
this.RenderSeries(rc);
This should not change the behaviour for existing plots
objo wrote at 2012-03-12 06:30:
I added "BelowAxis" to the AnnotationLayer enumeration. Included an example in the AnnotationExamples in the ExampleLibrary/ExampleBrowser.
How to i use geoetry
ImageAnnoation is not vector. when i zooming it broken pixel.
so Make geometry using Illustrator. it's 260000 length. it isn't point(ex, f m1 ~~ z)
I want use this path
please help me...
Rotate title of a LinearAxis
mreu wrote at 2012-08-22 14:15:
Hi
I am really new to your great OxyPlot.
I have a plot with more than one horizontal axes. Some of them are very small and the titles on the left side are clipped. How can I rotate the titles so that they are horizontal and not vertikal? I did not found how to do this.
Thanks
Michael
objo wrote at 2012-08-23 08:41:
Try the "Angle" property.
Note, there is an un-solved issue http://oxyplot.codeplex.com/workitem/9594-
For vertical axes, I would also like to implement http://oxyplot.codeplex.com/workitem/9972.
mreu wrote at 2012-08-23 09:56:
Hi objo
Thanks for the quick answer, but "Angle" rotate the labels of the ticks not the title or do I miss something?
Thanks
Michael
objo wrote at 2012-08-23 15:41:
Right, "Angle" rotates the labels of the ticks. Rotation of the titles is not yet implemented.
Do you want to rotate the titles of the horizontal (X) axes?
For vertical axes, the following feature is planned http://oxyplot.codeplex.com/workitem/9972.
mreu wrote at 2012-08-23 15:55:
Ho objo
yes, I need to rotate the titles on the left/right side. I have 9 LinearAxes (which are shown from left to right), some of them only show if it was activated or not. So I need the titles horizontal because they are truncated now.
Thanks
Michael
objo wrote at 2012-08-24 09:16:
ok, I added http://oxyplot.codeplex.com/workitem/9994
Reference line in plotarea
Firefox360 wrote at 2013-09-25 14:35:
What i'm supposed to make is a reference line in the plot area where the graphs are shown in.
But when the program draws the line, it draws the line over
the complete oxyplot area. So also under the x-axis.
I wanted to add a picture of it in here, so it would be easier to understand, but it's only possible to add pictures from the internet.
Code:
private float lijnStartX, lijnEndX;
private float lijnStartY, lijnEndY;
lijnStartY = (float)0;
lijnEndY = (float)plotBSITotalA.Height;
private void plot_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
lijnStartX = e.X;
lijnEndX = e.X;
Draw(lijnStartX, lijnEndX, lijnStartY, lijnEndY);
}
}
private void Draw(float startF, float endF, float startY, float endY)
{
this.Refresh();
float startX = startF;
float endX = endF;
float[] dValue = { 5, 5 };
PointF startP = new PointF(startX, startY);
PointF endP = new PointF(endX, endY);
Graphics g = plotBSITotalA.CreateGraphics();
Pen p = new Pen(Color.Red);
p.DashPattern = dValue;
g.DrawLine(p, startP, endP);
}
Drag & Drop
wolf9s wrote at 2014-06-09 15:55:
Thank you for your effort.
I have some questions:
- I want to implement Drag & Drop operations. But I have no idea.
I want to Drag LineSeries(by drag the legend) from a PlotView to anthoer, and then the original PlotView was closed.
should I operate PlotCommands and PlotController?
- If I want to add close button in the Yaxis(when a plotview has many LineSerieses), how should I do ?
- If many LineSerieses in a plotview, how track the point?
Multi tracker (show always)
fake legend
Everyone, I need your help!
Best Regards!
Lee
objo wrote at 2014-06-11 12:17:
- WPF? I think this must be done using the drag/drop features in WPF, I don't think the PlotController can help you here.
- Buttons must be in an overlay, they are not supported in the plot model. See Source\Examples\WPF\WpfExamples\Examples\OverlayDemo
- The tracker should work with many LineSeries. The
PlotModel
has aHitTest
method you can use to do hit testing.
wolf9s wrote at 2014-06-15 16:40:
For Drag & Drop , I user a Rectangle and a TextBlock ( in an overlay) instead of the real Legend. But I can't confirm the position of the fake legend.(The distance between PlotView's Left and the PlotArea's Left, it should be the width of the Y Axes, but I cant't get it).
My idea is wrong?
I try change the left of the fake legned in PlotView's Loaded event and PlotModel's Updated event .But I always get the 0.
But I debug and find in RenderBox (in PlotModel.Rendering.cs file) method,the PlotArea's value is not 0.
wolf9s wrote at 2014-07-01 03:30:
objo wrote at 2014-07-02 12:47:
wolf9s wrote at 2014-07-23 18:08:
Can These images help understand my ideas?
Slxe wrote at 2014-07-24 15:18:
Just as an idea you could try serializing the Series you click on and saving it outside of the PlotView, and removing it from the PlotModel. Have some kind of fancy draging image on the cursor then when the mouse button is released have the program check for a PlotView where the mouse cursor is, deserialize the Series and add it to this PlotView (I may be over thinking the serialization though, probably could just be an object).
I haven't played with drag and drop functionality since I was working on UIs in Python and Qt, so it's been a while, but hopefully this helps.
custom markers
pocketbboy wrote at 2011-11-09 12:33:
Hello . There is a way to add images instead off custom markers ?
Thanks.
objo wrote at 2011-11-09 13:29:
sorry, no support for images (yet). (need to find a good pattern to solve image loading on the different platforms supported)
isaacd1 wrote at 2012-11-04 13:03:
Hi
I also need this feature
Any date when it will be release ?
Isaac Dagan
objo wrote at 2012-11-04 22:21:
Sorry, I cannot implement this right now.
But this project is open source - feel free to make a fork and propose a solution!
Remove Plot Paddings
hamzad_cne wrote at 2014-01-08 10:29:
I'm trying to include the Oxyplot Heatmap series as a layer on a map using Silverlight Bing Maps.
I always have a small shift in both directions for added coordinates, and I think it is because of the padding added to the external border of the plot. Is there a way how to remove this padding so the plot area fills all the space ?
Thank you.
objo wrote at 2014-01-08 10:57:
<ControlTemplate TargetType="{x:Type local:Plot}"> <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> <Grid x:Name="PART_Grid" /> </Border> </ControlTemplate>
BorderThickness
property to 0?hamzad_cne wrote at 2014-01-08 12:57:
I set 'BorderThickness' to 0 but I had the same render.
objo wrote at 2014-01-10 09:10:
Removing a single point from an OxyPlot Series
lhhc wrote at 2013-05-26 19:25:
objo wrote at 2013-06-08 11:28:
Points.RemoveAt
method. Remember to invalidate/redraw the plot afterwards (the model is not listening to changes in the Points collection).
lhhc wrote at 2013-06-08 21:05:
objo wrote at 2013-06-08 22:25:
lhhc wrote at 2013-06-08 22:31:
if (hrseries.Points.Count > 1000)
{
hrseries.Points.RemoveAt(0);
}
hrseries.Points.Add(new DataPoint(xval, yval));
hrtmp.RefreshPlot(true);
HR = hrtmp;
lhhc wrote at 2013-06-08 23:12:
hrtmp.Series.Add(hrseries);
Customer support service by UserEcho