SfSparkChartThemeData class

Holds the color and typography values for a SfSparkChartTheme. Applies a theme to descendant Syncfusion spark charts widgets.

To obtain the current theme, use SfSparkChartTheme.of.

Widget build(BuildContext context) {
  return Scaffold(
    body: SfSparkChartTheme(
      data: SfSparkChartThemeData(
        brightness: Brightness.light
      ),
      child: SfSparkLineChart(),
    ),
  );
}

See also:

  • SfTheme and SfThemeData, for customizing the visual appearance of the spark chart widgets.
Mixed-in types
Annotations

Constructors

SfSparkChartThemeData({Color? backgroundColor, Color? color, Color? axisLineColor, Color? markerFillColor, Color? dataLabelBackgroundColor, Color? tooltipColor, Color? trackballLineColor, Color? tooltipLabelColor, TextStyle? dataLabelTextStyle, TextStyle? trackballTextStyle})
Initialize the Sfspark chart theme data
const
SfSparkChartThemeData.raw({Brightness? brightness, Color? backgroundColor, Color? color, Color? axisLineColor, Color? markerFillColor, Color? dataLabelBackgroundColor, Color? tooltipColor, Color? trackballLineColor, Color? tooltipLabelColor, TextStyle? dataLabelTextStyle, TextStyle? trackballTextStyle})
Create a SfSparkChartThemeData given a set of exact values. All the values must be specified.
factory

Properties

axisLineColor → Color?
Specifies the color for axis line.
final
backgroundColor → Color?
Specifies the background color of spark chart widgets.
final
color → Color?
Specifies the color of the spark chart.
final
dataLabelBackgroundColor → Color?
Specifies the background color for data labels.
final
dataLabelTextStyle → TextStyle?
Specifies the data label text style for spark chart label text.
final
hashCode → int
The hash code for this object.
no setteroverride
markerFillColor → Color?
Specifies the color for chart marker.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tooltipColor → Color?
Specifies the color of the tooltip.
final
tooltipLabelColor → Color?
Specifies the text color of the tooltip.
final
trackballLineColor → Color?
Specifies the tooltip line color.
final
trackballTextStyle → TextStyle?
Specifies the trackball text style for spark chart label text.
final

Methods

copyWith({Brightness? brightness, Color? backgroundColor, Color? color, Color? axisLineColor, Color? markerFillColor, Color? dataLabelBackgroundColor, Color? tooltipColor, Color? trackballLineColor, Color? tooltipLabelColor, TextStyle? dataLabelTextStyle, TextStyle? trackballTextStyle}) → SfSparkChartThemeData
Creates a copy of this spark chart theme data object with the matching fields replaced with the non-null parameter values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

lerp(SfSparkChartThemeData? a, SfSparkChartThemeData? b, double t) → SfSparkChartThemeData?
Returns the spark chart theme data