ModBarChart constructor

const ModBarChart({
  1. Key? key,
  2. required String title,
  3. TextStyle? titleStyle,
  4. TextAlign titleAlign = TextAlign.left,
  5. List<ChartActionButton> actions = const [],
  6. ModChartData? initialData,
  7. Future<ModChartData> fetchData(
    1. String period
    )?,
  8. dynamic onPeriodChange(
    1. String
    )?,
  9. dynamic onDataLoaded(
    1. String,
    2. List<ModChartDataItem>
    )?,
  10. dynamic onBarClick(
    1. ModChartDataItem
    )?,
  11. dynamic onError(
    1. String
    )?,
  12. BarChartOrientation orientation = BarChartOrientation.horizontal,
  13. double barHeight = 36,
  14. double barSpacing = 16,
  15. double barRadius = 8,
  16. int maxItemsBeforeScroll = 12,
  17. bool showTooltip = true,
  18. bool showValueLabels = true,
  19. bool enableZoom = true,
  20. double minZoom = 50.0,
  21. double maxZoom = 200.0,
  22. double chartContainerHeight = 400.0,
  23. double? barChartWidth,
  24. EdgeInsets? padding,
  25. Widget? footer,
  26. List<Color>? customColors,
  27. Color? backgroundColor,
  28. Color? containerBackgroundColor,
  29. IconData? zoomInIcon,
  30. IconData? zoomOutIcon,
  31. IconData? zoomResetIcon,
  32. ChartActionButtonTheme? actionButtonTheme,
  33. bool showLegendBorder = true,
  34. bool showLegendContainer = true,
  35. bool enableFooter = false,
  36. String? emptyStateTitle,
  37. IconData? emptyStateIcon,
  38. Color? lightSelectedBackgroundColor,
  39. Color? lightUnselectedBackgroundColor,
  40. Color? lightSelectedTextColor,
  41. Color? lightUnselectedTextColor,
  42. Color? lightBorderColor,
  43. Color? darkSelectedBackgroundColor,
  44. Color? darkUnselectedBackgroundColor,
  45. Color? darkSelectedTextColor,
  46. Color? darkUnselectedTextColor,
  47. Color? darkBorderColor,
})

Implementation

const ModBarChart({
  super.key,
  required this.title,
  this.titleStyle,
  this.titleAlign = TextAlign.left,
  this.actions = const [],
  this.initialData,
  this.fetchData,
  this.onPeriodChange,
  this.onDataLoaded,
  this.onBarClick,
  this.onError,
  this.orientation = BarChartOrientation.horizontal,
  this.barHeight = 36,
  this.barSpacing = 16,
  this.barRadius = 8,
  this.maxItemsBeforeScroll = 12,
  this.showTooltip = true,
  this.showValueLabels = true,
  this.enableZoom = true,
  this.minZoom = 50.0,
  this.maxZoom = 200.0,
  this.chartContainerHeight = 400.0,
  this.barChartWidth,
  this.padding,
  this.footer,
  this.customColors,
  // Background customization
  this.backgroundColor,
  this.containerBackgroundColor,
  // Zoom icons
  this.zoomInIcon,
  this.zoomOutIcon,
  this.zoomResetIcon,
  // Action button theme
  this.actionButtonTheme,
  // Legend customization
  this.showLegendBorder = true,
  this.showLegendContainer = true,
  // Footer options
  this.enableFooter = false,
  this.emptyStateTitle,
  this.emptyStateIcon,
  // Light theme colors
  this.lightSelectedBackgroundColor,
  this.lightUnselectedBackgroundColor,
  this.lightSelectedTextColor,
  this.lightUnselectedTextColor,
  this.lightBorderColor,
  // Dark theme colors
  this.darkSelectedBackgroundColor,
  this.darkUnselectedBackgroundColor,
  this.darkSelectedTextColor,
  this.darkUnselectedTextColor,
  this.darkBorderColor,
});