Jump to content
Software FX Community

Pipe/Cylinder Chart


leri_an
 Share

Recommended Posts

Does ChartFX for WPF support a chart type that is similar to this one below? I looked at the sample charts available on your website but didn't find a complete list of the chart types available.

Posted Image

 

Also, I just want to confirm this. Clicking on any section in the chart triggers an event, correct? Because one of our goals is that if a section is selected, let's say (Meeting Arranged - blue section in the chart above), a block of codes will be executed.

Link to comment
Share on other sites

You can achieve this chart by using a 3D stacked gantt, as follows

chart1.Gallery = Gallery.Gantt;

chart1.View3D.IsEnabled = true;

chart1.View3D.Wall.Thickness = 0;

chart1.View3D.BackWallVisibility = Visibility.Collapsed;

chart1.AxisX.Visibility = Visibility.Collapsed;

chart1.AxisY.Visibility = Visibility.Collapsed;

chart1.GalleryTemplates = ChartFX.WPF.Motifs.Edge.GalleryTemplates;

chart1.AllSeries.StackedStyle = StackedStyle.Normal;

DockPanel.SetDock(chart1.LegendBox, Dock.Bottom);

chart1.Series.Add(new SeriesAttributes("Meeting"));

chart1.Series.Add(new SeriesAttributes("Preliminary"));

chart1.Series.Add(new SeriesAttributes("Revised"));

List<DataItem> data = new List<DataItem>();

data.Add(new DataItem(2, 8, 2));

chart1.ItemsSource = data;

chart1.MouseClick += new HitTestEventHandler(OnMouseClick);

Note that in order to set cylinder bar we are setting a property called GalleryTemplates to a prebuilt resource in a separate assembly (ChartFX.WPF.Motifs) so you have to make sure you add a reference in your project. Also note that I am assuming a DataItem class with 3 double properties (Meeting, Preliminary and Revised) as your data layer.

The OnMouseClick would check for HitTestEventArgs.Series

JuanC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...