cristalyse 1.8.0 copy "cristalyse: ^1.8.0" to clipboard
cristalyse: ^1.8.0 copied to clipboard

Cristalyse is a high-performance data visualization library for Dart/Flutter that implements grammar of graphics principles with native rendering capabilities.

1.8.0 - 2025-10-01 #

🎯 Major Feature: Intelligent Axis Bounds & Labeling

Authored by @davidlrichmond - Thank you for this exceptional contribution!

  • Wilkinson Extended Algorithm: Industry-standard tick labeling for "nice" round numbers
    • Based on IEEE paper by Talbot, Lin, and Hanrahan (2010)
    • Optimizes simplicity, coverage, density, and legibility
    • Generates clean axis labels like 0, 5, 10, 50, 100 instead of arbitrary decimals
    • Smart pruning for performance optimization
  • Geometry-Aware Bounds: Different chart types automatically use appropriate scale defaults
    • Zero Baseline: Bar and area charts start from zero for quantity comparison
    • Data-Driven: Line and scatter charts use tight bounds for trend analysis
    • Precedence Logic: Explicit limits β†’ Geometry behavior β†’ Fallback defaults
  • Unified Scale Architecture: Cleaner, more maintainable scale system
    • New setBounds() API across all scale types
    • Added normalize() and scaleToRange() helpers
    • Size and gradient scales now properly extend Scale base class
    • Removed duplicate bounds logic from painters

✨ New API Capabilities

  • Bubble Chart Size Limits: New limits parameter for bubble geometry
    chart.geomBubble(
      minSize: 8.0,           // Visual: minimum bubble radius in pixels
      maxSize: 25.0,          // Visual: maximum bubble radius in pixels
      limits: (1000, 50000),  // Scale domain: $1K β†’ 8px, $50K β†’ 25px
      alpha: 0.8,
    )
    
  • Scale Limits as Tuples: Cleaner API with (min, max) tuples
    • scaleYContinuous(min: 0, max: 100) still works (backward compatible)
    • Internally converted to limits: (0, 100) tuple
    • Partial limits supported: (0, null) or (null, 100)

πŸ“ˆ User-Visible Improvements

  • Prettier Axis Labels: Ticks now show round numbers optimized for readability
    • Before: 0.47, 5.23, 10.88, 15.91, 21.07
    • After: 0, 5, 10, 15, 20
  • Better Default Bounds: Charts automatically use appropriate scale behavior
    • Bar charts properly start at zero baseline
    • Line charts focus on data range with minimal padding
    • Consistent behavior across chart types
  • Smarter Tick Density: Optimal ~60 pixels per label for readability
    • Prevents label overlap on small screens
    • Maximizes information on large displays

πŸ§ͺ Comprehensive Testing

  • New Test Files (803 lines of tests added):
    • axis_bounds_test.dart: Bounds calculation with all behaviors
    • wilkinson_labeling_test.dart: Algorithm validation with real-world scenarios
    • bounds_integration_test.dart: End-to-end integration tests
  • All 263 Tests Passing: No regressions, fully backward compatible

πŸ“š Documentation Updates

  • Enhanced Scale Documentation (scales.mdx):
    • Comprehensive limits behavior explanation
    • Data filtering vs. visual range clarification
    • Practical examples for all use cases
  • Bubble Chart Sizing Guide (bubble-charts.mdx):
    • Advanced bubble sizing with limits parameter
    • Outlier behavior explanation
    • Visual vs. domain scale distinction

πŸ”§ Technical Implementation

  • New Core Utilities:
    • wilkinson_labeling.dart (263 lines): IEEE-standard algorithm
    • bounds_calculator.dart (230 lines): Geometry-aware bounds
  • Refactored Scale System:
    • Unified setBounds() API
    • Centralized bounds logic (no duplication)
    • Cleaner abstractions and inheritance

πŸ› Bug Fixes

  • Fixed Hero tag conflict with multiple FloatingActionButtons in example app
  • Removed unused dart:math import from chart_widget.dart
  • Cleaned up duplicate bounds calculation logic across widgets

⚑ Performance & Compatibility

  • Zero Breaking Changes: Fully backward compatible
  • Negligible Performance Impact: Ticks computed once and cached
  • Production Ready: Well-tested, documented, and reviewed

This release brings professional, publication-quality axis rendering to Cristalyse charts! πŸ“Šβœ¨


1.7.0 - 2025-09-30 #

πŸ“Š Major Feature: Progress Bar Charts

  • Comprehensive Progress Bar Support: Full implementation of progress bars with multiple orientations and advanced styles
    • Horizontal Progress Bars: Left-to-right progress visualization
    • Vertical Progress Bars: Bottom-to-top progress display
    • Circular Progress Bars: Ring-style progress indicators with configurable angles
  • Advanced Style Options: Professional progress bar variations for complex use cases
    • Stacked Progress: Multi-segment progress bars showing completion by category
    • Grouped Progress: Side-by-side progress bars for category comparison
    • Gauge Style: Semi-circular gauge-style indicators (requires gaugeRadius parameter)
    • Concentric Circles: Nested circular progress rings for multi-metric displays
  • Grammar of Graphics Integration: New .mappingProgress() and .geomProgress() API methods
  • Robust Input Validation: Comprehensive validation for all progress bar parameters
    • Prevents division by zero errors
    • Handles invalid data gracefully
    • Proper null safety throughout
  • Theme-Responsive Design: Progress bars automatically adapt to theme colors
    • Full dark mode support
    • Custom color palette integration
    • Gradient support (experimental)

πŸš€ New API Capabilities

  • Progress Data Mapping: .mappingProgress(category: 'task', value: 'completion', group: 'team')
  • Flexible Orientation Control: orientation: ProgressOrientation.horizontal|vertical|circular
  • Advanced Styling: style: ProgressStyle.standard|stacked|grouped|gauge|concentric
  • Customizable Appearance:
    • barThickness: Progress bar height/width
    • cornerRadius: Rounded corners for modern look
    • trackColor: Background track color
    • gaugeRadius: Required for gauge-style progress bars
    • startAngle / endAngle: Control circular progress arc range

πŸ“– Examples Added

// Basic Horizontal Progress Bar
CristalyseChart()
  .data([{'task': 'Design', 'completion': 75.0}])
  .mappingProgress(category: 'task', value: 'completion')
  .geomProgress(
    orientation: ProgressOrientation.horizontal,
    barThickness: 20.0,
    cornerRadius: 10.0,
  )
  .build();

// Stacked Progress Bar (Multiple Segments)
CristalyseChart()
  .data([
    {'project': 'App', 'stage': 'Design', 'progress': 30.0},
    {'project': 'App', 'stage': 'Development', 'progress': 50.0},
    {'project': 'App', 'stage': 'Testing', 'progress': 20.0},
  ])
  .mappingProgress(category: 'project', value: 'progress', group: 'stage')
  .geomProgress(
    style: ProgressStyle.stacked,
    orientation: ProgressOrientation.horizontal,
  )
  .build();

// Circular Progress with Gauge Style
CristalyseChart()
  .data([{'metric': 'CPU', 'usage': 68.0}])
  .mappingProgress(category: 'metric', value: 'usage')
  .geomProgress(
    style: ProgressStyle.gauge,
    orientation: ProgressOrientation.circular,
    gaugeRadius: 120.0,  // Required for gauge style
    startAngle: -135.0,
    endAngle: 135.0,
  )
  .build();

// Concentric Progress Circles (Multiple Metrics)
CristalyseChart()
  .data([
    {'metric': 'Sales', 'achievement': 85.0},
    {'metric': 'Quality', 'achievement': 92.0},
    {'metric': 'Efficiency', 'achievement': 78.0},
  ])
  .mappingProgress(category: 'metric', value: 'achievement')
  .geomProgress(
    style: ProgressStyle.concentric,
    orientation: ProgressOrientation.circular,
  )
  .build();

🎨 Visual Enhancements

  • Smart Label Positioning: Automatic label placement based on orientation and space
  • Smooth Animations: Progressive filling animations with configurable timing
  • Professional Styling: Clean, modern appearance with rounded corners and proper spacing
  • Color Consistency: Theme-aware colors that adapt to light/dark mode
  • Responsive Layout: Dynamic sizing based on chart container dimensions

πŸ§ͺ Quality Assurance

  • Comprehensive Input Validation: All parameters validated for safety
    • Division by zero prevention in circular layout calculations
    • Invalid data handling (negative values, NaN, infinity)
    • Proper bounds checking for angles and dimensions
  • Edge Case Testing: Robust handling of edge cases
    • Empty datasets
    • Single vs multiple categories
    • Overlapping progress segments
  • Cross-Platform Compatibility: Verified on iOS, Android, Web, and Desktop
  • Performance Optimized: Efficient rendering with no memory leaks

πŸ”§ Technical Implementation

  • ProgressGeometry Class: New geometry type for progress visualization
  • Route-Based Navigation: Comprehensive GoRouter implementation for example app
  • Advanced Layout System: Intelligent positioning for grouped and concentric styles
  • Validation Pipeline: Multi-layer validation ensures data integrity
  • Theme Integration: Full support for custom themes and color palettes

πŸ“š Documentation Improvements

  • Enhanced SEO: Comprehensive metadata, Open Graph, and Twitter Card tags
  • Custom 404 Page: Branded error page with helpful navigation
  • Contextual Menu: Improved copy for better user engagement
  • Updates Page: Subscribable RSS feed with changelog components
  • Broken Links Fixed: All internal links validated and corrected
  • Navigation Polish: Better organization and user experience

