PieChartComponent constructor

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

Implementation

PieChartComponent(super.parent, super.id, {
  this.maxLabelWidth = 50,
  this.pointIntervalRadiusWidth = 20,
  String css = 'pie',
  super.gridLineWidth,
  super.aspectRatio,
  super.textMargin,
  super.gridLineStrokeStyle,
  super.labelFillStyle = '#ffffff',
  super.labelFontStyle,
  super.captionBgColor,
  super.captionFgColor,
  super.captionFontFamily,
}) {
  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-points"></g>
          <g id="$id-svg-label"></g>
      </svg>
  </div>
  ''';
}