### SplineElement start property API details Source: https://pub.dev/documentation/graphic/latest/graphic/SplineElement/start Detailed API documentation for the `start` property of the `SplineElement` class, including its type, description, and modifiers, as part of the `graphic` package. ```APIDOC SplineElement class (from graphic package 2.6.0): Property: start Type: Offset (https://api.flutter.dev/flutter/dart-ui/Offset-class.html) Description: The start point of this spline. Modifiers: final ``` -------------------------------- ### APIDOC LineElement.start Property Reference Source: https://pub.dev/documentation/graphic/latest/graphic/LineElement/start Detailed API documentation for the `start` property of the `LineElement` class, including its type, modifiers, and purpose. ```APIDOC LineElement.start property: Type: Offset Modifiers: final Description: The start point of this line. ``` -------------------------------- ### Generic Abstract Method Signature for Convert Source: https://pub.dev/documentation/graphic/latest/graphic/ScaleConv/convert A generic code example demonstrating the abstract method signature for a conversion function, as seen in the `ScaleConv` class implementation details. ```Dart O convert(I input); ``` -------------------------------- ### Dart LineElement operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/LineElement/operator_equals An example implementation of the `operator ==` method for a `LineElement` class in Dart. This override demonstrates how to check for type compatibility, leverage the superclass's equality, and compare specific properties (`start`, `end`) to determine if two `LineElement` objects are considered equal. This method is typically overridden in conjunction with the `hashCode` method. ```Dart @override bool operator ==(Object other) => other is LineElement && super == other && start == other.start && end == other.end; ``` -------------------------------- ### TooltipGuide Constructor Dart Implementation Details Source: https://pub.dev/documentation/graphic/latest/graphic/TooltipGuide/TooltipGuide Shows the internal Dart implementation of the TooltipGuide constructor, including how parameters are initialized and validated using assertions. ```Dart TooltipGuide({ this.selections, this.followPointer, this.anchor, this.layer, this.mark, this.align, this.offset, this.padding, this.backgroundColor, this.radius, this.elevation, this.textStyle, this.multiTuples, this.variables, this.constrained, this.renderer, }) : assert(isSingle([renderer, align], allowNone: true)), assert(isSingle([renderer, offset], allowNone: true)), assert(isSingle([renderer, padding], allowNone: true)), assert(isSingle([renderer, backgroundColor], allowNone: true)), assert(isSingle([renderer, radius], allowNone: true)), assert(isSingle([renderer, elevation], allowNone: true)), assert(isSingle([renderer, textStyle], allowNone: true)), assert(isSingle([renderer, multiTuples], allowNone: true)), assert(isSingle([renderer, constrained], allowNone: true)), assert(isSingle([renderer, variables], allowNone: true)); ``` -------------------------------- ### CrosshairGuide Constructor API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/CrosshairGuide/CrosshairGuide Documents the parameters available for initializing a CrosshairGuide object, used for creating interactive crosshairs in graphic visualizations. ```APIDOC CrosshairGuide({ Set? selections, List? styles, List? labelStyles, List? labelBackgroundStyles, List? labelPaddings, List? showLabel, List? formatter, List? followPointer, int? layer, int? mark, List? expandEdges }) ``` -------------------------------- ### Dart LineElement start property declaration Source: https://pub.dev/documentation/graphic/latest/graphic/LineElement/start Declaration of the `start` property within the `LineElement` class, specifying it as a final `Offset` type. ```Dart final Offset start; ``` -------------------------------- ### SplineElement start property declaration Source: https://pub.dev/documentation/graphic/latest/graphic/SplineElement/start Declaration of the `start` property within the `SplineElement` class, showing its type as `Offset` and its immutability with the `final` keyword. ```Dart final Offset start; ``` -------------------------------- ### TooltipGuide Constructor API Signature Source: https://pub.dev/documentation/graphic/latest/graphic/TooltipGuide/TooltipGuide Describes the public API signature and available parameters for the TooltipGuide constructor in the graphic package, used for creating tooltips. ```APIDOC TooltipGuide({ Set? selections, List? followPointer, Offset anchor(Size)?, int? layer, int? mark, Alignment? align, Offset? offset, EdgeInsets? padding, Color? backgroundColor, Radius? radius, double? elevation, TextStyle? textStyle, bool? multiTuples, List? variables, bool? constrained, TooltipRenderer? renderer, }) Purpose: Creates a tooltip. ``` -------------------------------- ### Basic Bar Chart Example with Flutter Graphic Source: https://pub.dev/documentation/graphic/latest/graphic/graphic-library Demonstrates how to create a simple bar chart using the `graphic` library's `Chart` widget, defining data, variables, marks, and axes for visualization. ```Dart Chart( data: [ { 'genre': 'Sports', 'sold': 275 }, { 'genre': 'Strategy', 'sold': 115 }, { 'genre': 'Action', 'sold': 120 }, { 'genre': 'Shooter', 'sold': 350 }, { 'genre': 'Other', 'sold': 150 }, ], variables: { 'genre': Variable( accessor: (Map map) => map['genre'] as String, ), 'sold': Variable( accessor: (Map map) => map['sold'] as num, ), }, marks: [IntervalMark()], axes: [ Defaults.horizontalAxis, Defaults.verticalAxis, ], ) ``` -------------------------------- ### AxisGuide Constructor API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/AxisGuide/AxisGuide Documents the parameters and their types for the AxisGuide constructor, which is used to create an axis with various customizable properties. ```APIDOC AxisGuide constructor: AxisGuide({ Dim? dim, String? variable, double? position, bool? flip, PaintStyle? line, TickLine? tickLine, TickLineMapper? tickLineMapper, LabelStyle? label, LabelMapper? labelMapper, PaintStyle? grid, GridMapper? gridMapper, PaintStyle? labelBackground, LabelBackgroundMapper? labelBackgroundMapper, int? layer, int? gridZIndex }) Description: Creates an axis. Parameters: dim: Dim? variable: String? position: double? flip: bool? line: PaintStyle? tickLine: TickLine? tickLineMapper: TickLineMapper? label: LabelStyle? labelMapper: LabelMapper? grid: PaintStyle? gridMapper: GridMapper? labelBackground: PaintStyle? labelBackgroundMapper: LabelBackgroundMapper? layer: int? gridZIndex: int? ``` -------------------------------- ### PartitionMark.new Constructor Dart Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/PartitionMark/PartitionMark Dart implementation of the PartitionMark constructor, showing how it initializes its superclass with the provided parameters to construct a partition mark. ```Dart PartitionMark({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? Function(Tuple)? tag, }) : super( color: color, elevation: elevation, gradient: gradient, label: label, position: position, shape: shape, size: size, modifiers: modifiers, layer: layer, selected: selected, selectionStream: selectionStream, transition: transition, entrance: entrance, tag: tag, ); ``` -------------------------------- ### Dart Modifier.operator == Example Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/Modifier/operator_equals An example of overriding the `operator ==` method in a Dart class, demonstrating a common pattern for equality checks by delegating to an `equalTo` method. ```Dart @override bool operator ==(Object other) => equalTo(other); ``` -------------------------------- ### Dart SymmetricModifier operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/SymmetricModifier/operator_equals A concrete Dart code example demonstrating how the `operator ==` method can be implemented for the `SymmetricModifier` class. This specific implementation checks if the `other` object is an instance of `SymmetricModifier`. ```Dart @override bool operator ==(Object other) => other is SymmetricModifier; ``` -------------------------------- ### PartitionShape Class API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/PartitionShape-class Detailed API documentation for the abstract `PartitionShape` class, including its constructors, properties, methods, and operators, along with inheritance and implementers. ```APIDOC PartitionShape class [abstract] Description: The shape for the partition mark. See also: PartitionMark Inheritance: - Object - Shape - PartitionShape Implementers: - PolygonShape Constructors: - PartitionShape.new() Properties: - defaultSize: double Description: The default size of the shape if Attributes.size is null. Modifiers: no setter, override - hashCode: int Description: The hash code for this object. Modifiers: no setter, inherited - runtimeType: Type Description: A representation of the runtime type of the object. Modifiers: no setter, inherited Methods: - drawGroupLabels(List group, CoordConv coord, Offset origin): List> Description: Renders label elements of all tuples of a group. Modifiers: inherited - drawGroupPrimitives(List group, CoordConv coord, Offset origin): List> Description: Renders primitive elements of all tuples of a group. Modifiers: inherited - equalTo(Object other): bool Description: Checks the equlity of two specs. Modifiers: inherited - noSuchMethod(Invocation invocation): dynamic Description: Invoked when a nonexistent method or property is accessed. Modifiers: inherited - representPoint(List position): Offset Description: Gets the represent point of Attributes.position points. Modifiers: inherited - toString(): String Description: A string representation of this object. Modifiers: inherited Operators: - operator ==(Object other): bool Description: The equality operator. Modifiers: inherited ``` -------------------------------- ### PointMark Constructor Dart Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/PointMark/PointMark Provides the Dart source code for the `PointMark` constructor, illustrating how it initializes its properties by passing them directly to the superclass constructor. This implementation ensures proper inheritance and setup of mark attributes. ```Dart PointMark({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? Function(Tuple)? tag, }) : super( color: color, elevation: elevation, gradient: gradient, label: label, position: position, shape: shape, size: size, modifiers: modifiers, layer: layer, selected: selected, selectionStream: selectionStream, transition: transition, entrance: entrance, tag: tag, ); ``` -------------------------------- ### Dart LabelElement operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/LabelElement/operator_equals Example implementation of the `operator ==` method for the `LabelElement` class in Dart. It checks if the `other` object is a `LabelElement`, then compares the superclass equality and the `text` property. ```Dart @override bool operator ==(Object other) => other is LabelElement && super == other && text == other.text; ``` -------------------------------- ### CrosshairGuide Constructor Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/CrosshairGuide/CrosshairGuide Shows the internal implementation of the CrosshairGuide constructor, assigning provided parameters to instance variables. ```Dart CrosshairGuide({ this.selections, this.styles, this.labelStyles, this.labelBackgroundStyles, this.labelPaddings, this.showLabel, this.formatter, this.followPointer, this.layer, this.mark, this.expandEdges }); ``` -------------------------------- ### Dart Implementation of LineElement.lerpFrom Source: https://pub.dev/documentation/graphic/latest/graphic/LineElement/lerpFrom The Dart code demonstrating the internal logic of the `lerpFrom` method. It shows how properties like `start`, `end`, `style`, `rotation`, and `rotationAxis` are interpolated using `Offset.lerp` and `lerpDouble`. ```Dart @override LineElement lerpFrom(covariant LineElement from, double t) => LineElement( start: Offset.lerp(from.start, start, t)!, end: Offset.lerp(from.end, end, t)!, style: style.lerpFrom(from.style, t), rotation: lerpDouble(from.rotation, rotation, t), rotationAxis: Offset.lerp(from.rotationAxis, rotationAxis, t), tag: tag, ); ``` -------------------------------- ### Dart `ElementStyle` `operator ==` Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/ElementStyle/operator_equals A practical example demonstrating how to override the `operator ==` method for the `ElementStyle` class in Dart. This specific implementation checks if the `other` object is an instance of `ElementStyle`. ```Dart @override bool operator ==(Object other) => other is ElementStyle; ``` -------------------------------- ### FunctionMark.new Constructor API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/FunctionMark/FunctionMark Defines the signature and parameters for creating a new FunctionMark instance, specifying various encoding and styling options. ```APIDOC FunctionMark({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? Function(Tuple)? tag }) ``` -------------------------------- ### Dart MoveSegment operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/MoveSegment/operator_equals Example implementation of the `operator ==` method for the `MoveSegment` class, demonstrating how to check for type, call the superclass's equality, and compare specific properties like `end`. ```Dart @override bool operator ==(Object other) => other is MoveSegment && super == other && end == other.end; ``` -------------------------------- ### Dart LinearScale operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/LinearScale/operator_equals An example implementation of the `operator ==` method for the `LinearScale` class in Dart, demonstrating a common pattern for overriding the equality operator to compare instances based on their type and superclass equality. ```dart @override bool operator ==(Object other) => other is LinearScale && super == other; ``` -------------------------------- ### LineMark Constructor Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/LineMark/LineMark The internal implementation of the `LineMark` constructor, showing how it initializes its properties by calling the superclass constructor with the provided arguments. ```Dart LineMark({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? Function(Tuple)? tag, }) : super( color: color, elevation: elevation, gradient: gradient, label: label, position: position, shape: shape, size: size, modifiers: modifiers, layer: layer, selected: selected, selectionStream: selectionStream, transition: transition, entrance: entrance, tag: tag, ); ``` -------------------------------- ### Dart Implementation of FunctionMark Constructor Source: https://pub.dev/documentation/graphic/latest/graphic/FunctionMark/FunctionMark Provides the Dart source code for the FunctionMark constructor, demonstrating how it initializes its superclass with the provided parameters. ```Dart FunctionMark({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? Function(Tuple)? tag, }) : super( color: color, elevation: elevation, gradient: gradient, label: label, position: position, shape: shape, size: size, modifiers: modifiers, layer: layer, selected: selected, selectionStream: selectionStream, transition: transition, entrance: entrance, tag: tag, ); ``` -------------------------------- ### Dart CustomAnnotation operator == implementation example Source: https://pub.dev/documentation/graphic/latest/graphic/CustomAnnotation/operator_equals An example implementation of the `operator ==` method for the `CustomAnnotation` class in Dart. This override checks if the `other` object is also a `CustomAnnotation` and then delegates to the superclass's equality check. ```Dart @override bool operator ==(Object other) => other is CustomAnnotation && super == other; ``` -------------------------------- ### SectorElement Constructor API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/SectorElement/SectorElement Defines the signature and parameters for the `SectorElement` constructor, detailing required and optional inputs for creating a new sector element. ```APIDOC SectorElement constructor: SectorElement({ required Offset center, required double startRadius, required double endRadius, required double startAngle, required double endAngle, BorderRadius? borderRadius, required PaintStyle style, double? rotation, Offset? rotationAxis, String? tag }) Description: Creates a sector element. Parameters: center: required Offset - The center point of the sector. startRadius: required double - The inner radius of the sector. endRadius: required double - The outer radius of the sector. startAngle: required double - The starting angle of the sector in radians. endAngle: required double - The ending angle of the sector in radians. borderRadius: BorderRadius? - Optional border radius for the sector. style: required PaintStyle - The paint style to use for the sector. rotation: double? - Optional rotation angle for the sector. rotationAxis: Offset? - Optional axis for rotation. tag: String? - Optional tag for the element. ``` -------------------------------- ### Dart MarkElement operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/MarkElement/operator_equals An example implementation of the `operator ==` method for the `MarkElement` class. This override checks if the `other` object is also a `MarkElement` and then compares specific properties like `style`, `rotation`, `rotationAxis`, and `tag` for equality. ```Dart @override bool operator ==(Object other) => other is MarkElement && style == other.style && rotation == other.rotation && rotationAxis == other.rotationAxis && tag == other.tag; ``` -------------------------------- ### PolylineElement.lerpFrom Method API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/PolylineElement/lerpFrom API documentation for the `lerpFrom` method of the `PolylineElement` class, detailing its signature, parameters, return type, and a brief description of its purpose. ```APIDOC PolylineElement.lerpFrom( from: covariant PolylineElement, t: double ) -> PolylineElement Description: Linearly interpolate between this element and `from`. ``` -------------------------------- ### ImageStyle operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/ImageStyle/operator_equals Provides an example implementation of the `operator ==` for the `ImageStyle` class. This implementation checks if the `other` object is also an `ImageStyle`, calls the superclass's `==` method, and then compares the `blendMode` property for equality. ```Dart @override bool operator ==(Object other) => other is ImageStyle && super == other && blendMode == other.blendMode; ``` -------------------------------- ### Dart ContinuousScaleConv operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/ContinuousScaleConv/operator_equals Provides an example implementation of the `operator ==` method for the `ContinuousScaleConv` class in Dart. This override checks for type compatibility and equality of `min` and `max` properties, along with the superclass's equality. ```Dart @override bool operator ==(Object other) => other is ContinuousScaleConv && super == other && min == other.min && max == other.max; ``` -------------------------------- ### Selection Constructor API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/Selection/Selection Documents the parameters and their types for the `Selection` class constructor, which is used to create a new selection instance with various configuration options. ```APIDOC Selection constructor: Selection({ Dim? dim, String? variable, Set? on, Set? clear, Set? devices, int? layer }) Purpose: Creates a selection. ``` -------------------------------- ### Dart AxisGuide Constructor Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/AxisGuide/AxisGuide Shows the internal implementation of the AxisGuide constructor in Dart, including how parameters are assigned and the assertions used for validation. ```Dart AxisGuide({ this.dim, this.variable, this.position, this.flip, this.line, this.tickLine, this.tickLineMapper, this.label, this.labelMapper, this.grid, this.gridMapper, this.labelBackground, this.labelBackgroundMapper, this.layer, this.gridZIndex, }) : assert(isSingle([tickLine, tickLineMapper], allowNone: true)), assert(isSingle([label, labelMapper], allowNone: true)), assert(isSingle([grid, gridMapper], allowNone: true)), assert(isSingle([labelBackground, labelBackgroundMapper], allowNone: true)); ``` -------------------------------- ### Dart Segment Class operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/Segment/operator_equals Example implementation of the `operator ==` method for the `Segment` class in Dart. It checks if the `other` object is also a `Segment` and if their `tag` properties are equal, demonstrating a common pattern for value equality in Dart. ```dart @override bool operator ==(Object other) => other is Segment && tag == other.tag; ``` -------------------------------- ### Dart operator == Method Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/Shape/operator_equals This Dart code snippet provides a typical example of how to implement the `operator ==` method. It demonstrates overriding the default behavior to delegate equality comparison to a custom `equalTo` method, which is a common pattern for complex object equality. ```Dart @override bool operator ==(Object other) => equalTo(other); ``` -------------------------------- ### TooltipGuide Class API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/TooltipGuide-class Detailed API specification for the `TooltipGuide` class, including its configurable properties, available methods, and overloaded operators. ```APIDOC TooltipGuide Class: Properties: align: Alignment? How this tooltip align to the anchor. getter/setter pair anchor: Offset Function(Size)? Indicates the anchor position of this tooltip directly. getter/setter pair backgroundColor: Color? The background color of this tooltip window. getter/setter pair constrained: bool? Whether the tooltip should be constrained within the chart widget border. getter/setter pair elevation: double? The shadow elevation of this tooltip window. getter/setter pair followPointer: List? Whether the position for each dimension follows the pointer or stick to selected points. getter/setter pair hashCode: int The hash code for this object. no setter inherited layer: int? The layer of this tooltip. getter/setter pair mark: int? Which mark series this tooltip reacts to. getter/setter pair multiTuples: bool? Whether to show multiple tuples or only single tuple in this tooltip. getter/setter pair offset: Offset? The offset of the tooltip form the anchor. getter/setter pair padding: EdgeInsets? The padding form the content to the window border of this tooltip. getter/setter pair radius: Radius? The border radius of this tooltip window. getter/setter pair renderer: TooltipRenderer? Indicates a custom render funcion of this tooltip. getter/setter pair runtimeType: Type A representation of the runtime type of the object. no setter inherited selections: Set? The selections this crosshair reacts to. getter/setter pair textStyle: TextStyle? The text style of this tooltip content. getter/setter pair variables: List? The variable values of tuples to show on in this tooltip. getter/setter pair Methods: noSuchMethod(invocation: Invocation) -> dynamic Invoked when a nonexistent method or property is accessed. inherited toString() -> String A string representation of this object. inherited Operators: operator ==(other: Object) -> bool The equality operator. override ``` -------------------------------- ### TooltipGuide Class API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/TooltipGuide-class Defines the `TooltipGuide` class, which specifies the structure and styling of tooltips. It allows for deep customization through its constructor parameters. ```APIDOC class TooltipGuide: description: The specification of a tooltip. Constructors: TooltipGuide.new({ selections: Set? followPointer: List? anchor: Offset Function(Size)? layer: int? mark: int? align: Alignment? offset: Offset? padding: EdgeInsets? backgroundColor: Color? radius: Radius? elevation: double? textStyle: TextStyle? multiTuples: bool? variables: List? constrained: bool? renderer: TooltipRenderer? }) description: Creates a tooltip. ``` -------------------------------- ### Dart Example: Custom Equality for ScaleConv Class Source: https://pub.dev/documentation/graphic/latest/graphic/ScaleConv/operator_equals A practical Dart code example demonstrating how to implement a custom `operator ==` for the `ScaleConv` class. This implementation checks if the `other` object is also a `ScaleConv` instance and then performs a deep comparison of their `ticks` properties using `deepCollectionEquals`. ```Dart @override bool operator ==(Object other) => other is ScaleConv && deepCollectionEquals(ticks, other.ticks); ``` -------------------------------- ### Chart Constructor Source: https://pub.dev/documentation/graphic/latest/graphic/Chart-class Creates a new Chart widget instance. This constructor requires a list of `data`, a map of `variables`, and a list of `marks`. It also accepts various optional parameters for layout (`padding`), guides (`axes`, `tooltip`, `crosshair`), annotations, selections, and event stream controllers for gestures, resizing, and data changes. ```APIDOC Chart.new({ Key? key, required List data, bool? changeData, required Map> variables, List? transforms, required List> marks, Coord? coord, EdgeInsets padding(Size)?, List? axes, TooltipGuide? tooltip, CrosshairGuide? crosshair, List? annotations, Map? selections, bool? rebuild, StreamController? gestureStream, StreamController? resizeStream, StreamController>? changeDataStream }) ``` -------------------------------- ### APIDOC Segment.lerpFrom Method Reference Source: https://pub.dev/documentation/graphic/latest/graphic/Segment/lerpFrom Comprehensive API documentation for the `lerpFrom` method, including its parameters, return type, and a brief description of its functionality. ```APIDOC Segment: lerpFrom( from: covariant Segment, t: double ) Returns: Segment Description: Linearly interpolate between this segment and 'from'. ``` -------------------------------- ### Dart DiscreteScaleConv operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/DiscreteScaleConv/operator_equals An example implementation of the `operator ==` method for the `DiscreteScaleConv` class in Dart. This snippet demonstrates how to override the equality operator to compare specific properties of the class, utilize `super == other` for inherited equality, and use `deepCollectionEquals` for collection comparisons. ```Dart @override bool operator ==(Object other) => other is DiscreteScaleConv && super == other && deepCollectionEquals(values, other.values) && align == other.align && band == other.band; ``` -------------------------------- ### PartitionMark Class API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/PartitionMark-class Detailed API documentation for the abstract PartitionMark class, outlining its inheritance hierarchy, classes that implement it, and the parameters available in its constructor for creating new instances. ```APIDOC PartitionMark class [abstract] Description: The specification of a partition mark. Partitions separate a set of points into two or more subsets. Inheritance: - Object - Mark - PartitionMark Implementers: - PolygonMark Constructors: PartitionMark.new({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? tag(Tuple)? }) Description: Creates a partition mark. ``` -------------------------------- ### Dart CloseSegment operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/CloseSegment/operator_equals A practical Dart code example demonstrating how to correctly override the `operator ==` method for a `CloseSegment` class. This implementation checks if the `other` object is also a `CloseSegment` and then delegates to the superclass's equality check, ensuring proper type-aware comparison. ```Dart @override bool operator ==(Object other) => other is CloseSegment && super == other; ``` -------------------------------- ### Typedef: TooltipRenderer Source: https://pub.dev/documentation/graphic/latest/graphic Gets the elements of a tooltip. ```APIDOC TooltipRenderer = List> Function(Size size, Offset anchor, Map selectedTuples) Parameters: size: Size anchor: Offset selectedTuples: Map ``` -------------------------------- ### PartitionMark.new Constructor API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/PartitionMark/PartitionMark API documentation for the PartitionMark class constructor, outlining its generic type parameter and all optional named parameters with their respective types. This constructor is used to create a partition mark. ```APIDOC PartitionMark({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? Function(Tuple)? tag }) ``` -------------------------------- ### Label Class API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/Label-class Detailed API documentation for the `Label` class, including its constructor, properties, methods, and operators. This reference outlines how to instantiate a Label object and interact with its various attributes and behaviors. ```APIDOC class Label Description: Specification of a label. A label is a span of text with styles. In is used for LabelEncode, TagAnnotation, etc in the chart. If the text is null or empty, the label will render nothing. Constructors: Label.new(String? text, LabelStyle? style) Description: Creates a label. Properties: hashCode: int (read-only, inherited) Description: The hash code for this object. haveText: bool (read-only) Description: Whether the text is not null or empty; runtimeType: Type (read-only, inherited) Description: A representation of the runtime type of the object. style: LabelStyle (read/write) Description: The label style. text: String? (read/write) Description: The label text. Methods: noSuchMethod(Invocation invocation): dynamic (inherited) Description: Invoked when a nonexistent method or property is accessed. toString(): String (inherited) Description: A string representation of this object. Operators: operator ==(Object other): bool (override) Description: The equality operator. ``` -------------------------------- ### Dart ElementAnnotation operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/ElementAnnotation/operator_equals An example implementation of the `operator ==` method for the `ElementAnnotation` class in Dart. This override checks for type compatibility, calls the superclass's equality, and performs deep collection comparisons for `variables` and `values`, along with a direct comparison for `clip`. ```Dart @override bool operator ==(Object other) => other is ElementAnnotation && super == other && deepCollectionEquals(variables, other.variables) && deepCollectionEquals(values, values) && clip == other.clip; ``` -------------------------------- ### Dart LineAnnotation operator == Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/LineAnnotation/operator_equals A concrete Dart example demonstrating how the `operator ==` method is implemented for the `LineAnnotation` class. It shows how to compare properties of the current object with those of another `LineAnnotation` instance to determine equality, ensuring type safety and proper inheritance chain comparison. ```Dart @override bool operator ==(Object other) => other is LineAnnotation && super == other && dim == other.dim && variable == other.variable && value == other.value && style == other.style; ``` -------------------------------- ### ScaleConv.convert Abstract Method API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/ScaleConv/convert API documentation for the `convert` abstract method of the `ScaleConv` class, detailing its signature, parameters, return type, and purpose. ```APIDOC Class: ScaleConv Method: convert Description: Converts an input to output. Signature: SV convert(V input) Parameters: input: V - The input value to convert. Returns: SV - The converted output value. ``` -------------------------------- ### Typedef: LabelMapper Source: https://pub.dev/documentation/graphic/latest/graphic Gets an axis label form an axis value text. ```APIDOC LabelMapper = LabelStyle? Function(String? text, int index, int total) Parameters: text: String? index: int total: int ``` -------------------------------- ### OrdinalScaleConv Constructor Dart Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/OrdinalScaleConv/OrdinalScaleConv Provides the Dart implementation details for the OrdinalScaleConv constructor, showing how it initializes the object by calling the superclass constructor with the provided arguments. ```Dart OrdinalScaleConv( OrdinalScale spec, List tuples, String variable, ) : super(spec, tuples, variable); ``` -------------------------------- ### Dart PaintStyle operator == Method Implementation Example Source: https://pub.dev/documentation/graphic/latest/graphic/PaintStyle/operator_equals An example implementation of the `operator ==` method for the `PaintStyle` class in Dart. This override checks if the 'other' object is also a `PaintStyle` instance and then performs a detailed comparison of various properties, including colors, gradients, blend mode, stroke properties, elevation, shadow color, and dash patterns, to determine equality. ```Dart @override bool operator ==(Object other) => other is PaintStyle && super == other && fillColor == other.fillColor && fillGradient == other.fillGradient && // fillShader will not check. strokeColor == other.strokeColor && strokeGradient == other.strokeGradient && // strokeShader will not check gradientBounds == other.gradientBounds && blendMode == other.blendMode && strokeWidth == other.strokeWidth && strokeCap == other.strokeCap && strokeJoin == other.strokeJoin && strokeMiterLimit == other.strokeMiterLimit && elevation == other.elevation && shadowColor == other.shadowColor && deepCollectionEquals(dash, other.dash) && dashOffset == other.dashOffset; ``` -------------------------------- ### TooltipGuide.textStyle Property API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/TooltipGuide/textStyle API documentation for the `textStyle` property of the `TooltipGuide` class, outlining its type, description, default behavior, and access methods. ```APIDOC TooltipGuide class: Properties: textStyle: Type: TextStyle? Description: The text style of this tooltip content. Details: If null, a default TextStyle(color: Color(0xff595959), fontSize: 12,) is set. Access: getter/setter pair ``` -------------------------------- ### Typedef: TickLineMapper Source: https://pub.dev/documentation/graphic/latest/graphic Gets an axis tick line form an axis value text. ```APIDOC TickLineMapper = TickLine? Function(String? text, int index, int total) Parameters: text: String? index: int total: int ``` -------------------------------- ### Dart IntervalMark Constructor Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/IntervalMark/IntervalMark Shows the Dart source code for the `IntervalMark` constructor, illustrating how it initializes the mark by passing all provided parameters to its superclass. ```Dart IntervalMark({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? Function(Tuple)? tag, }) : super( color: color, elevation: elevation, gradient: gradient, label: label, position: position, shape: shape, size: size, modifiers: modifiers, layer: layer, selected: selected, selectionStream: selectionStream, transition: transition, entrance: entrance, tag: tag, ); ``` -------------------------------- ### Typedef: LabelBackgroundMapper Source: https://pub.dev/documentation/graphic/latest/graphic Gets an axis labelBackground style form an axis value text. ```APIDOC LabelBackgroundMapper = PaintStyle? Function(String? text, int index, int total) Parameters: text: String? index: int total: int ``` -------------------------------- ### AxisGuide Class API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/AxisGuide-class Detailed API documentation for the AxisGuide class, including its constructor parameters, properties, and inherited methods, providing full control over axis appearance and behavior. ```APIDOC Class: AxisGuide Description: The specification of an axis. There can be mutiple axes in one dimension. Constructors: AxisGuide.new({ Dim? dim, String? variable, double? position, bool? flip, PaintStyle? line, TickLine? tickLine, TickLineMapper? tickLineMapper, LabelStyle? label, LabelMapper? labelMapper, PaintStyle? grid, GridMapper? gridMapper, PaintStyle? labelBackground, LabelBackgroundMapper? labelBackgroundMapper, int? layer, int? gridZIndex }) Description: Creates an axis. Properties: dim: Dim? Description: The dimension where this axis lies. Access: getter/setter pair flip: bool? Description: Whether to flip tick lines and labels to the other side of the axis line. Access: getter/setter pair grid: PaintStyle? Description: The grid stroke style for all ticks. Access: getter/setter pair gridMapper: GridMapper? Description: Indicates how to get the grid stroke style for each tick. Access: getter/setter pair gridZIndex: int? Description: The layer of the grids. Access: getter/setter pair hashCode: int Description: The hash code for this object. Access: no setter inherited label: LabelStyle? Description: The label style for all ticks. Access: getter/setter pair labelBackground: PaintStyle? Description: The labelBackground style for all ticks. Access: getter/setter pair labelBackgroundMapper: LabelBackgroundMapper? Description: Indicates how to get the labelBackground style for each tick. Access: getter/setter pair labelMapper: LabelMapper? Description: Indicates how to get the label style for each tick. Access: getter/setter pair layer: int? Description: The layer of this axis. Access: getter/setter pair line: PaintStyle? Description: The stroke style for the axis line. Access: getter/setter pair position: double? Description: The position ratio in the crossing dimension where this axis line stands. Access: getter/setter pair runtimeType: Type Description: A representation of the runtime type of the object. Access: no setter inherited tickLine: TickLine? Description: The tick line settings for all ticks. Access: getter/setter pair tickLineMapper: TickLineMapper? Description: Indicates how to get the tick line setting for each tick. Access: getter/setter pair variable: String? Description: The variable this axis is binded to. Access: getter/setter pair Methods: noSuchMethod(Invocation invocation): dynamic Description: Invoked when a nonexistent method or property is accessed. Access: inherited toString(): String Description: A string representation of this object. Access: inherited ``` -------------------------------- ### Typedef: GridMapper Source: https://pub.dev/documentation/graphic/latest/graphic Gets an axis grid stroke style form an axis value text. ```APIDOC GridMapper = PaintStyle? Function(String? text, int index, int total) Parameters: text: String? index: int total: int ``` -------------------------------- ### PolygonMark Constructor Dart Implementation Source: https://pub.dev/documentation/graphic/latest/graphic/PolygonMark/PolygonMark The Dart source code demonstrating the internal implementation of the PolygonMark constructor, showing how it passes parameters to its superclass for initialization. ```Dart PolygonMark({ ColorEncode? color, ElevationEncode? elevation, GradientEncode? gradient, LabelEncode? label, Varset? position, ShapeEncode? shape, SizeEncode? size, List? modifiers, int? layer, Selected? selected, StreamController? selectionStream, Transition? transition, Set? entrance, String? Function(Tuple)? tag, }) : super( color: color, elevation: elevation, gradient: gradient, label: label, position: position, shape: shape, size: size, modifiers: modifiers, layer: layer, selected: selected, selectionStream: selectionStream, transition: transition, entrance: entrance, tag: tag, ); ``` -------------------------------- ### Flutter GestureType: secondaryLongPressDown Source: https://pub.dev/documentation/graphic/latest/graphic/GestureType Fired when a pointer contacts the screen with a secondary button, potentially starting a long-press. Precedes secondaryLongPressStart or secondaryLongPressCancel. ```APIDOC secondaryLongPressDown → const GestureType : The pointer has contacted the screen with a secondary button, which might be the start of a long-press. This triggers after the pointer down gesture. If the user completes the long-press, and this gesture wins, secondaryLongPressStart will be emitted after this gesture. Otherwise, secondaryLongPressCancel will be emitted after this gesture. A gesture of this type has details of LongPressDownDetails. ``` -------------------------------- ### IntervalSelection Constructor API Reference Source: https://pub.dev/documentation/graphic/latest/graphic/IntervalSelection/IntervalSelection API signature and parameter details for the `IntervalSelection` constructor, outlining the types and names of arguments required to instantiate an interval selection. ```APIDOC IntervalSelection.new constructor: Parameters: color: Color? dim: Dim? variable: String? clear: Set? devices: Set? layer: int? Description: Creates an interval selection. ``` -------------------------------- ### Define Varset for X and Y dimensions using cross operator Source: https://pub.dev/documentation/graphic/latest/graphic/Varset-class Example demonstrating how to assign 'name' to the x-dimension and 'score' to the y-dimension using the cross operator (*). ```Dart Varset('name') * Varset('score') ```