🎯 Use Cases Unlocked

  • Project Management: Task completion tracking with stacked progress bars
  • Performance Dashboards: KPI achievement visualization with gauges
  • Resource Monitoring: System metrics with concentric circular indicators
  • Goal Tracking: Progress toward targets with horizontal/vertical bars
  • Analytics Dashboards: Multi-dimensional progress visualization
  • Mobile Apps: Compact progress indicators with responsive layouts

⚑ Performance & Compatibility

  • Zero Breaking Changes: Fully backward compatible with all existing code
  • Optional Enhancement: Progress bars are purely additive functionality
  • Memory Efficient: Optimized rendering pipeline with proper cleanup
  • 60fps Animations: Smooth progress transitions across all styles
  • Cross-Platform: Consistent rendering on all Flutter-supported platforms

This release brings professional progress visualization to Cristalyse with comprehensive style options, robust validation, and significant documentation improvements. Build stunning progress dashboards with ease! πŸ“Šβœ¨


1.6.1 - 2025-09-08 #

πŸ€– MCP Server Integration

  • Cristalyse MCP Server: New documentation guide for connecting Cristalyse docs to AI coding assistants
    • Setup instructions for Cursor, Windsurf, and Warp: Add "cristalyse_docs": {"url": "https://docs.cristalyse.com/mcp"} to MCP settings
    • Setup for Claude Code CLI: Run claude mcp add --transport http cristalyse_docs https://docs.cristalyse.com/mcp
    • Setup for Claude Web: Add custom connector with URL https://docs.cristalyse.com/mcp
  • AI-Assisted Development: Enable your coding assistant to access complete Cristalyse documentation, examples, and best practices directly in your IDE
  • Comprehensive Guide: Step-by-step setup instructions with troubleshooting for all major AI coding platforms

Enhance your development workflow by connecting Cristalyse documentation directly to your AI coding assistant! #

1.6.0 - 2025-09-07 #

🌈 Major Feature: Gradient Color Support (Experimental)

  • Category-Specific Gradients: New categoryGradients property in ChartTheme for stunning gradient effects
    • Support for Linear, Radial, and Sweep gradients with full Flutter Gradient API compatibility
    • Type-safe Map<String, Gradient> implementation for reliability
  • Advanced Alpha Blending: Gradients automatically respect animation alpha and geometry transparency
    • Custom alpha blending algorithm that preserves gradient color relationships
    • Smooth opacity transitions during chart animations
  • Multiple Chart Type Support: Gradient rendering implemented for:
    • βœ… Bar Charts - Full gradient support with shader-based rendering
    • βœ… Point/Scatter Charts - Gradient fills for data points with proper shader regions
    • πŸ”„ Line/Area/Bubble charts - Solid colors (gradient support planned for future releases)
  • Not advisable for Production use as of v1.6.0.

✨ New API Capabilities

  • Intuitive Gradient Definition: Simple category-based gradient mapping
CristalyseChart()
  .data(data)
  .mapping(x: 'quarter', y: 'revenue', color: 'quarter')
  .geomBar()
  .customPalette(categoryGradients: {
    'Q1': LinearGradient(colors: [Colors.blue, Colors.cyan]),
    'Q2': RadialGradient(colors: [Colors.red, Colors.orange]),
    'Q3': SweepGradient(colors: [Colors.purple, Colors.pink]),
  })
  .build()
  • Automatic Color Scale Enhancement: ColorScale intelligently prioritizes gradients over solid colors
  • Seamless Theme Integration: Gradients work with existing themes, custom palettes, and color mapping

πŸ’Ž Gradient Types & Features

  • Linear Gradients: Smooth directional color transitions with customizable start/end points
  • Radial Gradients: Circular gradients expanding from center with configurable radius and focal points
  • Sweep Gradients: Angular gradients rotating around center with customizable angle ranges
  • Advanced Properties: Full support for color stops, alignment, transforms, and tile modes
  • Performance Optimized: Efficient shader caching and GPU-accelerated rendering

🎯 Professional Use Cases Unlocked

  • Modern Data Visualization: Eye-catching gradient effects for presentations and dashboards
  • Brand-Aligned Charts: Custom gradient themes matching corporate visual identity
  • Enhanced UX: Visual depth and dimension through gradient shading
  • Premium Analytics: Professional-grade chart aesthetics for enterprise applications
  • Mobile-First Design: GPU-optimized gradients for smooth mobile performance

πŸ“– Comprehensive Examples Added

// Quarterly Revenue with Mixed Gradient Types
CristalyseChart()
  .data(quarterlyData)
  .mapping(x: 'quarter', y: 'revenue', color: 'quarter')
  .geomBar(width: 0.8, borderRadius: BorderRadius.circular(8))
  .customPalette(categoryGradients: {
    'Q1': LinearGradient(
      colors: [Color(0xFF4F46E5), Color(0xFF7C3AED)],
      begin: Alignment.bottomCenter,
      end: Alignment.topCenter,
    ),
    'Q3': RadialGradient(
      colors: [Color(0xFFDC2626), Color(0xFFEF4444)],
      center: Alignment.center,
      radius: 0.8,
    ),
    'Q4': SweepGradient(
      colors: [Color(0xFFEAB308), Color(0xFFF59E0B), Color(0xFFEAB308)],
      center: Alignment.center,
    ),
  })
  .build();

// Regional Sales with Product-Specific Gradients
CristalyseChart()
  .data(salesData)
  .mapping(x: 'region', y: 'sales', color: 'product')
  .geomBar(style: BarStyle.grouped)
  .customPalette(categoryGradients: {
    'Premium': LinearGradient(
      colors: [Color(0xFF8B5CF6), Color(0xFFA78BFA)],
      stops: [0.0, 1.0],
    ),
    'Standard': LinearGradient(
      colors: [Color(0xFF3B82F6), Color(0xFF60A5FA)],
    ),
  })
  .legend()
  .build();

πŸ”§ Technical Implementation

  • Advanced Alpha Blending: Custom algorithm for gradient alpha application
    • _applyAlphaToGradient() method supporting all Flutter gradient types
    • Maintains color relationships while applying animation/geometry alpha
  • Enhanced ColorScale: Intelligent gradient detection and prioritization
    • Gradients checked before solid colors in scale() method
    • Type-safe gradient maps with runtime validation
  • Shader-Based Rendering: GPU-accelerated gradient rendering for optimal performance
    • Proper shader region calculation for bars and points
    • Efficient paint object reuse and memory management

πŸ› Fixes & Improvements

  • API Deprecation Fix: Replaced deprecated color.alpha with proper (color.a * 255.0).round() & 0xff
    • Ensures future compatibility with Flutter updates
    • Maintains consistent alpha calculation across all color operations
  • Theme Application Order: Fixed .theme() and .customPalette() ordering issue
    • .theme() must be called before .customPalette() to preserve gradients
    • Enhanced documentation with usage guidelines

πŸ§ͺ Quality Assurance

  • Comprehensive Testing: New gradient-specific tests added to existing test suite
    • Gradient theme application and inheritance testing
    • Alpha blending algorithm validation
    • ColorScale gradient prioritization tests
  • Static Analysis Clean: Zero Flutter analysis issues or warnings
  • Example Applications: Two complete example apps demonstrating gradient usage
    • gradient_bar_example.dart - Simple gradient bar charts
    • advanced_gradient_example.dart - Multi-chart gradient showcase

⚑ Performance & Compatibility

  • Zero Breaking Changes: Completely backward compatible - all existing code works unchanged
  • Optional Enhancement: Gradient functionality is purely additive and opt-in
  • GPU Optimized: Leverages Flutter's shader system for hardware-accelerated rendering
  • Memory Efficient: Gradient objects reused and cached for optimal memory usage
  • Cross-Platform: Consistent gradient rendering across iOS, Android, Web, and Desktop

πŸ“š Enhanced Documentation

  • Bar Charts Guide: Comprehensive gradient section in /doc/charts/bar-charts.mdx
    • Multiple gradient type examples with code snippets
    • Best practices and usage guidelines
  • Custom Themes Guide: New gradient themes section in /doc/advanced/custom-themes.mdx
    • Gradient creation and application patterns
    • Chart type compatibility matrix
  • API Documentation: Enhanced docstrings with gradient examples throughout codebase

πŸ“¦ Implementation Files

  • Enhanced Core: Updated lib/src/widgets/animated_chart_painter.dart with gradient rendering
  • ColorScale Enhancement: Improved lib/src/core/scale.dart with gradient prioritization
  • Theme Extension: Enhanced lib/src/themes/chart_theme.dart with categoryGradients property
  • Utility Functions: New alpha blending helpers in painter implementation
  • Example Applications: Complete gradient demonstration apps in example directory

This release brings stunning gradient capabilities to cristalyse with professional-grade visual effects, full animation support, and zero breaking changes. Transform your charts with beautiful gradients while maintaining all existing functionality! 🌈✨


1.5.0 - 2025-09-05 #

πŸ”₯ Major Feature: Built-In Legend Support

  • Simple Legend API: New .legend() method with smart defaults and intuitive positioning
    • Zero-config usage: just add .legend() and it works automatically
    • Auto-detects categories from color mapping column
  • Smart Positioning System: 8 flexible positioning options with automatic orientation
    • Corner positions: topLeft, topRight, bottomLeft, bottomRight
    • Edge positions: top, bottom, left, right
  • Intelligent Symbol Generation: Automatically matches chart geometry types
    • Bar charts β†’ Square symbols
    • Line/Area charts β†’ Line symbols
    • Scatter/Bubble charts β†’ Circle symbols
  • Full Dark Mode Support: Legend text automatically adapts to theme colors
    • Uses theme.axisColor for perfect contrast in light and dark themes
    • Custom text styles preserve theme colors unless explicitly overridden

