/// <summary> /// Parallel Coordinates Style object. /// </summary> /// <param name="LineColor">Color of the selected Lines/Values.</param> /// <param name="Address">Grid Coordinates.</param> /// <param name="Margins">Margins in pixels.</param> /// <param name="Width">Width of the Chart in pixels.</param> /// <param name="Height">Height of the Chart in pixels.</param> /// <returns name="Style">Parallel Coordinates Style.</returns> /// <search>parallel, coordinates, style</search> public static ParallelCoordinatesStyle Style( [DefaultArgument("DSCore.Color.ByARGB(1,50,130,190)")] DSCore.Color LineColor, [DefaultArgument("Charts.MiscNodes.GetNull()")] GridAddress Address, [DefaultArgument("Charts.MiscNodes.Margins()")] Margins Margins, int Width = 1000, int Height = 500) { ParallelCoordinatesStyle style = new ParallelCoordinatesStyle(); style.Width = Width; style.Height = Height; style.LineColor = ChartsUtilities.ColorToHexString(sColor.FromArgb(LineColor.Alpha, LineColor.Red, LineColor.Green, LineColor.Blue)); style.Margins = Margins; style.SizeX = (int)Math.Ceiling(Width / 100d); style.SizeY = (int)Math.Ceiling(Height / 100d); if (Address != null) { style.GridRow = Address.X; style.GridColumn = Address.Y; } else { style.GridRow = 1; style.GridColumn = 1; } return(style); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Color lineColor = Color.FromArgb(50, 130, 190); GridAddress address = new GridAddress(1, 1); Margins margins = new Margins(); int width = 1000; int height = 500; DA.GetData <Color>(0, ref lineColor); DA.GetData <GridAddress>(1, ref address); DA.GetData <Margins>(2, ref margins); DA.GetData <int>(3, ref width); DA.GetData <int>(4, ref height); // create style ParallelCoordinatesStyle style = new ParallelCoordinatesStyle(); style.LineColor = ChartsUtilities.ColorToHexString(lineColor); style.GridRow = address.X; style.GridColumn = address.Y; style.Width = width; style.Height = height; style.Margins = margins; style.SizeX = (int)Math.Ceiling(width / 100d); style.SizeY = (int)Math.Ceiling(height / 100d); DA.SetData(0, style); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { ParallelCoordinatesData data = null; ParallelCoordinatesStyle style = null; if (!DA.GetData <ParallelCoordinatesData>(0, ref data)) { return; } if (!DA.GetData <ParallelCoordinatesStyle>(1, ref style)) { return; } ParallelCoordinatesChart chart = new ParallelCoordinatesChart(data, style); DA.SetData(0, chart); }
/// <summary> /// Parallel Coordinates Chart. /// </summary> /// <param name="Data">Parallel Coordinates Data object.</param> /// <param name="Style">Parallel Coordinates Style object.</param> /// <returns name="Chart">Parallel Coordinates Chart.</returns> public static ParallelCoordinatesChart Chart(ParallelCoordinatesData Data, ParallelCoordinatesStyle Style) { ParallelCoordinatesChart chart = new ParallelCoordinatesChart(Data, Style); return(chart); }
/// <summary> /// Parallel Coordinates Chart. /// </summary> /// <param name="Data">Parallel Coordinates Data object.</param> /// <param name="Style">Parallel Coordinates Style object.</param> /// <returns name="Chart">Parallel Coordinates Chart.</returns> public static D3jsLib.ParallelCoordinates.ParallelCoordinatesChart Chart(ParallelCoordinatesData Data, ParallelCoordinatesStyle Style) { D3jsLib.ParallelCoordinates.ParallelCoordinatesChart chart = new D3jsLib.ParallelCoordinates.ParallelCoordinatesChart(Data, Style); return(chart); }