Пример #1
0
		public static List<IGPlotItem> CreatePlotItems(DataTable table, IAscendingIntegerCollection selectedColumns, G3DPlotStyleCollection templatePlotStyle)
		{
			var selColumns = new List<DataColumn>(selectedColumns.Count);
			foreach (int i in selectedColumns)
				selColumns.Add(table[i]);

			return CreatePlotItems(selColumns, templatePlotStyle, table.GetPropertyContext());
		}
Пример #2
0
		/// <summary>
		/// Plots selected data columns of a table.
		/// </summary>
		/// <param name="table">The source table.</param>
		/// <param name="selectedColumns">The data columns of the table that should be plotted.</param>
		/// <param name="bLine">If true, the line style is activated (the points are connected by lines).</param>
		/// <param name="bScatter">If true, the scatter style is activated (the points are plotted as symbols).</param>
		/// <param name="preferredGraphName">Preferred name of the graph. Can be null if you have no preference.</param>
		public static void PlotLine(DataTable table, IAscendingIntegerCollection selectedColumns, bool bLine, bool bScatter, string preferredGraphName)
		{
			var graph = TemplateWithXYZPlotLayerWithG3DCartesicCoordinateSystem.CreateGraph(table.GetPropertyContext(), preferredGraphName, table.Name, true);
			var context = graph.GetPropertyContext();

			if (bLine && bScatter)
				Plot(table, selectedColumns, graph, PlotStyle_Line_Symbol(context), GroupStyle_Color_Line_Symbol);
			else if (bLine)
				Plot(table, selectedColumns, graph, PlotStyle_Line(context), GroupStyle_Color_Line);
			else
				Plot(table, selectedColumns, graph, PlotStyle_Symbol(context), GroupStyle_Color_Symbol);
		}