Skip to content

Commit 6d42e11

Browse files
committed
Huge restructure to extract the c3 template to a separate npm library.
1 parent 9370cd5 commit 6d42e11

128 files changed

Lines changed: 2424 additions & 92110 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.bat

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const data1 = [30, 200, 100, 400, 150, 250];
88
const data2 = [50, 20, 10, 40, 15, 25];
99

1010
import { DataFrame } from 'data-forge';
11-
import '../../src/index';
11+
import '../src/index';
1212
import * as fs from 'fs-extra';
1313
import * as path from 'path';
1414

@@ -30,7 +30,6 @@ async function main(): Promise<void> {
3030
const plot = df.plot();
3131
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
3232
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
33-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
3433
}
3534

3635
main()
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ const setosa_x = [ 3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.4, 3
1010
const setosa_y = [ 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.2, 0.4, 0.4, 0.3, 0.3, 0.3, 0.2, 0.4, 0.2, 0.5, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.2, 0.4, 0.1, 0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.3, 0.3, 0.2, 0.6, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2 ];
1111

1212
import { DataFrame } from 'data-forge';
13-
import '../../src/index';
13+
import '../src/index';
1414
import * as fs from 'fs-extra';
1515
import * as path from 'path';
16-
import { ChartType, IAxisMap } from '../../src/chart-def';
16+
import { ChartType, IAxisMap } from '../src/chart-def';
1717

1818
const outputName = path.basename(__filename, ".ts");
1919
const outputPath = path.join("./output", outputName);
@@ -45,7 +45,6 @@ async function main(): Promise<void> {
4545

4646
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
4747
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
48-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
4948
}
5049

5150
main()
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const data1 = [30, 200, 100, 400, 150, 250];
99
const data2 = [130, 340, 200, 500, 250, 350];
1010

1111
import { DataFrame } from 'data-forge';
12-
import '../../src/index';
12+
import '../src/index';
1313
import * as fs from 'fs-extra';
1414
import * as path from 'path';
1515

@@ -35,7 +35,6 @@ async function main(): Promise<void> {
3535
const plot = df.plot();
3636
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
3737
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
38-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
3938
}
4039

4140
main()
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const data1 = [30, 200, 100, 400, 150, 250];
99
const data2 = [130, 340, 200, 500, 250, 350];
1010

1111
import { DataFrame } from 'data-forge';
12-
import '../../src/index';
12+
import '../src/index';
1313
import * as fs from 'fs-extra';
1414
import * as path from 'path';
1515

@@ -33,7 +33,6 @@ async function main(): Promise<void> {
3333
const plot = df.plot({}, { x: "date", y: [ "data1", "data2" ]});
3434
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
3535
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
36-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
3736
}
3837

3938
main()
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const data1 = [30, 200, 100, 400, 150, 250];
99
const data2 = [130, 340, 200, 500, 250, 350];
1010

1111
import { DataFrame } from 'data-forge';
12-
import '../../src/index';
12+
import '../src/index';
1313
import * as fs from 'fs-extra';
1414
import * as path from 'path';
1515

@@ -36,7 +36,6 @@ async function main(): Promise<void> {
3636
.y("data2");
3737
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
3838
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
39-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
4039
}
4140

4241
main()
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ const data2 = [130, 100, 140, 200, 150, 50];
99
const data3 = [130, -150, 200, 300, -200, 100];
1010

1111
import { DataFrame } from 'data-forge';
12-
import '../../src/index';
12+
import '../src/index';
1313
import * as fs from 'fs-extra';
1414
import * as path from 'path';
15-
import { ChartType } from '../../src/chart-def';
15+
import { ChartType } from '../src/chart-def';
1616

1717
const outputName = path.basename(__filename, ".ts");
1818
const outputPath = path.join("./output", outputName);
@@ -33,7 +33,6 @@ async function main(): Promise<void> {
3333
const plot = df.plot({ chartType: ChartType.Bar });
3434
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
3535
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
36-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
3736
}
3837

3938
main()
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ const data2 = [130, 100, 140, 200, 150, 50];
99
const data3 = [130, -150, 200, 300, -200, 100];
1010

1111
import { DataFrame } from 'data-forge';
12-
import '../../src/index';
12+
import '../src/index';
1313
import * as fs from 'fs-extra';
1414
import * as path from 'path';
15-
import { ChartType } from '../../src/chart-def';
15+
import { ChartType } from '../src/chart-def';
1616

1717
const outputName = path.basename(__filename, ".ts");
1818
const outputPath = path.join("./output", outputName);
@@ -34,7 +34,6 @@ async function main(): Promise<void> {
3434
.chartType(ChartType.Bar);
3535
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
3636
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
37-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
3837
}
3938

4039
main()
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ const versicolor_x = [ 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2.0, 3.
88
const versicolor_y = [ 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1.0, 1.3, 1.4, 1.0, 1.5, 1.0, 1.4, 1.3, 1.4, 1.5, 1.0, 1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1.0, 1.1, 1.0, 1.2, 1.6, 1.5, 1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1.0, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3 ];
99

1010
import { DataFrame } from 'data-forge';
11-
import '../../src/index';
11+
import '../src/index';
1212
import * as fs from 'fs-extra';
1313
import * as path from 'path';
14-
import { ChartType } from '../../src/chart-def';
14+
import { ChartType } from '../src/chart-def';
1515

1616
const outputName = path.basename(__filename, ".ts");
1717
const outputPath = path.join("./output", outputName);
@@ -31,7 +31,6 @@ async function main(): Promise<void> {
3131
const plot = df.plot({ chartType: ChartType.Scatter }, { x: "versicolor_x", y: "versicolor_y" });
3232
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
3333
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
34-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
3534
}
3635

3736
main()
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ const versicolor_x = [ 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2.0, 3.
88
const versicolor_y = [ 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1.0, 1.3, 1.4, 1.0, 1.5, 1.0, 1.4, 1.3, 1.4, 1.5, 1.0, 1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1.0, 1.1, 1.0, 1.2, 1.6, 1.5, 1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1.0, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3 ];
99

1010
import { DataFrame } from 'data-forge';
11-
import '../../src/index';
11+
import '../src/index';
1212
import * as fs from 'fs-extra';
1313
import * as path from 'path';
14-
import { ChartType } from '../../src/chart-def';
14+
import { ChartType } from '../src/chart-def';
1515

1616
const outputName = path.basename(__filename, ".ts");
1717
const outputPath = path.join("./output", outputName);
@@ -34,7 +34,6 @@ async function main(): Promise<void> {
3434
.y("versicolor_y");
3535
await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false });
3636
await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false });
37-
await plot.exportNodejs(path.join(outputPath, "nodejs"), { overwrite: true });
3837
}
3938

4039
main()

0 commit comments

Comments
 (0)