πŸš€ New API Capabilities

  • Minimal Usage: chart.legend() - Works with smart defaults (position: topRight)
  • Quick Positioning: chart.legend(position: LegendPosition.bottom)
  • Custom Styling: Full customization support for advanced use cases
    • backgroundColor, textStyle, symbolSize, itemSpacing, borderRadius
  • Theme Integration: Seamless integration with all existing themes and custom palettes
  • Auto-Layout: Dynamic chart resizing to accommodate legend placement

πŸ’Ό Professional Use Cases Unlocked

  • Dashboard Analytics: Clear category identification for multi-series data
  • Executive Reports: Professional legends for presentation-ready charts
  • Data Exploration: Quick visual reference for complex datasets
  • Mobile Analytics: Compact legends optimized for different screen orientations
  • Brand Consistency: Legends automatically inherit corporate theme colors
  • Accessibility: High contrast legend text for better readability

πŸ“– Examples Added

// Basic Usage - Zero Configuration
CristalyseChart()
  .data(salesData)
  .mapping(x: 'quarter', y: 'revenue', color: 'product')
  .geomBar(style: BarStyle.grouped)
  .legend() // That's it! Auto-detects products and positions at topRight
  .build();

// Positioned Legend
CristalyseChart()
  .data(timeSeriesData)
  .mapping(x: 'date', y: 'value', color: 'metric')
  .geomLine(strokeWidth: 2.5)
  .legend(position: LegendPosition.bottom)
  .build();

// Custom Styled Legend
CristalyseChart()
  .data(performanceData)
  .mapping(x: 'month', y: 'sales', color: 'region')
  .geomArea(alpha: 0.7)
  .theme(ChartTheme.darkTheme())
  .legend(
    position: LegendPosition.right,
    backgroundColor: Colors.black.withValues(alpha: 0.8),
    symbolSize: 14.0,
    itemSpacing: 12.0,
  )
  .build();

🎯 Key Features

  • Zero Breaking Changes: Completely backward compatible - all existing code works unchanged
  • Optional Enhancement: Legend functionality is purely additive and opt-in
  • Smart Defaults: Intelligent positioning and styling based on chart type and data
  • Theme Responsive: Automatically adapts to light/dark themes and custom color palettes
  • Mobile Optimized: Responsive legend layout for different screen sizes and orientations
  • Performance Efficient: Minimal overhead with lazy legend generation

πŸŒ™ Dark Mode Excellence

  • Automatic Text Color: Legend text uses theme.axisColor for perfect contrast
  • Theme Inheritance: Custom text styles merge with theme colors intelligently
  • Universal Compatibility: Works flawlessly with all built-in themes:
    • ChartTheme.defaultTheme() - Dark text on light background
    • ChartTheme.darkTheme() - Light text on dark background
    • ChartTheme.solarizedLightTheme() / ChartTheme.solarizedDarkTheme()

πŸ”§ Technical Implementation

  • Modular Architecture: Clean separation with LegendConfig, LegendWidget, and LegendGenerator
  • Fluent API Design: Integrates seamlessly with existing chart builder pattern
  • Layout Intelligence: Dynamic chart area calculation based on legend size and position
  • Symbol Detection: Advanced geometry analysis for appropriate symbol selection
  • Memory Efficient: Legend items generated on-demand with minimal allocation
  • Export Compatible: Legends included automatically in SVG exports

πŸ§ͺ Quality Assurance

  • Comprehensive Testing: 10 new tests covering all legend functionality
    • Widget rendering tests for all positions and configurations
    • Symbol generation tests for different geometry types
    • Dark theme adaptation validation
    • Custom styling and text color inheritance
  • Full Test Suite: All 155 tests pass (154 existing + 1 new dark theme test)
  • Static Analysis: Zero linting issues or warnings
  • Production Ready: Extensively tested with real-world data and use cases

⚑ Performance & Compatibility

  • Lazy Generation: Legend items created only when needed
  • Minimal Overhead: <50ms additional rendering time for typical legends
  • Memory Efficient: Reuses existing color palette and theme data
  • Responsive Layout: Smooth resizing and repositioning without flickering
  • Export Integration: SVG exports automatically include positioned legends

πŸ“¦ Implementation Files

  • Core Logic: lib/src/core/legend.dart - Configuration classes and enums
  • Rendering: lib/src/widgets/legend_widget.dart - Legend widget implementation
  • API Integration: Enhanced CristalyseChart class with .legend() method
  • Layout System: Updated AnimatedCristalyseChartWidget with positioning logic
  • Examples: example/lib/graphs/legend_example.dart - Complete usage demonstrations
  • Testing: test/legend_test.dart - Comprehensive test coverage

This release brings professional legend capabilities to cristalyse with an incredibly simple API, full dark mode support, and zero breaking changes. Add .legend() to any chart with color mapping and get beautiful, automatically-positioned legends instantly! πŸ“Šβœ¨


1.4.0 - 2025-09-03 #

🎨 Major Feature: Custom Category Colors

  • Category-Specific Color Mapping: New customPalette() method for assigning specific colors to chart categories
    • Consistent visual identity across charts and dashboards
  • Smart Fallback System: Unmapped categories automatically use theme's default color palette
  • Full Theme Integration: Works seamlessly with all existing themes and theming capabilities

πŸš€ New API Capabilities

  • Fluent Custom Palette API: CristalyseChart().customPalette(categoryColors: {...})
  • Enhanced Theme Extensions: Moved ChartThemeExtension from example to core library
    • ChartTheme.copyWith() - Easy theme customization
  • Comprehensive Documentation: Full docstrings with examples and best practices
  • Robust Error Handling: Clear error messages guide users to correct API usage

πŸ’Ό Professional Use Cases Unlocked

  • Corporate Dashboards: Consistent brand colors across all charts
  • Multi-Platform Analytics: iOS blue, Android green, Web orange
  • Status Monitoring: Red for errors, yellow for warnings, green for success
  • Department Analytics: Finance blue, Marketing purple, Sales orange
  • Product Comparisons: Distinct brand colors for competitive analysis
  • Regional Dashboards: Geographic color coding for global analytics

πŸ“– Examples Added

// Platform Performance with Brand Colors
final platformColors = {
  'iOS': const Color(0xFF007ACC),      // Apple Blue
  'Android': const Color(0xFF3DDC84),  // Android Green
  'Web': const Color(0xFFFF6B35),      // Web Orange
};

CristalyseChart()
  .data(multiSeriesData)
  .mapping(x: 'month', y: 'users', color: 'platform')
  .geomLine(strokeWidth: 2.5)
  .geomPoint(size: 4.0)
  .theme(ChartTheme.defaultTheme())
  .customPalette(categoryColors: platformColors)
  .build();

// Status Dashboard with Semantic Colors  
final statusColors = {
  'Success': Colors.green,
  'Warning': Colors.orange,
  'Error': Colors.red,
  'Info': Colors.blue,
};

CristalyseChart()
  .data(statusData)
  .mapping(x: 'time', y: 'count', color: 'status')
  .geomBar()
  .customPalette(categoryColors: statusColors)
  .build();

🎯 Key Features

  • Zero Breaking Changes: Completely backward compatible - all existing code works unchanged
  • Optional Enhancement: New functionality is purely additive
  • Smart Validation: Prevents empty color maps and missing color mappings
  • Fallback Safety: Categories without custom colors use theme defaults
  • Production Ready: Comprehensive error handling and edge case management

πŸ”§ Technical Implementation

  • Fluent API Design: Integrates seamlessly with existing chart builder pattern
  • Theme System Integration: Extends existing theming without breaking changes
  • Data-Driven Mapping: Analyzes chart data to create optimal color assignments
  • Memory Efficient: Creates new theme instances without unnecessary overhead
  • Type Safe: Full compile-time checking with required parameters

πŸ§ͺ Quality Assurance

  • Full Test Coverage: All 145 existing tests pass without modification
  • Example Integration: Updated multi-series example demonstrates new capability
  • Build Validation: Web build succeeds with new features integrated
  • Documentation Complete: Comprehensive docstrings with examples
  • Error Handling: Clear error messages for developer guidance

⚑ Performance & Compatibility

  • No Performance Impact: Color mapping happens once during theme creation
  • Backward Compatible: Zero changes to existing API or behavior
  • Memory Efficient: Minimal overhead for color palette generation
  • Theme Switching: Custom colors persist through theme changes
  • Production Tested: Ready for immediate use in production applications

This release empowers developers to create visually consistent, brand-aligned charts with category-specific colors while maintaining full backward compatibility and zero breaking changes. 🎨


1.3.1 - 2025-09-03 #

πŸ› Bug Fixes

  • Multi-Series Line Chart Rendering: Fixed critical rendering issues with multi-series line charts
    • Resolved missing data points on multi-series line charts
    • Fixed overlapping series lines - each series now maintains distinct visual separation
    • Ensured all data points are visible and properly positioned across multiple series

πŸ“– Documentation

  • Multi-Series Example: Added comprehensive multi-series line chart example demonstrating the fixes
    • Professional business analytics use case with quarterly revenue data
    • Clean layout with focused chart presentation

