@pioneer-code/pioneer-charts 22.0.0 → 22.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -9
- package/fesm2022/pioneer-code-pioneer-charts.mjs +326 -214
- package/fesm2022/pioneer-code-pioneer-charts.mjs.map +1 -1
- package/package.json +5 -3
- package/scss/core/theme/imports.scss +17 -11
- package/scss/pioneer-charts.scss +5 -0
- package/types/pioneer-code-pioneer-charts.d.ts +119 -61
package/README.md
CHANGED
|
@@ -14,8 +14,16 @@ Pioneer Charts is an Angular library for building beautiful, customizable, and r
|
|
|
14
14
|
- Supports Bar, Line/Area, Pie charts, and Legends.
|
|
15
15
|
- Event emitters for user interaction.
|
|
16
16
|
- Strongly typed configuration contracts.
|
|
17
|
+
- Standalone components — no `NgModule`s required.
|
|
18
|
+
- Automatic chart resizing as its container's size changes.
|
|
19
|
+
- Zoneless-compatible.
|
|
17
20
|
- Open source and actively maintained.
|
|
18
21
|
|
|
22
|
+
## Requirements
|
|
23
|
+
|
|
24
|
+
- Angular ^22.0.0
|
|
25
|
+
- D3 ^7.9.0
|
|
26
|
+
|
|
19
27
|
## Quick Start
|
|
20
28
|
|
|
21
29
|
### 1. Install Pioneer Charts
|
|
@@ -24,21 +32,23 @@ Pioneer Charts is an Angular library for building beautiful, customizable, and r
|
|
|
24
32
|
npm install --save @pioneer-code/pioneer-charts
|
|
25
33
|
```
|
|
26
34
|
|
|
27
|
-
### 2. Import
|
|
35
|
+
### 2. Import Components
|
|
28
36
|
|
|
29
|
-
|
|
37
|
+
Pioneer Charts components are standalone — import the ones you need directly in your component:
|
|
30
38
|
|
|
31
39
|
```typescript
|
|
32
|
-
import {
|
|
40
|
+
import { PcacBarVerticalChartComponent, PcacLineChart } from '@pioneer-code/pioneer-charts';
|
|
33
41
|
|
|
34
|
-
@
|
|
42
|
+
@Component({
|
|
43
|
+
selector: 'app-dashboard',
|
|
35
44
|
imports: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// ...other
|
|
45
|
+
PcacBarVerticalChartComponent,
|
|
46
|
+
PcacLineChart,
|
|
47
|
+
// ...other components
|
|
39
48
|
],
|
|
49
|
+
templateUrl: './dashboard.component.html',
|
|
40
50
|
})
|
|
41
|
-
export class
|
|
51
|
+
export class DashboardComponent { }
|
|
42
52
|
```
|
|
43
53
|
|
|
44
54
|
### 3. Import Styles
|
|
@@ -46,9 +56,22 @@ export class AppModule { }
|
|
|
46
56
|
Add the Pioneer Charts CSS to your global styles:
|
|
47
57
|
|
|
48
58
|
```scss
|
|
49
|
-
@import "
|
|
59
|
+
@import "@pioneer-code/pioneer-charts/themes/pioneer-charts.css";
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### Customizing the theme
|
|
63
|
+
|
|
64
|
+
Prefer a Sass build instead? Import the source directly and override any of its color variables:
|
|
65
|
+
|
|
66
|
+
```scss
|
|
67
|
+
@use "@pioneer-code/pioneer-charts/scss/pioneer-charts" with (
|
|
68
|
+
$gray-800: #1a1a2e, // tooltip background
|
|
69
|
+
$white: #f4f4f8, // tooltip text
|
|
70
|
+
);
|
|
50
71
|
```
|
|
51
72
|
|
|
73
|
+
See `@pioneer-code/pioneer-charts/scss/core/theme/imports.scss` for the full list of overridable variables.
|
|
74
|
+
|
|
52
75
|
## Usage Example
|
|
53
76
|
|
|
54
77
|
```html
|