Multiple Charts in a single chart control

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

heromyth wrote at 2011-08-09 05:00:

OxyPlot is so cool. I just found it. I want to place multiple charts into a single chart control to implement something like belown:

http://www.agoil.cn/bbs/attachment/Mon_0809/257_140028_0e6d58504e6e1a5.jpg

I wonder whether it is easy for OxyPlot.

I known the ZedChart supports multiple charts layout. However, it is abandoned, and is just for WinForm.

Thanks.


objo wrote at 2011-08-09 10:44:

yes, you can use multiple axes and set the StartPosition and EndPosition (relative to the plot area) of each axis. You can mix both logarithmic and linear axes in the same plot.

For the well logs I think you could create one x-axis for each data series, and set the Start/EndPosition of each axis. You need to create a custom axis class to render only max and min as in your example.

Area series are supported, but you need to make a custom series to support colour coding as in the "Clay" series. 


heromyth wrote at 2011-08-10 06:09:

That's great.

For Silverlight version, it is not support using Axes property in XAML like WPF version, is it?

Yes, each data series should have it's own x-axis. I think it can be called a virtual x-axis or logical x-axis (which is not renderable). And, all the data series in a ChartArea ( or a track ) should share a common x-axis which is actual x-axis (it is drawable for the PlotArea). Has the data series of OxyPlot a interface like this? If not, I want to implement one.

By the way, the position of Axis can be adjusted slightly?  If the magins of PlotArea are set to bigger, the distance between the title and the Axis also becomes bigger, and can't be adjusted.


objo wrote at 2011-08-10 13:31:

I will update the properties of both the WPF and Silverlight Axis controls soon. Currently you have to use a PlotModel to access all properties. (I prefer to do it this way).

All your logs can share the same depth axis, but currently this can only be rendered on the left or right side of the plot area. It is not possible to move the position of the axis, but this is something we could consider to add (using offset values relative to the plot area). E.g. AxisPosition = Left and AxisPositionOffset = 0.5 could render the axis left of the center of the plot.


heromyth wrote at 2011-08-10 15:31:

If multiple x-axises are placed at the same section of a PlotArea for example StartPosition=0, EndPosition=0.5, just one x-axis at a time can do panning. So, if these x-axises are grouped, they can be panned together. Is it worth doing this? If it is, I want to do it.


heromyth wrote at 2011-08-11 05:29:

heromyth wrote:

If multiple x-axises are placed at the same section of a PlotArea for example StartPosition=0, EndPosition=0.5, just one x-axis at a time can do panning. So, if these x-axises are grouped, they can be panned together. Is it worth doing this? If it is, I want to do it.

I have submitted a patch for this. The demo code can be emailed to you if you are interesting in it.

Now, I want to implement the adjustable AxisPosition. Any suggestion for this? Thanks.

How about implementing the splitter between the TrackAreas?


objo wrote at 2011-08-11 08:59:

thanks! I will have a look at this soon. I am currently working on some of the other issues that I will check in first.