This patch release resolves critical multi-series line chart rendering issues, ensuring all data points are visible and series lines are properly separated. πŸ”§


1.3.0 - 2025-09-02 #

πŸ”₯ Major Feature: Comprehensive Bubble Chart Support

  • Full Bubble Chart Implementation: Complete bubble chart support with three-dimensional data visualization (X, Y, Size)
  • Advanced Size Scaling: Sophisticated size mapping with SizeScale class for proportional bubble sizing
  • Interactive Tooltips: Rich hover tooltips with company details, metrics, and category-based styling
  • Grammar of Graphics Integration: New geomBubble() API method following established patterns
  • Theme Integration: Full integration with theme system - bubble colors dynamically change with theme/palette selection
  • Responsive Layout: Dynamic chart height allocation with default bubble-chart height of 500 px (configurable) to prevent cutoff
  • Professional Styling: Category-based color mapping, legend system, and visual enhancements

πŸš€ New API Capabilities

  • Three-Dimensional Mapping: mapping(x: 'revenue', y: 'customers', size: 'marketShare', color: 'category')
  • Bubble Geometry Configuration: geomBubble(minSize: 5.0, maxSize: 25.0, alpha: 0.75, borderWidth: 2.0)
  • Size Scale Control: Proportional bubble sizing based on data values with configurable min/max constraints
  • Interactive Features: Hover tooltips with rich content and custom styling
  • Theme Responsiveness: Bubble colors automatically adapt to selected themes and color palettes
  • Legend Integration: Automatic legend generation with category color mapping

πŸ’Ό Professional Use Cases Unlocked

  • Market Analysis: Company performance by revenue, customer base, and market share
  • Portfolio Visualization: Investment performance with risk, return, and position size
  • Sales Analytics: Deal analysis by value, probability, and account size
  • Product Metrics: Feature adoption by usage, impact, and effort
  • Competitive Analysis: Market positioning with multiple performance dimensions
  • Scientific Data: Research data with three continuous variables and categorical grouping

πŸ“– Examples Added

// Market Performance Analysis
CristalyseChart()
  .data(companyData)
  .mapping(
    x: 'revenue',
    y: 'customers', 
    size: 'marketShare',
    color: 'category',
  )
  .geomBubble(
    minSize: 8.0,           // Minimum bubble radius
    maxSize: 25.0,          // Maximum bubble radius  
    alpha: 0.75,            // Transparency for overlapping
    borderWidth: 2.0,       // White border for contrast
    borderColor: Colors.white,
    shape: PointShape.circle,
  )
  .scaleXContinuous(
    labels: (value) => '\$${value.toStringAsFixed(0)}M',
  )
  .scaleYContinuous(
    labels: (value) => '${value.toStringAsFixed(0)}K',
  )
  .interaction(
    tooltip: TooltipConfig(
      builder: (point) => CustomBusinessTooltip(point: point),
    ),
  )
  .animate(
    duration: Duration(milliseconds: 1000),
    curve: Curves.easeOutCubic,
  )
  .build();

// Portfolio Analysis Bubble Chart
CristalyseChart()
  .data(portfolioData)
  .mapping(x: 'risk', y: 'return', size: 'position_size', color: 'sector')
  .geomBubble(
    minSize: 5.0,
    maxSize: 30.0,
    alpha: 0.8,
  )
  .theme(ChartTheme.darkTheme())
  .build();

🎨 Visual Enhancements

  • Proportional Sizing: Bubble areas correctly represent data values with linear size scaling
  • Color Consistency: Category colors automatically sync with theme selection
  • Professional Layout: Enhanced chart container height prevents bubble cutoff
  • Legend Visibility: Fixed legend text color for optimal contrast on all backgrounds
  • Interactive Feedback: Rich tooltips with gradient styling and metric breakdowns
  • Smooth Animations: Progressive bubble appearance with elastic curve timing

πŸ§ͺ Quality Assurance

  • Comprehensive Test Coverage: Full test suite covering bubble size scaling, proportional relationships, and edge cases
  • Size Scale Validation: Tests ensure correct linear mapping from data values to pixel sizes
  • Integration Testing: Verified proper theme integration and color palette responsiveness
  • Visual Regression Testing: Confirmed no bubble cutoff with dynamic height allocation
  • Performance Testing: Validated smooth animations with 12+ bubbles at 60fps

πŸ”§ Technical Implementation

  • SizeScale Class: Linear mapping from data domain to pixel radius range with proper bounds checking
  • Dynamic Height System: Chart containers automatically adjust height based on chart type
  • Theme Integration: Category colors mapped from theme.colorPalette for full theming support
  • Tooltip System: Rich interactive tooltips with company information and styled metrics
  • Animation Pipeline: Smooth bubble scaling and appearance with configurable curves
  • Memory Optimization: Efficient rendering with proper size scale caching

⚑ Performance Metrics

  • Rendering Speed: 60fps animations with 12+ bubbles and complex tooltips
  • Size Calculation: <2ms for bubble size scaling with linear interpolation
  • Theme Switching: Instant color updates across bubbles and legend
  • Memory Usage: <3MB additional overhead for bubble chart functionality
  • Animation Performance: Smooth scaling transitions with hardware acceleration

🎯 Chart Configuration Options

  • Size Range Control: Configure minimum and maximum bubble sizes for optimal visual impact
  • Transparency Settings: Alpha blending for overlapping bubbles with customizable opacity
  • Border Styling: Configurable border width and color for bubble separation
  • Label Options: Show/hide labels with custom positioning and formatting
  • Theme Responsiveness: Automatic color adaptation to selected themes and palettes
  • Interactive Features: Hover detection with rich tooltip content and styling

This release brings professional three-dimensional data visualization to Cristalyse, enabling complex business analysis with beautiful, interactive bubble charts suitable for executive dashboards and analytical applications. 🫧


1.2.4 - 2025-08-30 #

Bug Fixes

  • Fix heatmap cell ordering to match axis labels using sortHeatMapValues helper
  • Fix shouldRepaint method to compare all relevant properties for proper UI updates
  • Fix horizontal grouped bar charts crash when coordFlipped=true
  • Fix heatmap alpha calculation overflow bugs with proper clamping

Documentation

  • Add comprehensive docstrings for AnimatedChartPainter and core utilities

Code Quality

  • Add chartPainterAnimated utility function to reduce code duplication
  • Code formatting improvements

1.2.3 - 2025-08-24 #

  • Updated correct references in documentation

1.2.2 - 2025-08-24 #

🎨 Visual Improvements

  • Enhanced HeatMap Text Readability: Improved text visibility for low-value cells in heat maps
    • Values < 15%: Now display with black text for guaranteed readability
    • Values β‰₯ 15%: Continue using smart brightness-based contrast (white on dark, black on light)
    • Zero Breaking Changes: Fully backward compatible - existing code works unchanged
    • Quality Enhancement: Small percentage values are now consistently readable across all color backgrounds

πŸ”§ Technical Details

  • Refined text color logic in HeatMapGeometry rendering for optimal contrast
  • Maintains all existing API compatibility and default behaviors
  • No performance impact - purely visual enhancement

This patch release improves the user experience for heat map visualizations with better text contrast for low-value cells while maintaining 100% backward compatibility. ✨


1.2.1 - 2025-08-24 #

πŸ“¦ Dependencies

  • Updated project dependencies to the latest compatible versions for improved stability and security.

πŸ“– Documentation

  • Added a pie chart screenshot to the examples/documentation to better showcase the chart appearance.

1.2.0 - 2025-08-18 #

πŸ”₯ Major Feature: Heat Map Chart Support

  • Comprehensive Heat Map Implementation: Full heat map chart support with configurable cell dimensions, spacing, and border radius
  • Advanced Color Mapping: Support for custom color gradients with smooth interpolation or discrete color steps
  • Smart Value Visualization: Configurable min/max value ranges with automatic normalization and enhanced default color gradients
  • Flexible Grid Layout: Automatic grid calculation from data with customizable cell aspect ratios and spacing
  • Rich Animation System: Wave-effect animations with staggered cell appearance and scaling transitions
  • Professional Styling: Value labels with automatic contrast detection, null value handling, and customizable text formatting
  • Grammar of Graphics Integration: New .mappingHeatMap() and .geomHeatMap() API methods following established patterns

πŸš€ New API Capabilities

  • Heat Map Data Mapping: mappingHeatMap(x: 'category', y: 'month', value: 'sales') for 2D data visualization
  • Flexible Color Control: Custom gradient support with colorGradient and interpolateColors properties
  • Cell Customization: Configurable cellSpacing, cellAspectRatio, and cellBorderRadius for professional appearance
  • Value Display Options: showValues with custom formatters and automatic text contrast adjustment
  • Null Value Handling: Dedicated nullValueColor for missing data visualization
  • Range Configuration: Optional minValue and maxValue for controlled color mapping

πŸ’Ό Professional Use Cases Unlocked

  • Business Analytics: Sales performance by region/time, KPI dashboards, correlation matrices
  • Data Science: Feature correlation visualization, confusion matrices, statistical heat maps
  • Performance Monitoring: System metrics by time/component, error rate tracking, capacity planning
  • Marketing Analytics: Campaign performance across channels/demographics, A/B testing results
  • Financial Analysis: Risk heat maps, portfolio correlation, trading volume visualization

πŸ“– Examples Added

