Can't run in Embedded Resource [WPF]
co3moz wrote at 2014-02-06 14:34:
I want to run OxyPlot in EmbeddedResource. I can run other Libraries in EmbeddedResource but OxyPlot gives an error.
'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' ... System cant find that file.
OxyPlot runs normal if i put OxyPlot.dll in folder. Other dlls like HtmlAgilityPack can run in EmbeddedResource ( With some magic (: ). Why OxyPlot needs "OxyPlot.dll" in folder?? So what i should do?
TrackerFormatString question
seveland12 wrote at 2012-06-04 19:11:
In the documentation page
http://oxyplot.codeplex.com/wikipage?title=Custom%20trackers&referringTitle=Documentation
it states that you can define what the tracker displays by modifying the TrackerFormatString property of the series. What format is this property expecting? In particular, if I want my tracker to show the following:
X Axis Title: 0.###
Y Axis Title: 0.###
(where 0.### is meant to be the appropriate value to 3 decimal places), what do I have to set TrackerFormatString to? I'm using LineSeries and ScatterSeries, if that makes a difference.
Thanks,
Steve
objo wrote at 2012-06-04 22:09:
Sorry the wiki documentation is not finished.
The tracker format string has some variations for different series (should be documented... and maybe improved?), but it should at least support the following arguments
{0} the title of the series {1} the title of the x-axis {2} the x-value {3} the title of the y-axis {4} the y-value
For ScatterSeries you also have
{5} the title of the value-axis {6} the value of the scatter point
This means that in your case you should be able to use
X Axis Title: {2:0.###}
Y Axis Title: {4:0.###}
The format string can also contain names of properties of the items (requires use of the ItemsSource property):
{X:0.###}, {Y:0.###}, {Value:0.###}
where X, Y and Value are properties of your items.
_Noctis_ wrote at 2013-10-21 10:20:
If you have a class like this:
class ExercisePoint : IDataPoint
{
public double X { get; set; }
public double Y { get; set; }
public int Lvl { get; set; }
public DateTime DateTime { get; set; }
public string Exercise { get; set; }
}
You could then create a line series with a custom Tracker that look like this:var line_series_array = new LineSeries()
{
... other propreties initialization here ...
TrackerFormatString = "{DateTime:dd.MM.yy}"+ Environment.NewLine +"{Exercise}, lvl {Lvl}:{Y}"
};
This will give you in this case, the date in the given format on one line, and on the second, the exercise, level, and Y value.
Easy peasy once you figure it out ... :)
(Just wondering, any chance of being able to format the text in there? )
oloopy wrote at 2014-04-11 11:19:
An additional tip here. The default setting is like below,
var lineSeries = new LineSeries
{
TrackerFormatString = "{0} " + Environment.NewLine + "{1}: {2} " + Environment.NewLine + "{3}: {4} ",
}
You can modify it based on that. Also note that the {0} would be used in Legend Title.Archer25 wrote at 2014-04-30 07:55:
Ihave a scatterSeries. And i need to for every point's have unique string lines, and this lines must show at the tracker.
How i can do that???
Avoid the DateTimeAxis.ToDouble() result in the tooltip
maxambrogi wrote at 2013-04-28 00:59:
This works fine but the tooltip on the chart show the result of the DateTimeAxis.ToDouble method.
There's a way in order to show the date in tooltip using financial series?
Best regards
MaxAmbrogi
objo wrote at 2013-04-29 13:18:
It is possible the code should be refactored to let the axes do the formatting of the x and y values!
maxambrogi wrote at 2013-04-29 18:27:
this sounds like a bug in the HighLowSeries.GetNearestPoint method. Added to https://oxyplot.codeplex.com/workitem/10044Seeing the source code thru browser, probably two actions are required:
It is possible the code should be refactored to let the axes do the formatting of the x and y values!
- new constructor and properties in HighLowItem.cs named xAsStringForTooltip (the date as desired string)
- refactor the HighLowSeries.GetNearestPoint method in order to manage the presence the above xAsStringForTooltip property
I'm right and can I support you?
Best regards
MaxAmbrogi
objo wrote at 2013-05-06 10:23:
TrackerFormatString
in the series to control the format of the date (see examples). My comment about letting the axes do the formatting was not a good idea - the formatting of the dates on the axes may be different.maxambrogi wrote at 2013-05-29 15:27:
Best regards
MaxAmbrogi
How to disable or modify the tooltip on a graph
laranto wrote at 2013-07-07 17:56:
Please help me!!
You know that when a graph is displayed a fantastic tooltip come in your help to display the coordinates of the mouse selected point.
But I've to display two graphs on the same diagram which are properly scaled so that the max Y value of both the graphs are the same.
It follows that the scaled Y obtained from the tooltip are not representing the originals but the scaled.
So I need to interfere with the mechanism of the tooltip to modify the displayed values or, if it is not possible, to disable the tooltip from one of the graph.
To display the graph I use a PlotModel object to which property PlotModel.Series I next add a LineSeries which represent the graph to display.
Can anyone gime me some feedback?
Thank you very much
everytimer wrote at 2013-07-07 19:50:
yourLineSeries.MouseDown += (s, e) =>
{
if ((e.ChangedButton != OxyMouseButton.Left))
{
return;
}
//Here catch the screenpoint
//Transform to coordinates of your LineSeries
//Apply the scaling X'=a*X, Y'=b*Y
e.Handled = true;
};
The last step is to bind via XAML that properties to the tracker. See the custom tracker examples.
Good luck
laranto wrote at 2013-07-08 13:00:
I've tried to implement your solution without reaching the goal to obtain a tooltip with a scaled versions of the point coordinates.
I've to give a result as soon as possible.
So I ask you: please is there a fast way to disable the tooltip for a certain LineSeries?
Thank you very much!! :D
raphay wrote at 2013-07-08 16:58:
yourLineSeries.MouseDown += (s, e) =>
{
if ((e.ChangedButton != OxyMouseButton.Left))
{
return;
}
e.Handled = true;
};
laranto wrote at 2013-07-08 17:19:
Drawing simple shapes
amity2001 wrote at 2012-10-03 11:01:
Hello world,
Is there any way to draw simple shapes like circle, ellipse, square, rectangle, etc. on Oxyplot,
without calculating data points for series.
Like in C# there are few direct methods to draw these shapes, is it possible in Oxyplot by directly giving appropriate parameters like radius, center of circle, etc.
Thanks in advance.
objo wrote at 2012-10-03 19:11:
Use 'annotations' to draw content that should not be listed in the 'legend box'. There are implementations for rectangles and lines, but not ellipses. You could derive an "EllipsisAnnotation" in the same way as LineAnnotation - calculate the points and call DrawClippedLine. IRenderContext does not support clipping of ellipses. I did not include clipping in IRenderContext to make it easier to port to different platforms...
Keep LineSerie Colors
oloopy wrote at 2013-04-27 02:30:
But I noticed that colors of lines would be changed if I remove one of lines. And it seems like the color would be rearranged by default color order, which is from green, khaki, red...
For example, I plot three vehicle trajectories below.
(https://www.dropbox.com/s/xx2wygeoeg8sg4p/Screenshot_4_26_13_8_10_PM.png)
ID 2270 is in green. ID 2276 is in khaki. ID 2281 is in red. And the order I plot them is start from 2270, then 2276, finally 2281.
(https://www.dropbox.com/s/pw6ptb0a6w1cadp/Screenshot_4_26_13_8_13_PM.png)
Now I remove ID 2276. Then ID 2281's color changed to be khaki from red.
I would like to know if there is a way to keep the line color as it will help user focus on certain line they are working on.
Here lists my code. It's quite simple.
var lineSerie = new LineSeries();
data.ToList().ForEach(d =>lineSerie.Points.Add(new DataPoint(Convert.ToDouble(d.X), Convert.ToDouble(d.Y))));
plotModel.Series.Add(lineSerie);
viewModel.plotModel.RefreshPlot(true);
:)
Thank you guys!
objo wrote at 2013-04-29 13:28:
I see that OxyPlot could assign the automatic colour only once, but this requires some changes to the code. Create an issue if you think this is an important feature to add!
objo wrote at 2013-04-29 13:30:
Where is IDataPoint in the latest version of Oxyplot?
AvanDiepen wrote at 2014-05-07 11:53:
When I install the latest version of Oxyplot (OxyPlot-2014.1.297.1) I'm seeing the error:
Error 4 The type or namespace name 'IDataPoint' could not be found...
How can I solve this error?
Code:
private List<IDataPoint> listScheefstand { get; set; }
FishySwede wrote at 2014-05-08 08:48:
Try:
private List<DataPoint> listScheefstand { get; set; }
instead.
If you're using a ScatterSeries you should probably use ScatterPoint instead.
Note that I'm just a user of OxyPlot, not a contributor. Perhaps a contributor can verify or correct this.
AvanDiepen wrote at 2014-05-08 08:52:
objo wrote at 2014-05-08 08:56:
FishySwede wrote at 2014-05-08 10:20:
Disable Tracker
jpnavarini wrote at 2012-07-03 14:01:
Hello everyone,
I would like to disable the tracker on my plot. Is it possible?
I am using a bar graph, and the default tracker contains the label of each box followed by its value. Another possible option for me is to change the tracker message to have only the box value, without its name. How can it be done?
Thank you.
objo wrote at 2012-07-03 21:05:
I don't think it is possible to hide the tracker. This is related to issue http://oxyplot.codeplex.com/workitem/9625 - it should be possible to change the mouse gesture to activate the tracker - and to disable it. I have not implemented this yet, but hope to do it later this year.
To change the tracker text for the BarSeries/ColumnSeries, try to set TrackerFormatString = "{2}"
I will add more information about the tracker format strings at http://oxyplot.codeplex.com/wikipage?title=Custom%20trackers
taschmidt wrote at 2012-11-01 04:09:
FYI, I got around this (what I would consider a limitation) by putting a transparent Border (or Rectangle would also work) over the chart to prevent mouse events from getting through.
fabsenet wrote at 2013-07-19 14:30:
<Metro:Plot IsHitTestVisible="False" ... />
kittof wrote at 2013-11-22 10:32:
<oxyPlot:Plot Model="{Binding PlotModel}" DefaultTrackerTemplate="{x:Null}" />
wpf RenderContext discussion
ProCodeMyth wrote at 2013-05-29 08:08:
is abstract classe, to render any shape ,we have to use drawingcontext in visual ,once we draw what we want, drawingcontext must close. so DrawingRenderContext in oxyplot have means(value) only when we put DrawingRenderContext in visual and add visual to visual tree . if we want development in DrawingRenderContext envimoment , we mayehave to resturture entire oxyplot.wpf.
objo wrote at 2013-06-08 10:49:
There was not much performance improvement with DrawingRenderContext or GeometryRenderContext, and I think there were also some problems related to aliasing / anti-aliasing.
Another approach would be to create a render context based on DirectX (e.g. using SharpDX) or WriteableBitmap(using WriteableBitmapEx?).
Servicio de atención al cliente por UserEcho