private void loadFromTemplate(CurveChartTemplate template) { _chartFromTemplateService.InitializeChartFromTemplate( Chart, ChartEditorPresenter.AllDataColumns, template, Helper.NameDefinition, false); }
public void InitFromTemplate(CurveChart chart, IChartEditorAndDisplayPresenter chartEditorPresenter, IReadOnlyCollection <DataColumn> allAvailableColumns, IReadOnlyCollection <IndividualSimulation> simulations, Func <DataColumn, string> nameForColumn, CurveChartTemplate defaultChartTemplate = null) { if (defaultChartTemplate == null) { UpdateDefaultSettings(chartEditorPresenter.EditorPresenter, allAvailableColumns, simulations); return; } _chartFromTemplateService.InitializeChartFromTemplate(chart, allAvailableColumns, defaultChartTemplate, nameForColumn); //this can happen if template does not have any matching curve if (!chart.Curves.Any()) { UpdateDefaultSettings(chartEditorPresenter.EditorPresenter, allAvailableColumns, simulations); } }
public void InitializeChartFromTemplate(CurveChart chart, IEnumerable <DataColumn> dataColumns, CurveChartTemplate template, Func <DataColumn, string> nameDefinition, bool warnIfNumberOfCurvesAboveThreshold, bool propogateChartChangeEvent = true) { if (dataColumns == null || template == null) { return; } _chartFromTemplateService.InitializeChartFromTemplate(chart, dataColumns, template, nameDefinition, warnIfNumberOfCurvesAboveThreshold, propogateChartChangeEvent); }