// Business Performance Heat Map
CristalyseChart()
  .data(salesData)
  .mappingHeatMap(x: 'month', y: 'region', value: 'revenue')
  .geomHeatMap(
    cellSpacing: 2.0,
    cellBorderRadius: BorderRadius.circular(4),
    colorGradient: [Colors.red, Colors.yellow, Colors.green],
    interpolateColors: true,
    showValues: true,
    valueFormatter: (value) => NumberFormat.currency().format(value),
  )
  .build();

// System Monitoring Heat Map
CristalyseChart()
  .data(metricsData)
  .mappingHeatMap(x: 'hour', y: 'service', value: 'response_time')
  .geomHeatMap(
    minValue: 0,
    maxValue: 100,
    nullValueColor: Colors.grey.shade200,
    cellAspectRatio: 1.0,
    showValues: true,
    valueTextStyle: TextStyle(fontSize: 10, fontWeight: FontWeight.bold),
  )
  .animate(duration: Duration(milliseconds: 1500))
  .build();

// Correlation Matrix
CristalyseChart()
  .data(correlationData)
  .mappingHeatMap(x: 'variable1', y: 'variable2', value: 'correlation')
  .geomHeatMap(
    minValue: -1.0,
    maxValue: 1.0,
    colorGradient: [
      Colors.blue.shade800,   // Strong negative correlation
      Colors.white,           // No correlation
      Colors.red.shade800,    // Strong positive correlation
    ],
    interpolateColors: true,
    cellSpacing: 1.0,
  )
  .build();

🎨 Visual Enhancements

  • Enhanced Default Colors: Vibrant color gradients with improved visibility and minimum intensity thresholds
  • Smart Text Contrast: Automatic text color selection based on cell background brightness
  • Professional Animations: Smooth scaling effects with wave-pattern timing for visual impact
  • Flexible Layout: Responsive grid sizing with automatic spacing and aspect ratio maintenance
  • Clean Rendering: Precise cell positioning with sub-pixel accuracy and smooth borders

πŸ§ͺ Quality Assurance

  • Comprehensive Test Coverage: Full test suite covering all heat map scenarios including animations and edge cases
  • Edge Case Handling: Robust null value processing, empty data handling, and invalid range protection
  • Performance Optimization: Efficient rendering pipeline supporting large grids (100+ cells) at 60fps
  • Cross-Platform Compatibility: Verified on iOS, Android, Web, Windows, macOS, and Linux
  • Memory Management: Optimized color interpolation and animation systems with no memory leaks

πŸ”§ Technical Implementation

  • Efficient Grid Calculation: Smart X/Y value extraction with automatic sorting and deduplication
  • Advanced Color Interpolation: Smooth gradient transitions with configurable color steps
  • Wave Animation System: Staggered cell animations based on grid position for visual appeal
  • Value Normalization: Flexible range mapping with automatic min/max detection
  • Canvas Optimization: Direct canvas rendering with clipping and transformation support

⚑ Performance Metrics

  • Rendering Speed: 60fps animations with grids up to 20x20 cells
  • Memory Usage: <5MB additional overhead for large heat maps
  • Animation Performance: Smooth scaling and color transitions with hardware acceleration
  • Data Processing: <10ms for grid calculation and color mapping with 1000+ data points

🎯 Use Case Examples

  • E-commerce: Product sales by category/month heat maps for inventory planning
  • Healthcare: Patient symptoms by time for diagnostic pattern recognition
  • Education: Student performance across subjects/semesters for academic insights
  • Operations: Machine performance by hour/day for maintenance scheduling
  • Finance: Portfolio risk analysis with asset correlation visualization

This release brings professional heat map visualization to Cristalyse, enabling complex 2D data analysis with beautiful, animated presentations suitable for business dashboards and scientific applications. πŸ”₯


1.1.0 - 2025-08-05 #

🎯 Major Feature: Advanced Label Formatting System

  • Grammar of Graphics Label Control: Full callback-based label formatting system brings professional data visualization to Cristalyse
  • NumberFormat Integration: Seamless integration with Flutter's intl package for currency, percentages, compact notation, and locale-aware formatting
  • Smart Fallback Chain: Custom callback β†’ default formatting β†’ toString() ensures bulletproof label rendering
  • Zero Breaking Changes: All existing charts continue working unchanged while new functionality is opt-in

πŸš€ New API Capabilities

  • Scale-Level Formatting: LinearScale(labelFormatter: NumberFormat.currency().format) for axis labels
  • Chart-Level Integration: Direct formatter support in all chart geometries
  • Flexible Callback Pattern: Compatible with any String Function(num) signature
  • Factory Pattern Support: Create reusable formatter factories for consistent styling across charts

πŸ’Ό Professional Use Cases Unlocked

  • Financial Dashboards: Currency formatting, basis points, profit/loss indicators
  • Analytics Platforms: Compact notation (1.2K, 1.5M), percentage displays, duration formatting
  • Scientific Visualization: Scientific notation, custom units, precision control
  • International Applications: Locale-aware number formatting for global deployment

πŸ“– Examples Added

// Business Dashboard: Professional currency formatting
CristalyseChart()
  .data(revenueData)
  .mapping(x: 'quarter', y: 'revenue')
  .geomBar()
  .scaleYContinuous(labels: NumberFormat.simpleCurrency().format) // $1,234.56
  .build();

// Analytics: Compact notation for large numbers  
CristalyseChart()
  .data(userMetrics)
  .mapping(x: 'date', y: 'active_users')
  .geomLine()
  .scaleYContinuous(labels: NumberFormat.compact().format) // 1.2K, 1.5M
  .build();

// Custom Business Logic: Conditional formatting
CristalyseChart()
  .data(performanceData)
  .mapping(x: 'metric', y: 'value')
  .geomBar()  
  .scaleYContinuous(labels: (value) => value > 100 ? '${value.toInt()}%' : '${value}pts')
  .build();

πŸ§ͺ Quality Assurance

  • Comprehensive Test Coverage: 15+ test cases covering all formatting scenarios including NumberFormat integration
  • Documentation Accuracy: All code examples in documentation are tested and verified
  • Backwards Compatibility: 100% existing chart compatibility maintained
  • Edge Case Handling: Robust null safety and graceful fallbacks for invalid data

This release brings Cristalyse label formatting up to professional visualization library standards, enabling publication-ready charts with locale-aware formatting and business-grade customization. 🎯

πŸ™ Contributors

Feature authored by @davidlrichmond and reviewed by @rudi-q. Thank you for this excellent contribution that significantly enhances Cristalyse's professional visualization capabilities!

1.0.1 - 2025-07-31 #

Fixed #

  • Grouped Bar Chart Alignment: Fixed positioning of grouped bars on ordinal scales to center properly on tick marks instead of aligning to the left edge of category bands (thanks @davidlrichmond)
  • Updated _drawGroupedBars() to use bandCenter() method for accurate positioning
  • Affects charts with color mapping and scaleXOrdinal() configuration
  • Grouped bars now visually align with their corresponding axis tick marks for professional appearance

Technical #

  • Added comprehensive test coverage for OrdinalScale.bandCenter() method
  • Enhanced edge case handling for empty domains and single categories
  • Improved visual consistency between axis ticks and bar positioning

1.0.0 - 2025-07-10 #

  • πŸ₯§ Major Feature: Comprehensive Pie Chart and Donut Chart Support

    • Full pie chart implementation with smooth slice animations and staggered timing
    • Donut chart support with configurable inner radius for ring-style visualizations
    • Smart label positioning with percentage or value display options
    • Exploded slice functionality for emphasis and visual impact
    • Grammar of graphics integration with new .mappingPie() and .geomPie() API methods
    • Responsive radius sizing with automatic plot area detection and margin calculation
    • Professional stroke customization with configurable colors and widths
    • Theme system integration works seamlessly with all existing themes and color palettes
  • 🎨 Enhanced Visual Experience

    • Clean rendering pipeline - automatically hides axes and grids for pie charts
    • Optimized donut path construction - eliminates rendering artifacts and ensures smooth ring geometry
    • Staggered slice animations with 30% animation delay distribution for visual impact
    • Label background rendering with rounded corners for improved readability
    • Smart color scale detection - automatically uses pie category columns for proper color mapping
  • ⚑ Performance & Animation Optimizations

    • 60fps smooth animations with configurable curves (elastic, bounce, ease, etc.)
    • Memory-efficient rendering using existing Canvas infrastructure
    • Progressive slice appearance with individual slice animation timing
    • Coordinate system optimization - polar coordinate calculations for precise slice positioning
  • πŸ§ͺ Comprehensive Testing & Documentation

    • 5 new test cases covering basic pie charts, donut charts, custom styling, and edge cases
    • Example app integration with new "Pie Chart" tab showcasing both pie and donut variants
    • Interactive controls - slider control for dynamic radius adjustment
    • Multiple animation examples demonstrating different curves and timing

πŸ“– New API Methods

// Pie chart data mapping
CristalyseChart()
  .mappingPie(value: 'revenue', category: 'department')

// Basic pie chart
.geomPie(
  outerRadius: 120.0,
  strokeWidth: 2.0,
  strokeColor: Colors.white,
  showLabels: true,
  showPercentages: true,
)

// Donut chart configuration
.geomPie(
  innerRadius: 60.0,     // Creates donut hole
  outerRadius: 120.0,
  explodeSlices: true,   // Explode for emphasis
  explodeDistance: 15.0,
)

🎯 Example Implementations

