pivotgrid-js 0.1.0 → 0.1.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 CHANGED
@@ -8,7 +8,7 @@ Vanilla JS pivot table — no dependencies, no frameworks.
8
8
 
9
9
  **[Live Demo](https://windowrepino.ru/pivot/demo/demo-example.html)**
10
10
 
11
- ![PivotGrid](https://raw.githubusercontent.com/AlexKorole/pivotgrid/main/assets/screenshot.png)
11
+ ![PivotGrid](https://raw.githubusercontent.com/AlexKorole/pivotgrid/master/assets/screenshot.png)
12
12
 
13
13
  ## Installation
14
14
 
@@ -159,7 +159,7 @@ A visual config editor is included. Open it locally:
159
159
  node_modules/pivotgrid-js/config/config-editor.html
160
160
  ```
161
161
 
162
- ![Config Editor](https://raw.githubusercontent.com/AlexKorole/pivotgrid/main/assets/config-editor.png)
162
+ ![Config Editor](https://raw.githubusercontent.com/AlexKorole/pivotgrid/master/assets/config-editor.png)
163
163
 
164
164
  Features:
165
165
  - Fetch columns from the database with one click
@@ -247,6 +247,19 @@ import { PivotGrid, Aggregator, RestProvider, ArrayProvider } from 'pivotgrid-js
247
247
  Available exports: `PivotGrid`, `Aggregator`, `ColumnStore`, `DictionaryEncoder`,
248
248
  `RestProvider`, `ArrayProvider`, `FieldZones`, `FilterManager`, `CacheManager`, `I18N`.
249
249
 
250
+ ## Try It Locally
251
+
252
+ ```bash
253
+ # Terminal 1 — backend (proxy to your database)
254
+ pip install psycopg2-binary
255
+ python node_modules/pivotgrid-js/server/server.py
256
+
257
+ # Terminal 2 — serve the frontend page
258
+ python -m http.server 8085
259
+ ```
260
+
261
+ Open the Config Editor (`node_modules/pivotgrid-js/config/config-editor.html`) and create your config.
262
+
250
263
  ## License
251
264
 
252
265
  Free for personal and non-commercial use.
@@ -4,25 +4,26 @@
4
4
  */
5
5
  const DEMO_CONFIG = {
6
6
  dimensions: ['region', 'category', 'product', 'manager', 'channel',
7
- 'sale_year', 'sale_quarter', 'sale_month', 'sale_week',
7
+ 'sale_year', 'sale_quarter', 'sale_month', 'sale_day_num', 'sale_weekday_name',
8
8
  'sale_hour', 'sale_minute'],
9
9
  measures: ['revenue', 'units'],
10
10
  funcs: ['sum', 'avg', 'count', 'min', 'max'],
11
11
 
12
12
  fields: {
13
- region: { label: 'region', title: 'Регион' },
14
- category: { label: 'category', title: 'Категория' },
15
- product: { label: 'product', title: 'Продукт' },
16
- manager: { label: 'manager', title: 'Менеджер' },
17
- channel: { label: 'channel', title: 'Канал' },
18
- sale_year: { label: 'sale_year', title: 'Год' },
19
- sale_quarter: { label: 'sale_quarter', title: 'Квартал' },
20
- sale_month: { label: 'sale_month_name', title: 'Месяц', sortKey: 'sale_month_num' },
21
- sale_week: { label: 'sale_week', title: 'Неделя' },
22
- sale_hour: { label: 'sale_hour', title: 'Час' },
23
- sale_minute: { label: 'sale_minute', title: 'Минута' },
24
- revenue: { label: 'revenue', title: 'Выручка' },
25
- units: { label: 'units', title: 'Единицы' },
13
+ region: { label: 'region', title: 'Region' },
14
+ category: { label: 'category', title: 'Category' },
15
+ product: { label: 'product', title: 'Product' },
16
+ manager: { label: 'manager', title: 'Manager' },
17
+ channel: { label: 'channel', title: 'Channel' },
18
+ sale_year: { label: 'sale_year', title: 'Year' },
19
+ sale_quarter: { label: 'sale_quarter', title: 'Quarter' },
20
+ sale_month: { label: 'sale_month_name', title: 'Month', sortKey: 'sale_month_num' },
21
+ sale_weekday_name: { label: 'sale_weekday_name', title: 'Weekday', sortKey: 'sale_weekday_num' },
22
+ sale_day_num: { label: 'sale_day_num', title: 'Day'},
23
+ sale_hour: { label: 'sale_hour', title: 'Hour' },
24
+ sale_minute: { label: 'sale_minute', title: 'Minute' },
25
+ revenue: { label: 'revenue', title: 'Revenue' },
26
+ units: { label: 'units', title: 'Units' },
26
27
  },
27
28
 
28
29
  cachedDimensions: ['region', 'category'],
@@ -33,6 +34,6 @@ const DEMO_CONFIG = {
33
34
  func: 'sum',
34
35
 
35
36
  maxCachedRows: 500_000,
36
- filterCheckboxLimit: 5,
37
+ filterCheckboxLimit: 30,
37
38
  drillthroughQuery: 'demo',
38
39
  };