PlotLayoutSVG class
Computes a plot layout for drawing with SVG, but also for 2D html: Sets up the graphics containers and their relative coordinates and sizes. The layout will be contained in a div element. Several plots can be embedded in the layout e.g. using SimplePlot.mult of this package.
Constructors
- PlotLayoutSVG(DivElement plotDiv, bool withCanvas)
-
Creates a plot layout to be contained in
plotDiv
. For additional 2D html drawingscontourCanvas
is created ifwithCanvas
is true. This constructor is used to embed a single plot by SimplePlot of this package. -
PlotLayoutSVG.mult(DivElement plotDiv, bool withCanvas, List<
List< plotSizes, Map<double> >LayA, String> layoutAttr) -
Creates a plot layout consisting of several sub-layout. the entire layout
will be embedded in
plotDiv
. For additional 2D html drawingscontourCanvas
is created ifwithCanvas
is true.plotSizes
defines the positions an sizes of each sub-layout in units ofplotDiv
. Example for 3 sub-layouts: [0.0, 0.0, 0.5, 0.5
,0.5, 0.0, 0.5, 0.5
,0.1, 0.5, 0.7, 0.5
] This constructor can be used e.g. to embed a several plots using SimplePlot.mult of this package. IflayoutAttr
is null, LAYOUT_DEFAULT_ATTRIBUTES are used. Otherwise the attributes contained inlayoutAttr
will override the respective default attributes.
Properties
-
attr
↔ Map<
LayA, String> -
Layout attributes
read / write
-
contourCanvases
↔ List<
CanvasElement> -
For 2D plots
read / write
-
dataAreaBorders
↔ List<
RectElement> -
A frame around the 'dataArea'.
read / write
-
dataAreaRects
↔ List<
Rectangle< int> > -
The coordinates with respect to their container
read / write
-
dataAreas
↔ List<
SvgSvgElement> -
All graphics is drawn using SVG Scalable Vector Graphics.
plotArea
is added to plotDiv and contains the entire plot.dataArea
is added toplotArea
and contains the polylines and the legend. The axes are drawn outside thedataArea
but within theplotArea
.read / write -
dataInsets
↔ Rectangle<
int> -
read / write
-
plotAreaBorders
↔ List<
RectElement> -
A frame around the 'dataArea'.
read / write
-
plotAreaRects
↔ List<
Rectangle< int> > -
The coordinates with respect to their container
read / write
-
plotAreas
↔ List<
SvgSvgElement> -
All graphics is drawn using SVG Scalable Vector Graphics.
plotArea
is added to plotDiv and contains the entire plot.dataArea
is added toplotArea
and contains the polylines and the legend. The axes are drawn outside thedataArea
but within theplotArea
.read / write - plotDiv ↔ DivElement
-
plotDiv will contain the graphics, it's size must be as wished by
the user.
read / write
-
plotSizes
↔ List<
List< double> > -
List of
left, top, width, height
in plotDiv fractions (0...1)plotSizes.length
= number of plotsread / write -
xaxisRects
↔ List<
Rectangle< int> > -
The coordinates with respect to their container
read / write
-
yaxisRects
↔ List<
Rectangle< int> > -
The coordinates with respect to their container
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Static Properties
-
LAYOUT_DEFAULT_ATTRIBUTES
→ Map<
LayA, String> -
Default attributes for a layout
final