// Basic Pie Chart with Revenue Distribution
CristalyseChart()
  .data([
    {'category': 'Mobile', 'revenue': 45.2},
    {'category': 'Desktop', 'revenue': 32.8},
    {'category': 'Tablet', 'revenue': 22.0},
  ])
  .mappingPie(value: 'revenue', category: 'category')
  .geomPie(
    outerRadius: 120.0,
    strokeWidth: 2.0,
    strokeColor: Colors.white,
    showLabels: true,
    showPercentages: true,
  )
  .theme(ChartTheme.defaultTheme())
  .animate(
    duration: Duration(milliseconds: 1200),
    curve: Curves.elasticOut,
  )
  .build();

// Advanced Donut Chart with User Analytics
CristalyseChart()
  .data(userPlatformData)
  .mappingPie(value: 'users', category: 'platform')
  .geomPie(
    innerRadius: 60.0,        // Creates prominent donut hole
    outerRadius: 120.0,
    strokeWidth: 3.0,
    strokeColor: Colors.white,
    showLabels: true,
    showPercentages: false,   // Show actual values
    explodeSlices: true,      // Explode slices for emphasis
    explodeDistance: 10.0,
  )
  .theme(ChartTheme.darkTheme())
  .animate(
    duration: Duration(milliseconds: 1500),
    curve: Curves.easeOutBack,
  )
  .build();

// Business Dashboard Integration
CristalyseChart()
  .data(marketShareData)
  .mappingPie(value: 'market_share', category: 'product')
  .geomPie(
    outerRadius: 150.0,
    labelRadius: 180.0,       // Position labels further out
    showLabels: true,
    showPercentages: true,
    labelStyle: TextStyle(
      fontSize: 12,
      fontWeight: FontWeight.bold,
    ),
  )
  .theme(ChartTheme.solarizedLightTheme())
  .build();

πŸ”§ Technical Implementation Details

  • Polar Coordinate Mathematics: Precise angle calculations for slice positioning and label placement
  • Path Construction: Manual donut path creation eliminates rendering artifacts and ensures smooth geometry
  • Animation Engine: Leverages existing 60fps animation system with slice-specific timing
  • Color Scale Intelligence: Automatic detection of pie chart geometries for proper color column mapping
  • Responsive Design: Dynamic radius calculation based on plot area with configurable margins
  • Clean Integration: Seamless integration with existing grammar of graphics API patterns

🎨 Visual Enhancements

  • Automatic UI Adaptation: Pie charts automatically hide coordinate grids and axes for clean presentation
  • Smart Label Backgrounds: Semi-transparent rounded backgrounds improve label readability
  • Stroke Customization: Configurable stroke colors and widths for professional slice separation
  • Theme Compatibility: Full integration with all existing themes (Default, Dark, Solarized Light/Dark)
  • Color Palette Support: Automatic color assignment from theme palettes with proper slice differentiation

πŸ§ͺ Quality Assurance

  • Comprehensive Test Coverage: 5 new test cases covering all pie chart scenarios
  • Edge Case Handling: Robust handling of empty data, missing columns, and invalid values
  • Memory Management: Efficient rendering pipeline with no memory leaks
  • Cross-Platform Testing: Verified on iOS, Android, Web, Windows, macOS, and Linux
  • Performance Validation: Maintains 60fps animations with large datasets

πŸš€ Use Cases Unlocked

  • Business Dashboards: Market share analysis, revenue distribution, customer segmentation
  • Analytics Platforms: User demographics, traffic sources, conversion funnels
  • Financial Reports: Portfolio allocation, expense categories, budget breakdowns
  • E-commerce Insights: Product sales distribution, regional performance, payment methods
  • Survey Visualizations: Poll results, satisfaction ratings, preference distributions

This release establishes Cristalyse as a comprehensive charting solution with full pie/donut chart capabilities, maintaining our commitment to grammar of graphics principles and 60fps performance. 🎯

0.9.4 - 2025-07-04 #

  • Improved web wasm compatibility and documentation

0.9.3 - 2025-07-03 #

  • πŸ“– Comprehensive Documentation Site Now Live
    • docs.cristalyse.com is now available with complete guides, examples, and API reference
    • Step-by-step tutorials, and everything you need to master data visualization in Flutter
    • Professional documentation site with enhanced visual examples and comprehensive chart type coverage

Cristalyse Documentation Site
πŸ‘‰ Visit docs.cristalyse.com for complete guides and examples

0.9.2 - 2025-07-03 #

  • Major Enhancement: Advanced Pan Control System with Visual Clipping

    • Fixed chart position reset bug - Charts now maintain their panned position across multiple pan gestures
    • Infinite panning capability - Users can now pan infinitely in any direction without hitting boundaries
    • Visual clipping implementation - Data points that would appear outside the plot area are cleanly cut off
    • Professional chart boundaries - Prevents data rendering over Y-axis labels while maintaining smooth pan experience
    • Selective axis panning control - Independent X and Y axis panning with updateXDomain and updateYDomain boolean parameters
    • Enhanced pan domain persistence - Pan state is properly maintained and doesn't reset to original position on subsequent interactions
  • New Pan Configuration Options

    • updateXDomain: true/false - Enable/disable horizontal (X-axis) panning independently
    • updateYDomain: true/false - Enable/disable vertical (Y-axis) panning independently
    • Canvas clipping optimization - Efficient rendering pipeline that clips geometries to plot area without affecting axes
    • No more pan blocking - Removed restrictive boundary checks that prevented natural panning behavior
    • Improved pan delta calculations for smoother, more natural panning experience
  • Enhanced Pan User Experience

    • Smooth infinite exploration - Users can explore data ranges far beyond original dataset boundaries
    • Clean visual presentation - Chart maintains professional appearance with proper axis label visibility
    • Responsive performance - Clipping operations are optimized for smooth 60fps panning
    • Granular panning control: Choose horizontal-only, vertical-only, both directions, or no panning
    • Time series optimization: Perfect for time-based charts that only need horizontal scrolling
    • Scatter plot flexibility: Enable both axes for full 2D exploration
    • Dashboard compatibility: Configure different pan behaviors for different chart types in the same app
    • Backward compatibility: Existing pan configurations continue to work without changes

🎯 Technical Implementation

// Canvas clipping ensures clean boundaries
canvas.save();
canvas.clipRect(plotArea);  // Clip all geometries to plot area

// Draw all chart geometries (points, lines, bars, areas)
for (final geometry in geometries) {
  _drawGeometry(canvas, plotArea, geometry, ...);
}

// Restore canvas state for axis rendering
canvas.restore();
_drawAxes(canvas, size, plotArea, xScale, yScale, y2Scale);

Result: Perfect balance between infinite panning freedom and professional visual boundaries.

πŸ“– Usage Examples

// Horizontal-only panning (perfect for time series)
CristalyseChart()
  .data(timeSeriesData)
  .mapping(x: 'date', y: 'value')
  .geomLine()
  .interaction(
    pan: PanConfig(
      enabled: true,
      updateXDomain: true,   // βœ… Allow horizontal panning
      updateYDomain: false,  // ❌ Disable vertical panning
      onPanUpdate: (info) {
        print('Horizontal range: ${info.visibleMinX} - ${info.visibleMaxX}');
      },
    ),
  )
  .build();

// Vertical-only panning (useful for ranking charts)
CristalyseChart()
  .data(rankingData)
  .mapping(x: 'category', y: 'score')
  .geomBar()
  .interaction(
    pan: PanConfig(
      enabled: true,
      updateXDomain: false,  // ❌ Disable horizontal panning
      updateYDomain: true,   // βœ… Allow vertical panning
    ),
  )
  .build();

// Full 2D panning (ideal for scatter plots)
CristalyseChart()
  .data(scatterData)
  .mapping(x: 'xValue', y: 'yValue', color: 'category')
  .geomPoint()
  .interaction(
    pan: PanConfig(
      enabled: true,
      updateXDomain: true,   // βœ… Allow horizontal panning
      updateYDomain: true,   // βœ… Allow vertical panning
    ),
  )
  .build();

0.9.1 - 2025-07-02 #

  • Extended Example App Platform Support
    • macOS, Linux, Web, iOS, Android

0.9.0 - 2025-07-02 #

  • Enhanced SVG Export Implementation

    • Improved SVG export with complete chart rendering pipeline
    • Added support for all chart types: points, lines, bars, areas
    • Proper color mapping, scaling, and axis rendering in SVG format
    • Professional-quality vector graphics output with small file sizes
    • Perfect for presentations, reports, and high-quality documentation
  • API Simplification

    • ExportFormat enum now contains only svg
    • ExportConfig defaults to SVG format
    • Simplified export API focused on reliable functionality
    • All export documentation updated to reflect SVG-only capabilities

Benefits of SVG Export:

  • βœ… Scalable vector graphics - Infinite zoom without quality loss
  • βœ… Small file sizes - Efficient for web and print
  • βœ… Professional quality - Perfect for presentations and reports
  • βœ… Cross-platform reliability - Works consistently on all platforms
  • βœ… Design software compatibility - Editable in Figma, Adobe Illustrator, etc.

