leri_an Posted April 27, 2010 Report Share Posted April 27, 2010 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. 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. Quote Link to comment Share on other sites More sharing options...
JuanC Posted April 27, 2010 Report Share Posted April 27, 2010 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.