Beispiel #1
0
        /// <summary>
        /// Plots the currently selected data columns of a worksheet as horzizontal bar diagram.
        /// </summary>
        /// <param name="dg">The worksheet controller where the columns are selected in.</param>
        public static void PlotColumnChartRelativeStack(IWorksheetController dg)
        {
            var graph   = TemplateWithXYZPlotLayerWithG3DCartesicCoordinateSystem.CreateGraph(dg.DataTable.GetPropertyContext(), null, dg.DataTable.Name, true);
            var context = graph.GetPropertyContext();

            Plot(dg.DataTable, dg.SelectedDataColumns, graph, PlotStyle_Bar(context, true), GroupStyle_RelativeStack_Bar);
        }
Beispiel #2
0
        /// <summary>
        /// Plots the currently selected data columns of a worksheet as horzizontal bar diagram.
        /// </summary>
        /// <param name="dg">The worksheet controller where the columns are selected in.</param>
        public static void PlotBarChartRelativeStack(IWorksheetController dg)
        {
            var graph = TemplateWithXYZPlotLayerWithG3DCartesicCoordinateSystem.CreateGraph(dg.DataTable.GetPropertyContext(), null, dg.DataTable.Name, true);
            var layer = graph.RootLayer.Layers.OfType <XYZPlotLayer>().First();

            layer.CoordinateSystem = ((G3DCartesicCoordinateSystem)layer.CoordinateSystem).WithXYInterchanged(true);
            var context = graph.GetPropertyContext();

            Plot(dg.DataTable, dg.SelectedDataColumns, graph, PlotStyle_Bar(context, true), GroupStyle_RelativeStack_Bar);
        }
Beispiel #3
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);
            }
        }