public static void SetModel(ChartControl chart, Bar3DModel model) { foreach (BarSeries3D series in chart.Diagram.Series) { series.Model = model; } }
public static Bar3DKind FindActualBar3DModelKind(Bar3DModel model) { if (model == null) { return(null); } IEnumerable <Bar3DKind> bar3DKinds = Bar3DModel.GetPredefinedKinds(); foreach (Bar3DKind bar3DKind in bar3DKinds) { if (Object.Equals(bar3DKind.Type, model.GetType())) { return(bar3DKind); } } return(null); }
private void icbo3DModle_SelectedIndexChanged(object sender, EventArgs e) { if (icbo3DModle.SelectedIndex == -1) { return; } int bar3DModelIndex = icbo3DModle.SelectedIndex; Bar3DModel barModel = (Bar3DModel)bar3DModelIndex; foreach (Series series in chartControl1.Series) { Bar3DSeriesView seriesView = series.View as Bar3DSeriesView; if (seriesView != null) { seriesView.Model = barModel; } } //checkEditShowFacet.Enabled = IsFacetEnabled(barModel); }