0.8.0 - 2025-07-02 #

  • Major Feature: Area Chart Support

    • Added comprehensive AreaGeometry class with customizable stroke width, fill opacity, and styling options
    • Implemented geomArea() method following grammar of graphics patterns for seamless API integration
    • Progressive area chart animations with smooth fill transitions revealing data over time
    • Full support for multi-series area charts with automatic color mapping and overlapping transparency
    • Dual Y-axis compatibility for complex business dashboards combining area charts with other geometries
    • Combined visualizations: area + line + point charts for enhanced data storytelling
    • Interactive tooltip support with hover detection optimized for area chart geometries
    • Ordinal and continuous X-scale compatibility maintaining consistency with existing chart types
  • Enhanced Example App

    • Added comprehensive "Area Chart" tab showcasing three distinct area chart implementations
    • Single area chart example with website traffic analytics and smooth fill animations
    • Multi-series area chart demonstrating mobile vs desktop traffic with color-coded transparency
    • Combined area + line + point visualization showing layered data representation techniques
    • Full theme integration with color palette toggling support across all area chart variants
    • Interactive tooltips with custom styling and platform-specific data display
  • Technical Improvements

    • Efficient area path rendering with baseline calculation and progressive animation support
    • Memory-optimized rendering pipeline leveraging existing line chart infrastructure
    • Comprehensive test coverage with 85+ passing tests including new area chart interaction tests
    • Backward compatibility maintained - zero breaking changes to existing API surface
    • Performance optimizations for large datasets with smooth 60fps area fill animations

πŸ“– Examples Added

// Basic Area Chart with Custom Styling
CristalyseChart()
  .data(trafficData)
  .mapping(x: 'month', y: 'visitors')
  .geomArea(
    strokeWidth: 2.0,
    alpha: 0.3,
    fillArea: true,
    color: Colors.blue,
  )
  .scaleXOrdinal()
  .scaleYContinuous(min: 0)
  .animate(duration: Duration(milliseconds: 1200))
  .build();

// Multi-Series Area Chart
CristalyseChart()
  .data(platformData)
  .mapping(x: 'month', y: 'users', color: 'platform')
  .geomArea(strokeWidth: 1.5, alpha: 0.4)
  .interaction(
    tooltip: TooltipConfig(
      builder: (point) => CustomTooltip(point: point),
    ),
  )
  .build();

// Combined Area + Line + Points
CristalyseChart()
  .data(analyticsData)
  .mapping(x: 'date', y: 'value')
  .geomArea(alpha: 0.2, strokeWidth: 0)     // Background fill
  .geomLine(strokeWidth: 3.0)               // Trend line
  .geomPoint(size: 6.0)                     // Data points
  .build();

// Dual Y-Axis Area Charts
CristalyseChart()
  .data(businessData)
  .mapping(x: 'quarter', y: 'revenue')
  .mappingY2('efficiency')
  .geomArea(yAxis: YAxis.primary, alpha: 0.3)
  .geomArea(yAxis: YAxis.secondary, alpha: 0.3)
  .scaleY2Continuous(min: 0, max: 100)
  .build();

0.7.0 - 2025-06-30 #

  • Major Feature: Enhanced Interactive Panning System

    • Added persistent pan state that maintains chart position after pan gesture completion
    • Implemented real-time visible range synchronization between header display and chart X-axis
    • Introduced comprehensive PanConfig API for full control over pan behavior and callbacks
    • Added PanInfo class providing detailed pan state information including visible ranges and delta tracking
    • Enhanced range display card with improved visibility, contrast, and professional styling
  • New Pan API Classes

    • PanConfig: Configure pan behavior with onPanStart, onPanUpdate, onPanEnd callbacks
    • PanInfo: Access current visible X/Y ranges, pan state, and gesture deltas
    • PanState: Track pan lifecycle (start, update, end) for coordinated UI updates
    • Throttled callback system prevents database overwhelming during continuous panning
  • Visual Enhancements

    • Redesigned range display card with enhanced contrast and primary color theming
    • Synchronized range values between header card and chart axis labels
    • Improved typography with monospace fonts for precise range display
    • Professional gradient styling with stronger borders for better visibility
  • Technical Improvements

    • Progressive pan domain accumulation for smooth, natural panning experience
    • Persistent scale domains that maintain panned position across interactions
    • Efficient coordinate transformation from screen pixels to data values
    • Memory-optimized pan state management with automatic cleanup

πŸ“– Examples Added

// Basic Interactive Panning with Range Updates
CristalyseChart()
  .data(largeDataset)  // 1000+ data points
  .mapping(x: 'timestamp', y: 'value', color: 'series')
  .geomLine(strokeWidth: 2.0)
  .geomPoint(size: 4.0)
  .interaction(
    pan: PanConfig(
      enabled: true,
      onPanUpdate: (info) {
        print('Visible range: ${info.visibleMinX} - ${info.visibleMaxX}');
        // Perfect for loading data on-demand
        fetchDataForRange(info.visibleMinX!, info.visibleMaxX!);
      },
      throttle: Duration(milliseconds: 100), // Prevent database overwhelming
    ),
  )
  .build();

// Advanced Panning with Complete Lifecycle Management
CristalyseChart()
  .data(timeSeriesData)
  .mapping(x: 'date', y: 'price')
  .geomLine()
  .interaction(
    pan: PanConfig(
      enabled: true,
      onPanStart: (info) {
        setState(() => isLoading = true);
        showRangeIndicator(info.visibleMinX, info.visibleMaxX);
      },
      onPanUpdate: (info) {
        updateVisibleRange(info.visibleMinX, info.visibleMaxX);
        // Real-time data streaming based on visible window
        streamData(info.visibleMinX!, info.visibleMaxX!);
      },
      onPanEnd: (info) {
        setState(() => isLoading = false);
        saveUserPreferences(info.visibleMinX, info.visibleMaxX);
        // Chart maintains panned position automatically
      },
    ),
  )
  .build();

// Business Dashboard: Financial Data Exploration
CristalyseChart()
  .data(stockData)
  .mapping(x: 'date', y: 'price', color: 'symbol')
  .geomLine(strokeWidth: 2.5, alpha: 0.8)
  .interaction(
    pan: PanConfig(
      enabled: true,
      onPanUpdate: (info) {
        // Update dashboard metrics for visible time range
        updateMetrics(
          startDate: info.visibleMinX,
          endDate: info.visibleMaxX,
        );
        // Show range in header: "Viewing: Jan 2024 - Mar 2024"
        updateHeaderRange(info.visibleMinX!, info.visibleMaxX!);
      },
    ),
  )
  .build();

0.6.2 - 2025-06-26 #

Added #

  • Comprehensive Test Suite: Restored complete test coverage with 81+ test cases across multiple files
    • interaction_test.dart: Interactive features testing for all chart types (scatter, line, bar, grouped, stacked, horizontal, dual Y-axis)
    • performance_test.dart: Large dataset performance testing (1000+ points), memory management, and animation performance
    • tooltip_test.dart: Tooltip system testing with default builders, custom configurations, and business use cases
    • Edge case testing for empty data, null values, disabled interactions, and rapid theme changes

Fixed #

  • Critical Tooltip Crash: Fixed animation reset crash during widget disposal in tooltip system
  • Test Coverage: All 81 tests now passing with comprehensive coverage across the codebase
  • Memory Leaks: Improved tooltip lifecycle management to prevent memory leaks during disposal

Technical #

  • Enhanced tooltip widget disposal process to prevent animation controller crashes
  • Maintained compatibility with previous tooltip rendering improvements from commit 3ed06f9
  • Added stress testing for rapid interaction changes and theme switching
  • Improved test reliability across different chart configurations

0.6.1 - 2025-06-21 #

Fixed #

  • Tooltip System: Fixed tooltips disappearing instantly and getting stuck on first data point
  • Widget Tree Lock: Resolved "setState() called when widget tree was locked" crashes during tooltip animations
  • Hit Detection: Improved point detection reliability - all chart points now respond to hover interactions
  • Touch Handling: Fixed tooltip interference with pan gestures on mobile devices

Technical #

  • Replaced spatial grid hit detection with distance-based approach for better reliability
  • Added IgnorePointer wrapper to prevent tooltips from blocking mouse events
  • Improved tooltip lifecycle management with proper state cleanup
  • Enhanced interaction detector with better error handling and null safety

Configuration #

  • Increased default hit test radius to 30px for hover, 35px for tap interactions
  • Optimized tooltip timing: 10ms show delay, 1.5s hide delay
  • Disabled followPointer by default to prevent gesture conflicts

0.6.0 - 2025-06-21 #

  • Major Feature: Interactive Chart Layer

    • Added a new interaction system to support hover, click, and pan gestures on chart data points.
    • Introduced ChartInteraction configuration for enabling and customizing user interactions.
    • Implemented a flexible tooltip system with TooltipConfig for full control over tooltip appearance, content, and behavior.
    • Added onHover, onExit, and onTap callbacks for developers to hook into user interaction events.
  • Example App

    • Added a new 'Interactive' tab to the example app to showcase the new tooltip and interaction features.

πŸ“– Examples Added

// Interactive Scatter Plot with Tooltips and Click Events
CristalyseChart()
  .data(salesData)
  .mapping(x: 'week', y: 'revenue', color: 'rep')
  .geomPoint()
  .interaction(
    tooltip: TooltipConfig(
      builder: (point) => MyCustomTooltip(point: point),
      style: TooltipStyle(backgroundColor: Colors.black87),
    ),
    click: ClickConfig(
      onTap: (point) => showDetailsDialog(context, point),
    ),
  )
  .build();

0.5.1 - 2025-06-14 #

Documentation

  • Updated screenshots with latest examples

0.5.0 - 2025-06-14 #

πŸš€ Major Feature: Dual Y-Axis Support

