These are chat archives for oxyplot/oxyplot

16th
Dec 2014
bronsonmcn
@bronsonmcn
Dec 16 2014 03:36
Nevermind, have managed to find a work around (:
Josh Reeter
@jreeter
Dec 16 2014 13:41
can anyone link me to documentation on how to construct a polar chart? I see the example that returns a plot model.. but I don't know where or how to assign that model to get a polar chart
Øystein Bjørke
@objorke
Dec 16 2014 13:43
the plot model should be assigned to the Model property of the PlotView control
@JohanLarsson The NinjaBinding looks interesting, but I don't remember where we could use it. one of the examples?
@bronsonmcn it should be possible to handle touch (tap) events using a PlotController. I am not sure if there are events on the plot model objects, but that could be added
Josh Reeter
@jreeter
Dec 16 2014 13:49
@objorke "'PolarModel' is not a valid value for property 'Model'."} when I try to bind a plotmodel type to the model property onplotvie
Øystein Bjørke
@objorke
Dec 16 2014 13:50
where did PolarModel come from? it isn't a PlotModel as in the examples?
Josh Reeter
@jreeter
Dec 16 2014 13:51
PolarModel is the name of my property which is of PlotModel type
I construct it in the viewmodel ctor
static method just like the example
Øystein Bjørke
@objorke
Dec 16 2014 13:52
that should work, maybe you should create a new thread in the forum and include the full source!
Johan Larsson
@JohanLarsson
Dec 16 2014 13:55
@objorke I spammed the NinjaBinding here for no other reason that that I think it turned out useful and you guys write WPF.
It is probably useful in many places where one want to bind but lack inheritance cotnext/namescope
Not super nice with reflection but as with most things Clone() on binding is internal.
Quite a bit annoying with all internal stuff in WPF, many things feel arbitrary.
Øystein Bjørke
@objorke
Dec 16 2014 13:59
Will keep the NinjaBinding in mind, thanks for spamming! :-) Agree that there are annoying internal/sealed limitations in WPF, I hope they had some reasons...
Josh Reeter
@jreeter
Dec 16 2014 14:05
@objorke LOL... I haven't had my coffee.... Model="PolarModel"
....
Øystein Bjørke
@objorke
Dec 16 2014 14:13
issue solved? OxyPlot can't help confusing xaml binding error messsages
Josh Reeter
@jreeter
Dec 16 2014 14:14
yea, I forgot the {Binding } syntax
Is there a way to start at 0 in the north direction on a polar plot then build angle clock wise, 0,45,90.. etc
Johan Larsson
@JohanLarsson
Dec 16 2014 14:30
Yuo can pass explicit datapoints iirc
Not super intuitive which is angle and which is radius of x and y
Øystein Bjørke
@objorke
Dec 16 2014 14:32
@jreeter yes, there is a property to change the direction of the origin. use intellisense, I don't remember the name
@JohanLarsson agree, it is not super intuitive since it is sharing data structures with normal X/Y plots. Any ideas how to improve it?
Josh Reeter
@jreeter
Dec 16 2014 14:38
start angle, end angle, min, max, major step, min step
seems to be what I want
Johan Larsson
@JohanLarsson
Dec 16 2014 15:30
@objorke Dunno how much introducing a struct { angle, radius } would break.
Perhaps have IDataPoint and let teh angle stuct implement it explicitly?
Johan Larsson
@JohanLarsson
Dec 16 2014 15:38
I'm really stuck with work so can't write it now.
Øystein Bjørke
@objorke
Dec 16 2014 15:39
I think there are performance reasons for not using IDataPoint in the LineSeries Points collection
Johan Larsson
@JohanLarsson
Dec 16 2014 15:39
Constraining on interface does not box
Øystein Bjørke
@objorke
Dec 16 2014 15:39
could be solved by generics
Johan Larsson
@JohanLarsson
Dec 16 2014 15:39
A List<IDataPoint> would box though
Øystein Bjørke
@objorke
Dec 16 2014 15:40
LineSeries<T> then List<T> Points
Johan Larsson
@JohanLarsson
Dec 16 2014 15:40
List<T> where T : IDataPoint is fine
Øystein Bjørke
@objorke
Dec 16 2014 15:40
right, isn't ScatterSeries defined that way
Johan Larsson
@JohanLarsson
Dec 16 2014 15:40
Maybe, have not looked.
I did not mean my comment like flaming btw.
Øystein Bjørke
@objorke
Dec 16 2014 15:41
so there could be a PolarScatterSeries : ScatterSeries<PolarDataPoint>
writing this without looking at the code...
I don't notice any flaming here :-)
Johan Larsson
@JohanLarsson
Dec 16 2014 15:42
Or just ScatterSeries<T> where T : IDataPoint
Øystein Bjørke
@objorke
Dec 16 2014 15:42
yes, and then the line I showed above
similar for LineSeries
and AreaSeries
big changes for a small improvement...
Johan Larsson
@JohanLarsson
Dec 16 2014 15:43
ok yeah WPF is not great with generics so you probably need the PolarScatterSeries : ScatterSeries<PolarDataPoint>
you are right
Maybe add more constructors for DataPoint?
no problem for the WPF wrapper classes
maybe a static method: DataPoint.CreatePolarPoint(180,1.3e5) where 180 is angle in degrees and 1.3e5 is magnitude
:)
Øystein Bjørke
@objorke
Dec 16 2014 15:46
right
Johan Larsson
@JohanLarsson
Dec 16 2014 15:46
That would not break much
Øystein Bjørke
@objorke
Dec 16 2014 15:48
no, that should be ok.
I think the radial coordinate should be first. And maybe the angular coordinate should be in radians...
Johan Larsson
@JohanLarsson
Dec 16 2014 15:49
maybe one for degrees and one for radians for convenience?
I wrote this for units.
The wpf is a hack to avoid writing xml by hand. Think the generated code is ok.
Also it figures out all overloads needed so you can do type safe things like:
Speed v = length / time;
Øystein Bjørke
@objorke
Dec 16 2014 15:51
Very interesting, I'll continue a discussion over at that repo!
Johan Larsson
@JohanLarsson
Dec 16 2014 15:51
Don't think it has a chat.
yet
Øystein Bjørke
@objorke
Dec 16 2014 15:51
I think we should stay with simple types here
Johan Larsson
@JohanLarsson
Dec 16 2014 15:52
Yeah, you are right
no point bloating the plot lib
Øystein Bjørke
@objorke
Dec 16 2014 15:52
ok, then you should open a chat :-)
Johan Larsson
@JohanLarsson
Dec 16 2014 15:52
ok trying to find where to do it :)
found it
Xavier Hahn
@Gimly
Dec 16 2014 16:18
Hey there, is there any option to have the titles of the axis wrap instead of being cut if the graph is too small?
Øystein Bjørke
@objorke
Dec 16 2014 16:39
that's a new feature. Add one property to define if it should wrap or clip.
I am not sure if text wrapping is supported yet. That could be an extension method on the IRenderContext
Xavier Hahn
@Gimly
Dec 16 2014 16:42
OK, thanks, I'll add that to github then :smile: I really have to find time to contribute again, I add more trouble than I resolve
Øystein Bjørke
@objorke
Dec 16 2014 16:44
no problem, it sounds like a nice feature. And adding the text wrapping method could be used many places. I think there is already an issue wanting to wrap text inside a rectangle annotation
Thomas Ibel
@tibel
Dec 16 2014 18:17
Is there a plan for the next stable release?