A professional, feature-rich charting library for Fyne applications with industry-standard visualization capabilities.
- ✅ Scatter Plots - Data point visualization
- ✅ Line Charts - Continuous data trends
- ✅ Bar Charts - Categorical data comparison with grouped bars support
- ✅ Area Fills - Shaded regions (fill to zero or between curves)
- ⬜ Pie Charts (planned)
- ⬜ Stacked Bars (planned)
- ✅ Smart Grid System - Automatic tick intervals with "nice numbers" algorithm
- ✅ Axis Labels & Titles - Numeric labels with dynamic precision plus custom axis titles
- ✅ Negative Values - Full support for all four quadrants
- ✅ Multiple Series - Compare unlimited datasets with auto-colors
- ✅ Custom Styling - Colors, line widths, point sizes, bar borders
- ✅ Flexible Legends - Positionable legends (top/bottom/left/right) or hide completely
- ✅ Data Labels - Show values directly on points/bars with custom formatting
- ✅ Manual Axis Ranges - Override auto-scaling for consistent comparisons
- ✅ Chart Titles - Main title and series legends
- ✅ Real-time Updates - Dynamic data visualization
- ✅ Professional Color Palette - D3.js/Plotly-inspired 10-color system
go get github.com/alexiusacademia/fynesimplechartRequirements:
- Go 1.22.0 or later
- Fyne v2.4.4 or later
package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"github.com/alexiusacademia/fynesimplechart"
)
func main() {
a := app.New()
w := a.NewWindow("My First Chart")
// Create data points
nodes := []fynesimplechart.Node{
*fynesimplechart.NewNode(1, 2),
*fynesimplechart.NewNode(2, 4),
*fynesimplechart.NewNode(3, 3),
*fynesimplechart.NewNode(4, 5),
}
// Create plot
plot := fynesimplechart.NewPlot(nodes, "My Data")
// Create chart
chart := fynesimplechart.NewGraphWidget([]fynesimplechart.Plot{*plot})
chart.Resize(fyne.NewSize(600, 400))
w.SetContent(chart)
w.ShowAndRun()
}plot := fynesimplechart.NewPlot(nodes, "Temperature")
plot.ShowLine = true
plot.LineWidth = 2.0
plot.PlotColor = color.RGBA{R: 31, G: 119, B: 180, A: 255}plot := fynesimplechart.NewPlot(nodes, "Monthly Sales")
plot.ShowBars = true
plot.BarWidth = 0.8
plot.ShowPoints = false
plot.ShowLine = false
// Optional: Add borders
plot.BarBorderWidth = 1// Q1 data
q1 := fynesimplechart.NewPlot(data1, "Q1")
q1.ShowBars = true
q1.BarWidth = 0.25
// Q2 data (offset X by 0.3)
q2 := fynesimplechart.NewPlot(data2, "Q2")
q2.ShowBars = true
q2.BarWidth = 0.25
chart := fynesimplechart.NewGraphWidget([]fynesimplechart.Plot{*q1, *q2})plot := fynesimplechart.NewPlot(nodes, "Revenue")
plot.ShowLine = true
plot.FillArea = true
plot.FillToZero = true // Fill from curve to Y=0- Quick Start Guide - Fast reference for common tasks
- Tutorials - 15 comprehensive step-by-step tutorials
- API Documentation - Complete feature reference
Complete tutorial series covering everything from basics to advanced features:
- Getting Started - Installation and first chart
- Basic Scatter Plot - Point visualization
- Line Charts - Connected data trends
- Customizing Appearance - Colors and styling
- Multiple Data Series - Comparing datasets
- Working with Negative Values - All quadrants
- Grid and Axes Configuration - Grid control
- Color Palettes - Color schemes
- Area Fills - Shaded regions
- Mathematical Visualizations - Function plotting
- Real-time Data - Dynamic updates
- Best Practices - Performance & design
- Integration Examples - Real applications
- Bar Charts - Categorical data
- Enhanced Features - Axis titles, legends, ranges, labels
plot := fynesimplechart.NewPlot(nodes, "Title")
// Visibility
plot.ShowLine = true
plot.ShowPoints = true
plot.ShowBars = false
// Styling
plot.LineWidth = 2.5
plot.PointSize = 4.0
plot.PlotColor = myColor
// Bar Charts
plot.ShowBars = true
plot.BarWidth = 0.8
plot.BarBorderWidth = 1
plot.BarBorderColor = borderColor
// Area Fill
plot.FillArea = true
plot.FillToZero = true
plot.FillToPlotIdx = 0
plot.FillColor = fillColor
// Data Labels
plot.ShowDataLabels = true
plot.LabelFormat = "%.1f" // or "$%.0fK", "%.0f%%", etc.
plot.LabelSize = 10
plot.LabelColor = labelColorchart := fynesimplechart.NewGraphWidget(plots)
// Titles
chart.SetChartTitle("My Chart Title")
chart.XAxisTitle = "Time (seconds)"
chart.YAxisTitle = "Value (units)"
// Display
chart.ShowGrid = true // Toggle grid visibility
chart.ShowLegend = true // Toggle legend visibility
// Legend Position
chart.LegendPosition = fynesimplechart.LegendBottom
// Options: LegendRight (default), LegendBottom, LegendTop, LegendLeft, LegendNone
// Manual Axis Ranges (optional)
minY := float32(0)
maxY := float32(100)
chart.MinY = &minY
chart.MaxY = &maxY- Business Analytics - Sales trends, revenue charts, KPI dashboards
- Scientific Visualization - Data analysis, experimental results
- Financial Applications - Stock charts, profit/loss, budget tracking
- IoT Monitoring - Sensor data, real-time metrics
- Survey Results - Response analysis, demographic data
- Performance Metrics - System monitoring, benchmarks
Built with industry-standard charting practices:
- Nice Numbers Algorithm - Human-friendly tick intervals (1, 2, 5, 10...)
- Automatic Scaling - Intelligent axis range calculation
- Coordinate Transformation - Clean data-to-screen mapping
- Modular Rendering - Separated concerns (grid, axes, plots, legend)
- Professional Colors - Accessible, high-contrast palette
Contributions are welcome! Please feel free to submit pull requests, report bugs, or suggest features.
This project is licensed under the MIT License.
- Built with Fyne - A beautiful cross-platform GUI toolkit for Go
- Color palette inspired by D3.js and Plotly
- Nice numbers algorithm based on industry-standard charting libraries
The library supports scatter plots, line charts, bar charts, area fills, multiple series, negative values, custom colors, and more. See the tutorials for detailed examples and usage.
Made with ❤️ using Go and Fyne