Overview
The FMX Demo showcases:- Cross-Platform - Same codebase runs on all major platforms
- Modern UI - Native FireMonkey styling and animations
- Touch Support - Optimized for touch and gesture interactions
- Mobile Ready - Examples designed for mobile and tablet devices
- Professional Features - Full TeeChart feature set in FMX
Location
Project Files
The demo includes multiple project configurations:- TeeChart_Standard_Firemonkey_Demo.dpr - Standard edition demo
- TeeChart_Pro_Firemonkey_Demo.dpr - Professional edition demo
- TeeChart_Lite_Firemonkey_Demo.dpr - Lite edition demo
Demo Structure
The demo is organized into focused categories:Standard Series
Location:~/workspace/source/FMX/Demo/Standard/
Basic chart types optimized for FireMonkey:
- DemoArea.pas - Area chart examples
- DemoBar.pas - Bar chart examples
- DemoLine.pas - Line chart examples
- DemoPie.pas - Pie chart examples
- DemoBubble.pas - Bubble chart examples
- DemoArrow.pas - Arrow series examples
- DemoFastLine.pas - High-performance line charts
- DemoGantt.pas - Gantt chart examples
- DemoHorizArea.pas - Horizontal area charts
- DemoHorizBar.pas - Horizontal bar charts
- DemoHorizLine.pas - Horizontal line charts
- DemoPoint.pas - Point series examples
- DemoShape.pas - Shape series examples
- Series configuration
- Data population
- Visual customization
- Touch-friendly interactions
Animations
Location:~/workspace/source/FMX/Demo/Animations/
FireMonkey’s powerful animation capabilities:
-
DemoAnimBars.pas - Animated bar charts
- Smooth value transitions
- Staggered animations
- Easing functions
-
DemoAnimLines.pas - Animated line charts
- Growing lines effect
- Point-by-point animation
- Synchronized series
-
DemoAnimPie.pas - Animated pie charts
- Slice explosion
- Rotation effects
- Value changes
-
DemoAnimPoints.pas - Animated point series
- Scatter animation
- Point appearance effects
- Size transitions
-
DemoAnimSeries.pas - General series animations
- Fade in/out
- Series transitions
- Multiple animation types
- User engagement
- Data comprehension
- Professional appearance
- Visual feedback
Database Integration
Location:~/workspace/source/FMX/Demo/Database/
Connect charts to data sources:
-
ChartAsDataset.pas - Expose chart as dataset
- Chart data as TDataSet
- Bi-directional binding
- Database integration
-
DatasetField.pas - Dataset field binding
- Direct field binding
- Automatic updates
- Multiple series from datasets
-
DemoCrossTab.pas - CrossTab visualization
- Pivot table display
- Multi-dimensional data
- Automatic aggregation
-
DemoDB.pas - Database-connected charts
- Live database connection
- Query-based charts
- Data refresh
- FireDAC integration
- LiveBindings support
- Automatic data updates
- Cross-platform data access
Export Functionality
Location:~/workspace/source/FMX/Demo/Export/
Export charts in various formats:
-
ExportImage.pas - Image export (PNG, JPEG, BMP)
- High-resolution export
- Custom dimensions
- Quality settings
-
ExportPDF.pas - PDF export
- Vector-based PDF
- Embedded fonts
- Multi-page support
- Save to file or stream
- Share via platform APIs
- Email integration
- Print support
Functions and Analysis
Location:~/workspace/source/FMX/Demo/Functions/
Mathematical and statistical functions:
- Average and moving average
- Smoothing functions
- Trend analysis
- Standard deviation
- Custom functions
- Function configuration
- Source series binding
- Period settings
- Real-time calculation
Professional Series
Location:~/workspace/source/FMX/Demo/Pro/
Advanced chart types (Pro edition):
- 3D Surface charts
- Contour plots
- Point3D series
- Vector fields
- ColorGrid visualization
- Tower charts
- TriSurface charts
- Full 3D rendering
- OpenGL acceleration
- Complex visualizations
- Scientific charting
Chart Tools
Location:~/workspace/source/FMX/Demo/Tools/
Interactive chart tools:
- Annotation tools
- ColorLine and ColorBand
- Cursor tool
- Legend tools
- Zoom and pan
- Mark tips
- Touch gestures
- Tool customization
- Event handling
- Tool combinations
LiveBindings
Location:~/workspace/source/FMX/Demo/LiveBindings/
FireMonkey’s visual binding framework:
- Bind charts to data sources
- Bi-directional data flow
- Expression-based bindings
- Design-time configuration
- No-code data binding
- Automatic synchronization
- Complex data relationships
- RAD development
Running the FMX Demo
Desktop Platforms
- Open one of the .dpr project files in RAD Studio
- Select Windows or macOS target platform
- Compile and run
- Navigate through categories using the demo UI
Mobile Platforms
- Configure iOS or Android SDK in RAD Studio
- Select mobile target platform
- Connect device or start simulator/emulator
- Deploy and run
- Touch-optimized controls
- Platform-specific styling
- Resolution scaling
- Performance optimization
Key Features Demonstrated
Cross-Platform Rendering
FMX uses platform-native graphics:- Windows: Direct2D/Direct3D
- macOS: Quartz/Metal
- iOS: OpenGL ES/Metal
- Android: OpenGL ES
- Hardware acceleration
- High performance
- Native appearance
- Consistent behavior
Touch and Gestures
Optimized for touch input:- Pinch-to-Zoom - Two-finger zoom
- Pan - Touch and drag scrolling
- Tap - Series selection
- Long Press - Context actions
- Multi-touch support
- Platform gesture recognition
- Custom gesture handling
Responsive Layout
Adapts to different screen sizes:- Phone layouts (small screens)
- Tablet layouts (medium screens)
- Desktop layouts (large screens)
- Orientation changes
- Anchors and alignment
- Relative positioning
- Scale-aware controls
- Platform styles
Performance Optimization
FMX-specific optimizations:- GPU-accelerated rendering
- Efficient series drawing
- Cached graphics
- Async operations
Code Structure
Base Form
File:Base.pas
Common base class for all examples:
- Shared functionality
- Consistent styling
- Navigation support
- Utility methods
Typical Example Structure
FMX vs VCL Differences
Component Names
- VCL:
VCLTee.Chart,VCLTee.Series - FMX:
FMXTee.Chart,FMXTee.Series
Graphics
- VCL: Windows GDI/GDI+
- FMX: Platform-native (Direct2D, Metal, OpenGL ES)
Styling
- VCL: Windows themes
- FMX: Platform styles (Material, Cupertino, etc.)
Events
- Similar event model
- FMX adds touch/gesture events
- Platform-specific event handling
Mobile-Specific Features
Platform Services
Access native platform features:- Share sheet integration
- Photo library access
- Sensor data (accelerometer, GPS)
- Platform dialogs
Deployment
iOS deployment:- Code signing configuration
- Provisioning profiles
- App Store preparation
- APK generation
- Permissions configuration
- Google Play preparation
Best Practices
Performance
- Use FastLine for real-time data
- Limit point count on mobile devices
- Enable hardware acceleration
- Cache static content
- Optimize animations
Touch UX
- Large hit targets (minimum 44x44 points)
- Clear visual feedback
- Support gestures
- Avoid hover-dependent features
- Test on actual devices
Cross-Platform
- Test on all target platforms
- Use platform services appropriately
- Respect platform conventions
- Handle different screen sizes
- Consider performance differences
Example: Creating an FMX Chart
Comparison with VCL
| Feature | VCL Demo (TeeNew) | FMX Demo |
|---|---|---|
| Examples | 687 examples | ~50 examples |
| Focus | Comprehensive features | Cross-platform essentials |
| Platforms | Windows only | Windows, macOS, iOS, Android |
| Graphics | GDI/GDI+ | Platform-native |
| Touch | Limited | Full support |
| Animations | Basic | Advanced |
| Styling | Windows themes | Platform styles |
Related Resources
- TeeNew Demo - Comprehensive VCL examples
- Basic Examples - Getting started
- Intermediate Examples - Mid-level features
- Advanced Examples - Complex scenarios
Tips for FMX Development
- Start with Standard demo - Learn core concepts
- Explore Animations - Enhance user experience
- Test touch gestures - Essential for mobile
- Use LiveBindings - Rapid data binding
- Profile performance - Optimize for target platform
- Respect platform UX - Follow platform guidelines
