A modern, interactive charting library built with Angular and D3.js, featuring beautiful glass-morphism designs and smooth animations.
- +10 Chart Types: Bar, Line, Area, Pie, Scatter, Heatmap, Treemap, Gauge, Wordcloud, and more
- Modern Design: Glass-morphism effects with smooth animations
- Interactive: Tooltips, zoom, hover effects, and customization options
- TypeScript: Fully typed for better developer experience
- Responsive: Adapts to different screen sizes
- Theme Support: Customizable themes with CSS variables
- Storybook: Interactive documentation and component playground
npm install lora-chartsimport { Bar } from 'lora-charts';
@Component({
selector: 'app-example',
standalone: true,
imports: [Bar],
template: `
<app-bar
[data]="chartData"
[width]="800"
[height]="500"
[config]="{ animated: true, showGrid: true }"
/>
`
})
export class ExampleComponent {
chartData = [
{ label: 'Q1', value: 4500 },
{ label: 'Q2', value: 5200 },
{ label: 'Q3', value: 6100 },
{ label: 'Q4', value: 7300 },
];
}Perfect for comparing values across categories.
import { Bar } from 'lora-charts';Ideal for showing trends over time.
import { Line } from 'lora-charts';Similar to line charts with filled areas.
import { Area } from 'lora-charts';Great for showing proportions and percentages.
import { Pie } from 'lora-charts';Perfect for showing correlations and data distributions.
import { Scatter } from 'lora-charts';Ideal for visualizing data density and patterns.
import { Heatmap } from 'lora-charts';Great for hierarchical data visualization.
import { Treemap } from 'lora-charts';Perfect for showing progress and KPIs.
import { Gauge } from 'lora-charts';Visualize word frequencies and text data.
import { Wordcloud } from 'lora-charts';Lora Charts supports custom themes through CSS variables and JSON configuration.
import { ThemeService } from 'lora-charts';
constructor(private themeService: ThemeService) {
this.themeService.loadAndSetTheme('/themes/main.json');
}Create a theme JSON file:
{
"mode": "light",
"colors": {
"primary": "#0071e3",
"secondary": "#8e44ff",
"background": "#f5f5f7",
"text": "#1d1d1f",
"border": "rgba(0, 0, 0, 0.08)"
},
"fonts": {
"family": "Inter, system-ui, sans-serif",
"size": {
"sm": 13,
"md": 15,
"lg": 17
}
},
"spacing": {
"sm": 8,
"md": 16,
"lg": 24
}
}Each chart accepts a config object for customization:
{
orientation?: 'vertical' | 'horizontal';
showGrid?: boolean;
showValues?: boolean;
animated?: boolean;
barRadius?: number;
barPadding?: number;
colors?: string[];
customTooltip?: (data) => TooltipConfig;
}{
showGrid?: boolean;
animated?: boolean;
colors?: string[];
minBubbleSize?: number;
maxBubbleSize?: number;
enableZoom?: boolean;
xAxisLabel?: string;
yAxisLabel?: string;
customTooltip?: (data) => TooltipConfig;
}- Node.js 22+
- npm 11.7.0
# Clone the repository
git clone https://github.com/HenriqueCosta05/Lora_DS
# Install dependencies
npm install
# Run Storybook
npm run storybooklora-charts/
βββ src/
β βββ components/
β β βββ base/ # Base chart components
β β β βββ axis/
β β β βββ chart-container/
β β β βββ grid/
β β β βββ legend/
β β β βββ tooltip/
β β βββ charts/ # Chart implementations
β β βββ area/
β β βββ bar/
β β βββ gauge/
β β βββ heatmap/
β β βββ line/
β β βββ pie/
β β βββ scatter/
β β βββ treemap/
β β βββ wordcloud/
β βββ services/ # Theme and utility services
β βββ stories/ # Storybook stories
β βββ types/ # TypeScript types
β βββ utils/ # Helper functions
βββ public/
β βββ themes/ # Theme configurations
βββ .storybook/ # Storybook configuration
Full documentation is available in Storybook:
npm run storybookThen navigate to http://localhost:6006
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open-source. See the repository for licensing information.
Henrique Costa
- GitHub: @HenriqueCosta05
Made with β€οΈ using Angular and D3.js