BREAKING THE REDDIT COMPLAINTS: "No support for multiple Axis" β†’ SOLVED βœ…

  • Independent Y-Axes: Full support for left (primary) and right (secondary) Y-axes with independent scales and data mappings
  • New API Methods:
    • .mappingY2(column) - Map data to secondary Y-axis
      • .scaleY2Continuous(min, max) - Configure secondary Y-axis scale
      • yAxis: YAxis.primary|secondary parameter for all geometries
  • Smart Layout: Automatic padding adjustment for dual axis labels with color-coded right axis
  • All Geometries Supported: Points, lines, and bars can use either Y-axis
  • Perfect for Business Dashboards: Revenue vs Conversion Rate, Volume vs Efficiency metrics

πŸ”§ Fixed: Ordinal Scale Support for Lines and Points

  • Critical Bug Fix: Lines and points now properly handle categorical X-axes (strings like "Jan", "Feb")
  • Root Cause: _getNumericValue() was failing on string values, breaking line/point rendering on ordinal scales
  • Solution: Smart scale detection - uses bandCenter() for ordinal scales, numeric conversion for continuous scales
  • Impact: Fixes existing charts that combine categorical X-data with line/point geometries

πŸ›  Enhanced: Coordinate Flipping for Horizontal Charts

  • Improved Logic: Fixed coordinate flipping interaction with dual Y-axis system
  • Backwards Compatibility: Existing horizontal bar charts work unchanged
  • Smart Scale Routing: Flipped coordinates properly swap X/Y axis roles regardless of dual Y-axis configuration

πŸ“Š Technical Improvements

  • Dual Scale Management: Independent domain calculation for primary and secondary Y-axes
  • Rendering Pipeline: Enhanced geometry drawing to route data to correct Y-axis
  • Memory Optimization: Efficient scale caching and geometry batching
  • Animation Sync: Coordinated animations across both Y-axes

πŸ§ͺ Comprehensive Testing

  • 100+ New Tests: Full coverage for dual Y-axis functionality
  • Edge Case Handling: Robust testing for invalid data, missing columns, extreme values
  • Performance Testing: Validated with 1000+ data points
  • Cross-Platform: Tested on iOS, Android, Web, and Desktop

πŸ“– Examples Added

// Business Dashboard: Revenue + Conversion Rate
CristalyseChart()
  .data(businessData)
  .mapping(x: 'month', y: 'revenue')      // Primary Y-axis
  .mappingY2('conversion_rate')           // Secondary Y-axis
  .geomBar(yAxis: YAxis.primary)          // Revenue bars (left scale)
  .geomLine(yAxis: YAxis.secondary)       // Conversion line (right scale)
  .scaleXOrdinal()
  .scaleYContinuous(min: 0)               // Revenue scale
  .scaleY2Continuous(min: 0, max: 100)    // Percentage scale
  .build();

// Mixed Metrics: Any two different data ranges
CristalyseChart()
  .data(performanceData)
  .mapping(x: 'week', y: 'sales_volume')
  .mappingY2('customer_satisfaction')
  .geomBar(yAxis: YAxis.primary, alpha: 0.7)
  .geomLine(yAxis: YAxis.secondary, strokeWidth: 3.0)
  .geomPoint(yAxis: YAxis.secondary, size: 8.0)
  .build();

🎯 Use Cases Unlocked

  • Financial Dashboards: Revenue vs Profit Margin, Volume vs Price
  • Marketing Analytics: Traffic vs Conversion Rate, Impressions vs CTR
  • Operational Metrics: Production Volume vs Quality Score
  • Sales Performance: Deal Count vs Average Deal Size
  • E-commerce: Orders vs Customer Satisfaction Score

⚑ Performance Metrics

  • Rendering: Maintains 60fps with dual Y-axis charts
  • Memory: <10MB additional overhead for secondary axis
  • Scale Calculation: <5ms for dual axis domain computation
  • Animation: Smooth synchronized transitions across both axes

πŸ› Fixes

  • Stacked Bar Scale Domain: Improved Y-axis domain calculation for stacked bars
  • Ordinal Line Rendering: Fixed line geometry with categorical X-axes
  • Coordinate Flip Logic: Resolved conflicts between dual Y-axis and coordinate flipping
  • Animation Edge Cases: Better handling of invalid animation values

πŸ”„ Migration Guide

Existing Charts: No changes required - fully backwards compatible

New Dual Y-Axis Charts:

  1. Add .mappingY2('column_name') for secondary Y-axis data
  2. Add .scaleY2Continuous() to configure secondary axis scale
  3. Specify yAxis: YAxis.secondary for geometries using right axis
  4. Primary axis geometries work unchanged (default to YAxis.primary)

πŸ“ˆ What's Next (v0.6.0)

  • Statistical Layers: Regression lines, confidence intervals, trend analysis
  • Interactive Features: Pan, zoom, hover tooltips, selection brushing
  • Advanced Scales: Logarithmic scales, time series scales with smart tick formatting
  • Export Capabilities: PNG/SVG export, print optimization, high-DPI rendering

This release positions Cristalyse as a serious competitor to Tableau, Power BI, and other professional visualization tools. Dual Y-axis support is a fundamental requirement for business dashboards - now we have it! 🎯

0.4.4 - 2025-06-12 #

Added #

  • Stacked Bar Charts: Full support for stacked bars with BarStyle.stacked
    • Segment-by-segment progressive animation with staggered timing
      • Automatic cumulative value calculation for proper stacking
      • Consistent color ordering across all stacked groups
      • Smart Y-scale domain calculation based on total stack heights (not individual segments)

Fixed #

  • Stacked Bar Scale Domain: Y-axis now correctly calculates domain based on cumulative stacked totals instead of individual segment values, preventing bars from rendering outside chart bounds
  • Stacked Bar Animation: Improved animation timing with proper segment delays for smooth visual building effect

Improved #

  • Example App: Added new "Stacked Bars" tab showcasing revenue breakdown by category with realistic business data
  • Chart Features Documentation: Updated feature descriptions to include stacked bar capabilities

Technical #

  • Enhanced _setupYScale method to detect stacked bar geometries and calculate proper domain bounds
  • Added 10% padding to stacked bar charts for better visual spacing
  • Improved data grouping logic in _drawStackedBars with consistent sorting for predictable stacking order

0.4.3 - 2025-06-12 #

Added

  • πŸ“Έ Added screenshots of the example app to README

0.4.2 - 2025-06-12 #

Improved

  • Enhanced the example project to showcase multiple chart types, themes, and color palettes.

0.4.1 - 2025-06-12 #

Technical

  • Code quality improvements and linting compliance

0.4.0 - 2025-06-12 #

Added

  • Enhanced Theming: Added solarizedLightTheme and solarizedDarkTheme to the theme factory.
  • Color Palettes: Introduced multiple color palettes (warm, cool, pastel) that can be applied independently of the base theme.
  • Custom Label Styles: Added an optional axisLabelStyle to ChartTheme for more granular control over axis label appearance.
  • Interactive Example App: The example app now features controls to dynamically cycle through themes, color palettes, and adjust chart-specific properties like bar width, line stroke width, and point size via a slider.

Fixed

  • Axis Label Rendering: Overhauled axis label drawing logic to correctly render labels with proper spacing and prevent overlap, especially on horizontal charts.
  • Color Palette Application: Ensured that color palette changes now correctly apply to all chart types, including those without explicit color mappings.

Changed

  • Improved Padding: Increased default padding in ChartTheme to give axis labels more breathing room.

0.3.0 - 2025-06-12 #

Added

  • Bar chart support with geomBar().
  • Horizontal bar chart functionality via coordFlip() method.
  • Added borderRadius and borderWidth properties to BarGeometry for enhanced styling.

Fixed

  • Resolved numerous rendering issues and lint errors in animated_chart_widget.dart to enable robust bar chart display.
  • Corrected scale setup and drawing logic for flipped coordinates in horizontal bar charts.
  • Ensured proper propagation of the coordFlipped flag throughout the chart rendering pipeline.

0.2.3 - 2025-06-08 #

Technical

  • Code quality improvements and linting compliance

0.2.2 - 2025-06-08 #

Documentation

  • Updated README with comprehensive examples and installation guide
  • Added CONTRIBUTING.md for new contributors

0.2.1 - 2025-06-08 #

Changed

  • Updated deprecated code to use withValues instead of withOpacity

0.2.0 - 2025-06-08 #

Added

  • Line chart support with geom_line()
  • Basic animations with configurable duration and curves
  • Multi-series support with color-grouped lines
  • Staggered point animations and progressive line drawing
  • Dark theme support and theme switching

Fixed

  • Canvas rendering crashes due to invalid opacity values
  • TextPainter missing textDirection parameter
  • Coordinate validation for edge cases and invalid data
  • Animation progress validation and fallback handling
  • Y-axis label positioning and overlap issues

Technical

  • Comprehensive input validation for all numeric values
  • Graceful handling of NaN, infinite, and out-of-bounds data
  • Improved error recovery and fallback mechanisms

0.1.0 #

  • Initial release
  • Basic scatter plot support (geom_point)
  • Grammar of graphics API
  • Linear scales for continuous data
  • Light and dark themes
  • Cross-platform Flutter support

Planned for 0.2.0 #

  • Line charts (geom_line)
  • Basic animations
  • Improved documentation
  • Performance optimizations
35
likes
160
points
1.01k
downloads
screenshot

Publisher

verified publishercristalyse.com

Weekly Downloads

Cristalyse is a high-performance data visualization library for Dart/Flutter that implements grammar of graphics principles with native rendering capabilities.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#visualization #chart #diagram #plot #graph

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

flutter, flutter_svg, intl, path_provider, universal_html

More

Packages that depend on cristalyse