SpiderChartComponent constructor

SpiderChartComponent(
  1. RenderComponent parent,
  2. String id, {
  3. double maxLabelWidth = 50,
  4. double pointIntervalRadiusWidth = 20,
  5. Set<String>? labels,
  6. String? css = 'spider',
  7. double gridLineWidth = 1,
  8. double aspectRatio = 1.5,
  9. double textMargin = 15,
  10. String gridLineStrokeStyle = '#d7d7d7',
  11. String labelFillStyle = '#aaaaaa',
  12. String labelFontStyle = '14px sans-serif',
  13. String captionBgColor = '#2d2d2d',
  14. String captionFgColor = 'white',
  15. String captionFontFamily = 'sans-serif',
})

Implementation

SpiderChartComponent(super.parent, super.id, {
  this.maxLabelWidth = 50,
  this.pointIntervalRadiusWidth = 20,
  Set<String>? labels,
  String? css = 'spider',
  super.gridLineWidth,
  super.aspectRatio,
  super.textMargin,
  super.gridLineStrokeStyle,
  super.labelFillStyle,
  super.labelFontStyle,
  super.captionBgColor,
  super.captionFgColor,
  super.captionFontFamily,
}) : labels = labels ?? {} {
  baseInnerHtml = '''
  <div id="$id" class="$css" style="aspect-ratio: $aspectRatio;position: relative;overflow-x: auto;width: 100%;">
      <svg id="$id-svg" xmlns="http://www.w3.org/2000/svg" class="$css-svg" width="100%" height="100%" style="display: block;">
          <g id="$id-svg-grid"></g>
          <g id="$id-svg-label"></g>
          <g id="$id-svg-points"></g>
      </svg>
  </div>
  ''';
}