From bf9da7a59663a92166f5e0c13ac5b0b94aaef289 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sun, 28 Apr 2019 11:43:12 +1000 Subject: [PATCH 01/28] Can now compute min/max from series data that contains nulls, undefined, NaN and Infinity values. --- src/apply-defaults.ts | 16 +++- src/test/apply-defaults.test.ts | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+), 4 deletions(-) diff --git a/src/apply-defaults.ts b/src/apply-defaults.ts index 9faf841..0ef2849 100644 --- a/src/apply-defaults.ts +++ b/src/apply-defaults.ts @@ -14,6 +14,14 @@ function extractValues(data: ISerializedDataFrame, seriesConfigs: IYAxisSeriesCo return flattened; } +function findMin(values: number[]): number { + return Math.min(...values.filter(v => v !== undefined && v !== null && !Number.isNaN(v))); +} + +function findMax(values: number[]): number { + return Math.max(...values.filter(v => v !== undefined && v !== null && !Number.isNaN(v) && Number.isFinite(v))); +} + // // Apply defaults to a chart definition and patch misssing values. // @@ -79,7 +87,7 @@ export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConf y1Values = extractValues(chartDef.data, chartDef.axisMap.y); if (y1Values.length > 0) { - chartDef.plotConfig.y.min = Math.min(...y1Values); + chartDef.plotConfig.y.min = findMin(y1Values); } } @@ -89,7 +97,7 @@ export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConf } if (y1Values.length > 0) { - chartDef.plotConfig.y.max = Math.max(...y1Values); + chartDef.plotConfig.y.max = findMax(y1Values); } } @@ -102,7 +110,7 @@ export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConf if (chartDef.plotConfig.y2.min === undefined) { y2Values = extractValues(chartDef.data, chartDef.axisMap.y2); if (y2Values.length > 0) { - chartDef.plotConfig.y2.min = Math.min(...y2Values); + chartDef.plotConfig.y2.min = findMin(y2Values); } } @@ -112,7 +120,7 @@ export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConf } if (y2Values.length > 0) { - chartDef.plotConfig.y2.max = Math.max(...y2Values); + chartDef.plotConfig.y2.max = findMax(y2Values); } } diff --git a/src/test/apply-defaults.test.ts b/src/test/apply-defaults.test.ts index e7e2de7..8837cee 100644 --- a/src/test/apply-defaults.test.ts +++ b/src/test/apply-defaults.test.ts @@ -108,6 +108,40 @@ describe("apply defaults", () => { ], }; + const testDataWithBadValues = { + columnOrder: ["a", "b"], + columns: { + a: "number", + b: "number", + }, + index: { + type: "number", + values: [2, 3, 4, 5, 6], + }, + values: [ + { + a: 10, + b: 100, + }, + { + a: null, + b: undefined, + }, + { + a: 20, + b: 200, + }, + { + a: 5 / 0, + b: Math.sqrt(-2), + }, + { + a: 30, + b: 300, + }, + ], + }; + it("y min can be passed through", () => { const inputChartDef: any = { @@ -149,6 +183,32 @@ describe("apply defaults", () => { expect(chartDef.plotConfig.y!.min).toBe(10); }); + it("y min defaults to y series min with bad values", () => { + + const inputChartDef: any = { + data: testDataWithBadValues, + plotConfig: { + y: { + }, + y2: { + }, + }, + axisMap: { + y: [ + { + series: "a", + }, + { + series: "b", + }, + ], + }, + }; + + const chartDef = applyDefaults(inputChartDef); + expect(chartDef.plotConfig.y!.min).toBe(10); + }); + it("y max can be passed through", () => { const inputChartDef: any = { @@ -190,6 +250,33 @@ describe("apply defaults", () => { expect(chartDef.plotConfig.y!.max).toBe(300); }); + it("y max defaults to y series max with bad values", () => { + + const inputChartDef: any = { + data: testDataWithBadValues, + plotConfig: { + y: { + }, + y2: { + }, + }, + axisMap: { + y: [ + { + series: "a", + }, + { + series: "b", + }, + ], + }, + }; + + const chartDef = applyDefaults(inputChartDef); + expect(chartDef.plotConfig.y!.max).toBe(300); + }); + + it("y2 min can be passed through", () => { const inputChartDef: any = { @@ -231,6 +318,32 @@ describe("apply defaults", () => { expect(chartDef.plotConfig.y2!.min).toBe(10); }); + it("y2 min defaults to y2 series min with bad values", () => { + + const inputChartDef: any = { + data: testDataWithBadValues, + plotConfig: { + y: { + }, + y2: { + }, + }, + axisMap: { + y2: [ + { + series: "a", + }, + { + series: "b", + }, + ], + }, + }; + + const chartDef = applyDefaults(inputChartDef); + expect(chartDef.plotConfig.y2!.min).toBe(10); + }); + it("y2 max can be passed through", () => { const inputChartDef: any = { @@ -272,6 +385,32 @@ describe("apply defaults", () => { expect(chartDef.plotConfig.y2!.max).toBe(300); }); + it("y2 max defaults to y2 series max with bad values", () => { + + const inputChartDef: any = { + data: testDataWithBadValues, + plotConfig: { + y: { + }, + y2: { + }, + }, + axisMap: { + y2: [ + { + series: "a", + }, + { + series: "b", + }, + ], + }, + }; + + const chartDef = applyDefaults(inputChartDef); + expect(chartDef.plotConfig.y2!.max).toBe(300); + }); + it("min/max not computed for non number data", () => { const data = { From d34eb06db4969359ecab41c35ce83e318fdfd7ee Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sun, 28 Apr 2019 11:44:01 +1000 Subject: [PATCH 02/28] Added a new example. --- examples/STW.csv | 760 +++++++++++++++++++++++++++++++++++++ examples/example-11.ts | 31 ++ examples/package-lock.json | 59 +++ examples/package.json | 2 + examples/run.bat | 3 +- 5 files changed, 854 insertions(+), 1 deletion(-) create mode 100644 examples/STW.csv create mode 100644 examples/example-11.ts diff --git a/examples/STW.csv b/examples/STW.csv new file mode 100644 index 0000000..de55dc5 --- /dev/null +++ b/examples/STW.csv @@ -0,0 +1,760 @@ +date,open,high,low,close,volume +2/01/2015,50.03,50.4,50.03,50.4,84844 +5/01/2015,50.69,50.73,50.32,50.65,42645 +6/01/2015,50.18,50.18,49.46,49.77,232437 +7/01/2015,49.88,49.88,49.3,49.63,58253 +8/01/2015,49.9,50.05,49.74,49.77,83496 +9/01/2015,49.93,50.69,49.93,50.69,46818 +12/01/2015,50.26,50.51,50.24,50.28,55655 +13/01/2015,49.91,50.22,49.79,49.99,117553 +14/01/2015,50,50.09,49.53,49.6,36094 +15/01/2015,49.51,49.51,49.12,49.39,47060 +16/01/2015,49.2,49.39,48.8,49.08,135653 +19/01/2015,49.58,49.82,49.11,49.19,67519 +20/01/2015,49.24,49.24,48.99,49.24,72647 +21/01/2015,49.5,50,49.48,49.98,48733 +22/01/2015,50.31,50.45,50.11,50.2,149185 +23/01/2015,50.78,51,50.66,51,126883 +27/01/2015,51.04,51.47,50.99,51.32,222744 +28/01/2015,51.18,51.53,51.14,51.44,59821 +29/01/2015,51.19,51.69,51.09,51.57,115067 +30/01/2015,51.81,52.1,51.79,51.82,175872 +2/02/2015,51.84,52.29,51.8,52.08,103012 +3/02/2015,52.39,52.99,52.17,52.82,490148 +4/02/2015,53.54,53.8,53.18,53.52,200494 +5/02/2015,53.52,53.94,53.36,53.88,182557 +6/02/2015,54.03,54.26,53.83,53.89,245743 +9/02/2015,53.79,53.92,53.57,53.92,129986 +10/02/2015,54.01,54.01,53.58,53.78,40312 +11/02/2015,54,54,53.37,53.51,64443 +12/02/2015,53.92,53.92,53.22,53.35,93260 +13/02/2015,53.75,54.65,53.75,54.53,450344 +16/02/2015,54.61,54.71,54.15,54.58,109518 +17/02/2015,54.37,54.64,54.27,54.41,191610 +18/02/2015,54.79,54.98,54.43,54.91,153915 +19/02/2015,55,55.31,54.75,54.93,141390 +20/02/2015,55.01,55.01,54.58,54.63,44591 +23/02/2015,54.86,55.01,54.59,54.94,61687 +24/02/2015,55.02,55.22,54.8,55.21,63450 +25/02/2015,55.28,55.59,55.21,55.43,98839 +26/02/2015,55.43,55.43,55.05,55.11,99926 +27/02/2015,55.24,55.55,54.84,55.42,67964 +2/03/2015,55.48,55.94,55.37,55.62,109107 +3/03/2015,55.85,56.09,55.22,55.45,106674 +4/03/2015,55.63,55.63,55.13,55.2,137470 +5/03/2015,55.07,55.28,54.9,55.28,237175 +6/03/2015,55.47,55.53,54.94,55.14,63024 +9/03/2015,54.9,54.9,54.4,54.43,70103 +10/03/2015,54.76,54.79,54.36,54.61,141506 +11/03/2015,54.16,54.43,53.9,54.27,59723 +12/03/2015,54.17,54.92,54.17,54.92,99904 +13/03/2015,54.95,54.98,54.33,54.5,38244 +16/03/2015,54.38,54.52,54.05,54.43,38327 +17/03/2015,54.9,55.01,54.73,54.78,161812 +18/03/2015,54.67,54.79,54.43,54.76,67793 +19/03/2015,55.3,55.9,55.3,55.82,532261 +20/03/2015,55.76,56.17,55.74,56.17,143862 +23/03/2015,56.17,56.27,55.82,55.92,72589 +24/03/2015,55.86,56.15,55.86,56.06,56683 +25/03/2015,56,56.24,55.95,56.11,67146 +26/03/2015,55.67,55.67,55.15,55.15,82754 +27/03/2015,55.06,55.74,55.06,55.57,40953 +30/03/2015,55.2,55.21,54.66,54.82,197036 +31/03/2015,55.5,55.72,55.27,55.36,126468 +1/04/2015,54.92,55.31,54.83,55.04,187449 +2/04/2015,55.14,55.43,54.58,55.31,52939 +7/04/2015,55.76,56.15,55.32,55.55,123909 +8/04/2015,55.64,56.13,55.64,56,74101 +9/04/2015,56.05,56.05,55.66,55.67,77246 +10/04/2015,55.95,56.05,55.66,55.98,29926 +13/04/2015,56.15,56.32,55.91,56,81870 +14/04/2015,55.85,55.89,55.66,55.79,97128 +15/04/2015,55.88,55.96,55.31,55.48,82100 +16/04/2015,55.85,56.04,55.68,55.84,52935 +17/04/2015,55.82,55.82,55.08,55.16,73444 +20/04/2015,54.99,54.99,54.55,54.84,201005 +21/04/2015,55.26,55.34,54.98,55.09,86550 +22/04/2015,55.15,55.16,54.6,54.72,36209 +23/04/2015,54.85,54.95,54.69,54.82,74827 +24/04/2015,55.21,55.77,55.21,55.74,294994 +27/04/2015,55.86,56.24,55.86,56.24,147112 +28/04/2015,56.29,56.29,55.87,55.87,111248 +29/04/2015,55.66,55.71,54.81,54.81,91594 +30/04/2015,54.37,54.45,53.97,54.38,166594 +1/05/2015,54.28,54.65,54.11,54.58,183600 +4/05/2015,54.71,54.93,54.39,54.66,90645 +5/05/2015,55.19,55.47,54.46,54.64,154445 +6/05/2015,54.12,54.15,53.45,53.45,166968 +7/05/2015,53,53.08,52.46,52.81,161375 +8/05/2015,53.26,53.43,52.82,52.94,278166 +11/05/2015,53.4,53.6,52.69,52.7,74368 +12/05/2015,52.84,53.46,52.7,53.32,81167 +13/05/2015,53.59,53.89,53.44,53.88,190110 +14/05/2015,53.64,53.68,53.35,53.68,40719 +15/05/2015,54.18,54.29,53.82,54.09,82532 +18/05/2015,54.1,54.37,53.39,53.39,63160 +19/05/2015,53.66,53.66,53,53.17,154215 +20/05/2015,53,53.1,52.68,53.01,149783 +21/05/2015,53.05,53.55,53.05,53.46,118234 +22/05/2015,53.77,53.77,53.43,53.54,55232 +25/05/2015,53.53,54.19,53.53,54,85101 +26/05/2015,54.08,54.55,54.08,54.5,115497 +27/05/2015,54.23,54.31,53.95,54.09,204683 +28/05/2015,54.4,54.4,53.74,53.96,351645 +29/05/2015,54.26,54.92,54.23,54.63,609757 +1/06/2015,54.28,54.34,53.64,54.13,112478 +2/06/2015,54.31,54.48,53.23,53.23,362866 +3/06/2015,53.11,53.11,52.63,52.66,369552 +4/06/2015,52.92,52.92,51.96,52.01,157170 +5/06/2015,51.84,52.21,51.64,51.97,125166 +9/06/2015,51.98,52.18,51.61,51.65,126317 +10/06/2015,51.72,51.79,51.5,51.77,153806 +11/06/2015,52.13,52.5,52.03,52.43,116872 +12/06/2015,52.49,52.49,52.18,52.36,160967 +15/06/2015,52.09,52.31,51.85,52.27,250347 +16/06/2015,52.41,52.67,52.2,52.3,242950 +17/06/2015,52.59,52.97,52.59,52.88,124973 +18/06/2015,52.85,52.85,51.91,52.13,94646 +19/06/2015,52.7,53.05,52.64,52.85,186882 +22/06/2015,52.86,53.03,52.55,53.03,87010 +23/06/2015,53.44,53.78,53.44,53.67,173947 +24/06/2015,53.77,53.93,53.66,53.78,131740 +25/06/2015,53.63,53.63,53.21,53.21,346128 +26/06/2015,52.01,52.37,51.62,52.2,652266 +29/06/2015,51.52,51.55,50.57,50.75,269162 +30/06/2015,50.35,51.01,50.35,50.94,248618 +1/07/2015,50.95,51.5,50.95,51.5,93127 +2/07/2015,51.68,52.4,51.57,52.26,209136 +3/07/2015,52.27,52.27,51.23,51.61,110390 +6/07/2015,50.84,51.28,50.7,51.08,137924 +7/07/2015,51.46,52.16,51.4,52.05,282704 +8/07/2015,51.59,51.86,51.07,51.07,101683 +9/07/2015,50.66,51.26,50.21,51.09,231648 +10/07/2015,51.36,51.6,51.21,51.26,67073 +13/07/2015,51.28,51.72,50.89,51.09,59989 +14/07/2015,51.93,52.16,51.85,52.06,119927 +15/07/2015,52.13,52.63,52.13,52.55,78847 +16/07/2015,52.95,53.12,52.7,52.88,362962 +17/07/2015,53.13,53.14,52.7,52.94,209485 +20/07/2015,52.86,53.07,52.71,53.02,66593 +21/07/2015,53.25,53.4,53.08,53.27,147358 +22/07/2015,52.86,52.88,52.38,52.42,183646 +23/07/2015,52.36,52.42,52.09,52.16,110030 +24/07/2015,51.87,52.3,51.73,51.91,219209 +27/07/2015,51.65,52.13,51.65,52.13,176722 +28/07/2015,51.65,52.32,51.53,52.09,212572 +29/07/2015,52.7,52.75,52.49,52.52,84266 +30/07/2015,52.8,52.98,52.72,52.92,74214 +31/07/2015,53.02,53.21,53.02,53.16,54302 +3/08/2015,53.25,53.25,52.91,52.93,36108 +4/08/2015,52.95,53.48,52.8,53.15,1688292 +5/08/2015,53,53.05,52.6,52.91,75879 +6/08/2015,52.61,52.61,52.09,52.24,100817 +7/08/2015,51.57,51.64,51.1,51.1,157327 +10/08/2015,50.99,51.45,50.9,51.39,80049 +11/08/2015,51.88,51.88,50.98,51.12,111183 +12/08/2015,50.9,51.29,49.9,50.18,217338 +13/08/2015,50.25,50.74,50.16,50.3,155905 +14/08/2015,50.22,50.42,49.86,49.95,108244 +17/08/2015,50.2,50.47,50.1,50.16,88846 +18/08/2015,50.27,50.53,49.72,49.72,91195 +19/08/2015,49.97,50.48,49.97,50.42,177197 +20/08/2015,49.98,49.98,49.43,49.52,149238 +21/08/2015,48.98,49.22,48.45,48.87,857218 +24/08/2015,47.9,48.01,46.9,46.95,520584 +25/08/2015,45.73,48.45,45.73,48.25,358173 +26/08/2015,47.31,48.77,47.16,48.6,185321 +27/08/2015,49.37,49.6,49.2,49.27,185726 +28/08/2015,50,50.02,49.22,49.5,115882 +31/08/2015,49.2,49.3,48.55,48.99,94430 +1/09/2015,48.77,48.98,47.92,47.95,270532 +2/09/2015,47.5,48.07,47.23,48.05,239482 +3/09/2015,48.53,48.85,47.44,47.45,129001 +4/09/2015,47.56,47.87,47.1,47.53,112249 +7/09/2015,47.53,47.65,46.95,47.55,244516 +8/09/2015,47.8,48.3,47.75,48.3,141573 +9/09/2015,48.83,49.49,48.83,49.49,116558 +10/09/2015,48.43,48.56,48.17,48.25,147559 +11/09/2015,48.22,48.36,47.69,47.89,93436 +14/09/2015,48.6,48.6,47.99,48.22,77721 +15/09/2015,48.38,48.46,47.49,47.53,69584 +16/09/2015,48.01,48.32,47.73,48.32,69888 +17/09/2015,49.01,49.2,48.66,48.69,67261 +18/09/2015,48.52,49.2,48.21,48.94,79896 +21/09/2015,48.09,48.12,47.56,47.97,521925 +22/09/2015,48.54,49.35,47.95,48.23,81783 +23/09/2015,47.64,47.83,47.22,47.31,123568 +24/09/2015,47.5,48.01,47.5,48,65657 +25/09/2015,48.32,48.43,47.68,47.81,174716 +28/09/2015,47.7,48.43,47.66,48.43,165321 +29/09/2015,47.37,47.37,46.63,46.63,300714 +30/09/2015,46.74,47.58,46.68,47.58,291885 +1/10/2015,47.69,48.49,47.69,48.43,284705 +2/10/2015,47.93,48.49,47.75,47.85,75299 +5/10/2015,48.51,48.82,48.29,48.74,73777 +6/10/2015,49.2,49.45,48.95,48.95,175631 +7/10/2015,49.16,49.26,48.65,49.23,129193 +8/10/2015,49.65,49.84,49.3,49.39,140182 +9/10/2015,49.92,50.08,49.7,49.98,170767 +12/10/2015,49.8,49.91,49.48,49.6,177995 +13/10/2015,49.45,49.5,49,49.25,122001 +14/10/2015,49,49.26,48.88,49.2,264584 +15/10/2015,49.27,49.64,49.24,49.51,315810 +16/10/2015,49.95,50.24,49.83,49.99,147912 +19/10/2015,50,50.13,49.76,49.84,191563 +20/10/2015,49.71,49.83,49.45,49.57,105974 +21/10/2015,49.36,49.81,49.18,49.66,109832 +22/10/2015,49.58,49.85,49.41,49.84,50437 +23/10/2015,50.73,50.9,50.63,50.66,93239 +26/10/2015,50.99,51.05,50.66,50.66,238059 +27/10/2015,50.69,50.8,50.63,50.73,53195 +28/10/2015,50.68,50.7,50.37,50.53,57863 +29/10/2015,50.74,50.74,49.8,49.87,73976 +30/10/2015,49.6,49.87,49.25,49.65,559853 +2/11/2015,49.72,49.74,48.88,48.96,83675 +3/11/2015,49.38,49.75,49.2,49.66,51788 +4/11/2015,50.12,50.4,49.63,49.66,85414 +5/11/2015,49.74,49.74,49.05,49.26,56114 +6/11/2015,49.44,49.69,49.02,49.59,268615 +9/11/2015,49.31,49.36,48.52,48.68,492733 +10/11/2015,48.49,48.5,47.98,48.45,197223 +11/11/2015,48.53,48.9,48.52,48.9,170693 +12/11/2015,48.61,49.11,48.43,48.91,115391 +13/11/2015,48.12,48.26,47.75,48.14,274148 +16/11/2015,47.42,47.95,47.25,47.76,355250 +17/11/2015,48.12,48.83,48.06,48.83,146795 +18/11/2015,48.56,49.1,48.52,48.96,90718 +19/11/2015,49.47,50.01,49.26,50,1075829 +20/11/2015,50,50.27,49.93,50.13,220889 +23/11/2015,49.98,50.41,49.98,50.27,107464 +24/11/2015,49.98,50.23,49.82,49.82,107798 +25/11/2015,49.91,49.92,49.5,49.57,87757 +26/11/2015,49.52,50.14,49.51,49.69,222835 +27/11/2015,50,50.21,49.56,49.63,81902 +30/11/2015,49.63,49.7,49.3,49.33,928861 +1/12/2015,49.28,50.39,49.28,50.19,587671 +2/12/2015,50.16,50.31,49.98,50.18,254345 +3/12/2015,49.73,49.99,49.62,49.87,184740 +4/12/2015,49.12,49.13,48.8,49.13,182579 +7/12/2015,49.89,49.99,49.16,49.2,169224 +8/12/2015,48.75,49.04,48.64,48.74,90119 +9/12/2015,48.55,48.83,48.34,48.43,282599 +10/12/2015,48.32,48.43,47.61,48.06,461308 +11/12/2015,48.02,48.28,47.79,47.95,202849 +14/12/2015,47.28,47.5,47,47.02,235555 +15/12/2015,47.04,47.38,46.85,46.85,218540 +16/12/2015,47.32,47.94,47.23,47.94,189521 +17/12/2015,48.53,48.98,48.53,48.66,134994 +18/12/2015,48.02,48.81,47.93,48.69,666014 +21/12/2015,48.32,48.92,48.32,48.77,55724 +22/12/2015,49.21,49.39,48.74,48.85,89915 +23/12/2015,49.07,49.35,49.03,49.09,124156 +24/12/2015,49.59,49.75,49.47,49.57,59274 +29/12/2015,48.51,49.2,48.48,49.2,133137 +30/12/2015,49.64,49.72,49.47,49.66,107188 +31/12/2015,49.58,49.7,49.39,49.39,65504 +4/01/2016,49.35,49.75,49.09,49.16,100426 +5/01/2016,48.71,48.75,48.31,48.36,138295 +6/01/2016,48.65,48.65,47.47,47.79,70590 +7/01/2016,47.74,47.8,46.58,46.74,3419969 +8/01/2016,46.34,46.91,45.9,46.55,146740 +11/01/2016,45.86,46.07,45.51,46.07,416884 +12/01/2016,46.02,46.46,45.75,45.96,92970 +13/01/2016,46.07,46.64,46.03,46.57,131700 +14/01/2016,45.59,46,45.38,45.77,259557 +15/01/2016,46.52,46.67,45.43,45.65,111868 +18/01/2016,45.03,45.38,44.77,45.36,168264 +19/01/2016,45.36,45.78,45.15,45.72,138991 +20/01/2016,45.7,45.98,45.11,45.19,82582 +21/01/2016,45.72,46.04,45.38,45.42,204792 +22/01/2016,45.85,46.03,45.62,45.92,61825 +25/01/2016,46.5,46.74,46.34,46.71,197060 +27/01/2016,46.59,46.63,46.11,46.17,119281 +28/01/2016,46.16,46.59,45.79,46.47,189609 +29/01/2016,46.46,46.9,46.18,46.67,106853 +1/02/2016,47.14,47.34,46.93,47.09,431855 +2/02/2016,47.1,47.1,46.46,46.61,413527 +3/02/2016,45.98,46.16,45.45,45.53,67584 +4/02/2016,45.99,46.57,45.92,46.39,60857 +5/02/2016,46.47,46.47,46.02,46.41,76714 +8/02/2016,46.12,46.5,45.98,46.4,89291 +9/02/2016,45.8,45.8,45.03,45.05,132241 +10/02/2016,45.26,45.26,43.89,44.55,220578 +11/02/2016,44.78,45.06,44.55,45.06,80621 +12/02/2016,44.63,44.89,44.45,44.56,136304 +15/02/2016,45.22,45.37,44.73,45.25,112539 +16/02/2016,45.7,45.99,45.11,45.99,189800 +17/02/2016,46.01,46.15,45.58,45.69,97638 +18/02/2016,46.39,46.8,46.36,46.75,124696 +19/02/2016,46.66,46.72,46.2,46.38,54519 +22/02/2016,46.38,46.92,46.34,46.89,411353 +23/02/2016,47.11,47.27,46.55,46.68,148659 +24/02/2016,46.35,46.35,45.61,45.73,141601 +25/02/2016,46.08,46.17,45.5,45.83,78133 +26/02/2016,46.02,46.02,45.46,45.79,47895 +29/02/2016,45.97,46.32,45.82,45.9,186317 +1/03/2016,45.85,46.44,45.84,46.37,99427 +2/03/2016,47.09,47.63,46.97,47.32,189661 +3/03/2016,47.51,47.94,47.47,47.9,206361 +4/03/2016,48,48.13,47.91,47.96,128352 +7/03/2016,48.38,48.59,48.32,48.55,304424 +8/03/2016,48.8,48.86,48.12,48.19,98606 +9/03/2016,48,48.68,47.96,48.68,82090 +10/03/2016,48.8,48.89,48.62,48.65,91683 +11/03/2016,48.7,48.96,48.36,48.81,287935 +14/03/2016,49.14,49.26,48.9,48.93,301297 +15/03/2016,48.86,48.9,48.24,48.29,95182 +16/03/2016,48.2,48.4,48.08,48.34,262177 +17/03/2016,48.82,49.08,48.59,48.82,67087 +18/03/2016,49.21,49.35,48.88,48.93,104168 +21/03/2016,48.97,49.14,48.63,48.78,52919 +22/03/2016,49.05,49.05,48.66,48.83,37928 +23/03/2016,48.81,48.81,48.4,48.66,54039 +24/03/2016,48.24,48.25,47.91,48.05,107571 +29/03/2016,48.12,48.2,47.22,47.22,57222 +30/03/2016,47.73,47.8,47.13,47.3,115795 +31/03/2016,47.88,48.2,47.83,48.01,103122 +1/04/2016,47.7,47.7,47,47.26,187427 +4/04/2016,47.37,47.73,47.21,47.23,64916 +5/04/2016,47.15,47.15,46.39,46.52,129453 +6/04/2016,46.41,46.89,46.39,46.75,458544 +7/04/2016,46.91,47.13,46.81,46.91,81273 +8/04/2016,46.45,46.81,46.24,46.66,82649 +11/04/2016,46.77,46.77,46.42,46.58,62949 +12/04/2016,46.49,47.04,46.49,47,118217 +13/04/2016,47.39,47.77,47.39,47.76,94119 +14/04/2016,48.05,48.41,47.94,48.33,209547 +15/04/2016,48.35,48.76,48.34,48.73,226737 +18/04/2016,48.43,48.74,48.4,48.55,132793 +19/04/2016,49.12,49.34,49,49.02,107127 +20/04/2016,49.35,49.52,49.15,49.29,91333 +21/04/2016,49.94,50.04,49.64,49.84,150894 +22/04/2016,49.47,49.84,49.43,49.5,60204 +26/04/2016,49.36,49.63,49.25,49.28,294198 +27/04/2016,49.52,49.9,48.91,49.03,89959 +28/04/2016,49.35,49.49,49.2,49.36,57640 +29/04/2016,49.38,49.69,49.26,49.66,112226 +2/05/2016,49.44,49.56,48.96,49.56,67709 +3/05/2016,49.19,50.67,49.19,50.6,149321 +4/05/2016,50.29,50.43,49.8,49.8,190841 +5/05/2016,49.74,50.01,49.61,49.86,61112 +6/05/2016,49.54,50,49.11,49.95,39931 +9/05/2016,50.05,50.4,49.85,50.39,344185 +10/05/2016,50.25,50.61,50.09,50.6,302161 +11/05/2016,50.95,51.43,50.81,50.89,359673 +12/05/2016,50.71,50.89,50.66,50.84,163862 +13/05/2016,50.93,50.98,50.39,50.59,56220 +16/05/2016,50.5,51,50.5,50.84,145305 +17/05/2016,51.2,51.34,51.12,51.31,74938 +18/05/2016,51.09,51.3,50.87,50.92,42234 +19/05/2016,51.09,51.09,50.45,50.65,40110 +20/05/2016,50.69,51.03,50.59,50.9,126197 +23/05/2016,50.98,51.06,50.45,50.61,86239 +24/05/2016,50.55,50.68,50.37,50.37,202420 +25/05/2016,51.13,51.32,50.97,51.18,111365 +26/05/2016,51.26,51.4,50.93,51.25,76249 +27/05/2016,51.41,51.65,51.41,51.44,126153 +30/05/2016,51.5,51.52,51.33,51.47,127632 +31/05/2016,51.42,51.42,51.01,51.15,80205 +1/06/2016,50.69,50.83,50.48,50.63,99569 +2/06/2016,50.67,50.69,50.14,50.2,100389 +3/06/2016,50.59,50.65,50.33,50.58,198455 +6/06/2016,50.61,51.15,50.49,50.98,160309 +7/06/2016,51.06,51.31,51,51.02,74432 +8/06/2016,50.87,51.15,50.79,51.1,58952 +9/06/2016,51.15,51.27,50.78,51.05,82129 +10/06/2016,50.64,50.72,50.36,50.56,143601 +14/06/2016,49.76,49.85,49.44,49.51,261274 +15/06/2016,49.3,49.43,49,49,91714 +16/06/2016,49.01,50,48.9,48.95,96975 +17/06/2016,49.16,49.25,48.98,49.11,178937 +20/06/2016,49.7,50.02,49.6,50.02,115817 +21/06/2016,50.01,50.35,49.92,50.16,110121 +22/06/2016,50.2,50.42,50.07,50.14,109042 +23/06/2016,50.28,50.35,50.12,50.25,807535 +24/06/2016,50.5,50.65,48.3,48.62,597139 +27/06/2016,48.52,49.04,48.28,48.86,179480 +28/06/2016,48.22,48.66,48.02,48.53,226446 +29/06/2016,48.92,49.01,47.96,48.09,246485 +30/06/2016,48.73,49.18,48.69,48.86,245095 +1/07/2016,49.1,49.5,49,49.14,364289 +4/07/2016,49.05,49.48,48.92,49.48,205382 +5/07/2016,49.56,49.56,48.92,48.93,279628 +6/07/2016,48.69,48.76,48.22,48.65,167318 +7/07/2016,49.07,49.13,48.81,48.96,118333 +8/07/2016,48.9,49.12,48.86,49.03,58278 +11/07/2016,49.63,50,49.63,50,134494 +12/07/2016,50.32,50.53,50.18,50.18,204779 +13/07/2016,50.5,50.53,50.28,50.5,139848 +14/07/2016,50.58,50.77,50.55,50.71,128745 +15/07/2016,50.8,51.1,50.78,50.87,127223 +18/07/2016,50.89,51.18,50.89,51.16,40660 +19/07/2016,51.16,51.21,50.91,51.03,114528 +20/07/2016,51.03,51.41,51.03,51.41,73043 +21/07/2016,51.84,51.87,51.56,51.67,97731 +22/07/2016,51.59,51.66,51.34,51.5,50075 +25/07/2016,51.69,52,51.69,51.83,80207 +26/07/2016,51.69,51.88,51.5,51.87,339961 +27/07/2016,52.06,52.15,51.81,51.89,133572 +28/07/2016,51.99,52.13,51.95,52.05,167017 +29/07/2016,52.06,52.2,51.88,52.13,176510 +1/08/2016,52.23,52.58,52.13,52.31,131539 +2/08/2016,52.21,52.4,51.89,51.9,256834 +3/08/2016,51.54,51.54,51.21,51.21,132956 +4/08/2016,51.41,51.57,51.31,51.32,70849 +5/08/2016,51.46,51.62,51.45,51.53,55730 +8/08/2016,51.88,51.96,51.8,51.9,84331 +9/08/2016,51.83,52.02,51.83,52,96415 +10/08/2016,51.88,51.89,51.65,51.88,146980 +11/08/2016,51.69,51.69,51.37,51.6,41990 +12/08/2016,51.97,52.05,51.65,51.87,39779 +15/08/2016,51.7,52.01,51.7,51.93,67971 +16/08/2016,51.99,52.04,51.86,51.87,43993 +17/08/2016,51.84,52.08,51.78,52.07,201657 +18/08/2016,52.22,52.22,51.72,51.78,202382 +19/08/2016,51.97,52.02,51.75,51.98,35828 +22/08/2016,51.94,52.07,51.78,51.78,98603 +23/08/2016,52.01,52.44,51.99,52.24,254196 +24/08/2016,52.48,52.49,52.35,52.42,140536 +25/08/2016,52.34,52.42,52.15,52.2,136238 +26/08/2016,52.12,52.21,51.93,51.95,30886 +29/08/2016,51.96,51.98,51.43,51.58,75809 +30/08/2016,52,52,51.68,51.74,157070 +31/08/2016,51.6,51.6,51.1,51.27,107919 +1/09/2016,51.09,51.3,51.04,51.17,76613 +2/09/2016,51.05,51.05,50.64,50.73,113184 +5/09/2016,51,51.32,50.91,51.29,92899 +6/09/2016,51.24,51.26,50.7,51.18,191607 +7/09/2016,51.19,51.45,51.11,51.32,147499 +8/09/2016,51.02,51.07,50.7,50.99,937066 +9/09/2016,50.64,50.65,50.44,50.56,47970 +12/09/2016,49.69,49.72,49.36,49.41,132606 +13/09/2016,49.91,49.95,49.32,49.36,190490 +14/09/2016,49.2,49.55,49.19,49.51,72235 +15/09/2016,49.33,49.71,49.22,49.71,56063 +16/09/2016,49.96,50.3,49.91,50.16,520160 +19/09/2016,50.08,50.28,49.91,50.19,18569 +20/09/2016,50.05,50.19,49.99,50.15,49818 +21/09/2016,50.29,50.68,50.26,50.61,1168700 +22/09/2016,50.94,51.19,50.89,51.19,168172 +23/09/2016,51.14,51.69,51.04,51.69,231852 +26/09/2016,51.28,51.53,51.26,51.45,179920 +27/09/2016,51.08,51.32,50.89,51.26,70766 +28/09/2016,51.3,51.52,51.15,51.3,186984 +29/09/2016,51.15,51.21,51.05,51.15,106871 +30/09/2016,50.79,50.96,50.65,50.85,68999 +3/10/2016,51.01,51.36,51.01,51.23,46863 +4/10/2016,51.21,51.32,50.99,51.32,65067 +5/10/2016,51.1,51.1,50.88,50.98,1181370 +6/10/2016,51.13,51.31,51.13,51.26,99996 +7/10/2016,51.38,51.41,51.04,51.12,60136 +10/10/2016,51.26,51.39,51.16,51.21,102948 +11/10/2016,51.4,51.42,51.22,51.25,154236 +12/10/2016,50.86,51.16,50.8,51.16,39818 +13/10/2016,50.97,50.97,50.69,50.8,72815 +14/10/2016,50.86,50.9,50.79,50.79,61743 +17/10/2016,50.71,50.84,50.4,50.4,72976 +18/10/2016,50.43,50.64,50.36,50.61,140981 +19/10/2016,50.83,50.85,50.7,50.81,119927 +20/10/2016,50.91,51,50.78,50.91,132449 +21/10/2016,50.89,50.91,50.58,50.76,29515 +24/10/2016,50.75,50.75,50.26,50.55,90202 +25/10/2016,50.67,51.04,50.67,50.88,39062 +26/10/2016,50.46,50.52,49.96,50.09,88945 +27/10/2016,50.1,50.1,49.54,49.54,72287 +28/10/2016,49.51,49.57,49.19,49.41,67229 +31/10/2016,49.35,49.81,49.35,49.73,153218 +1/11/2016,49.46,49.49,49.3,49.45,141468 +2/11/2016,49.04,49.1,48.7,48.86,112783 +3/11/2016,48.57,49,48.55,48.89,170312 +4/11/2016,48.6,48.73,48.5,48.52,223444 +7/11/2016,48.8,49.21,48.77,49.19,365158 +8/11/2016,49.42,49.49,49.16,49.29,282270 +9/11/2016,49.52,49.8,47.31,48.34,532102 +10/11/2016,49.77,49.97,49.6,49.97,138024 +11/11/2016,50.09,50.36,50.03,50.36,89682 +14/11/2016,50.33,50.36,50,50.27,74220 +15/11/2016,50.13,50.16,49.92,50.12,77609 +16/11/2016,50.3,50.32,50.04,50.11,126695 +17/11/2016,49.78,50.26,49.74,50.23,36271 +18/11/2016,50.33,50.5,50.29,50.45,83968 +21/11/2016,50.37,50.51,50.21,50.36,252269 +22/11/2016,50.7,51.1,50.7,50.99,210273 +23/11/2016,50.99,51.69,50.96,51.66,190707 +24/11/2016,51.79,51.81,51.53,51.64,126501 +25/11/2016,51.73,52,51.6,51.81,281121 +28/11/2016,51.86,51.86,51.48,51.48,35884 +29/11/2016,51.42,51.66,51.38,51.39,55936 +30/11/2016,51.34,51.41,51.07,51.13,16624 +1/12/2016,51.54,51.8,51.38,51.8,183287 +2/12/2016,51.66,51.69,51.26,51.26,42619 +5/12/2016,51.16,51.16,50.67,50.83,86763 +6/12/2016,51.17,51.29,51.05,51.11,45096 +7/12/2016,51.36,51.59,51.31,51.59,192107 +8/12/2016,51.98,52.24,51.97,52.18,248205 +9/12/2016,52.25,52.39,52.15,52.33,59490 +12/12/2016,52.35,52.56,52.27,52.36,118451 +13/12/2016,52.23,52.47,52.18,52.23,44062 +14/12/2016,52.34,52.69,52.34,52.6,68345 +15/12/2016,52.27,52.38,51.95,52.15,74705 +16/12/2016,52.18,52.26,51.9,52.06,125867 +19/12/2016,52.13,52.53,52.13,52.36,215616 +20/12/2016,52.35,52.83,52.35,52.64,80105 +21/12/2016,52.79,53.01,52.79,52.85,67650 +22/12/2016,52.83,53.16,52.8,53.14,39371 +23/12/2016,53.16,53.2,52.92,52.96,39387 +28/12/2016,53.27,53.62,53.27,53.56,54578 +29/12/2016,53.01,53.26,52.89,53.26,55770 +30/12/2016,53.11,53.14,52.91,52.92,39828 +3/01/2017,52.97,53.61,52.97,53.57,68555 +4/01/2017,53.56,53.61,53.5,53.55,98428 +5/01/2017,53.71,53.79,53.69,53.73,61875 +6/01/2017,53.75,53.83,53.66,53.74,137648 +9/01/2017,53.82,54.43,53.82,54.26,186224 +10/01/2017,54.01,54.06,53.63,53.76,912441 +11/01/2017,54,54.1,53.84,53.89,319514 +12/01/2017,54.08,54.16,53.79,53.85,395370 +13/01/2017,53.94,53.94,53.32,53.44,555994 +16/01/2017,53.63,53.77,53.63,53.68,85093 +17/01/2017,53.51,53.51,53.18,53.23,135002 +18/01/2017,52.99,53.02,52.84,53.02,120814 +19/01/2017,53.26,53.41,53.01,53.09,166502 +20/01/2017,52.89,52.91,52.73,52.86,266201 +23/01/2017,53.09,53.13,52.34,52.41,110203 +24/01/2017,52.5,52.79,52.41,52.75,370169 +25/01/2017,53.14,53.2,52.84,52.98,71896 +27/01/2017,53.14,53.38,53.01,53.32,862705 +30/01/2017,53.11,53.11,52.73,52.87,72995 +31/01/2017,52.63,52.66,52.34,52.51,80180 +1/02/2017,52.6,52.8,52.41,52.78,35496 +2/02/2017,52.98,53,52.6,52.73,54425 +3/02/2017,52.68,52.9,52.45,52.48,101418 +6/02/2017,52.73,52.87,52.35,52.44,50817 +7/02/2017,52.35,52.5,52.14,52.5,61019 +8/02/2017,52.52,52.84,52.52,52.81,27412 +9/02/2017,52.88,52.98,52.63,52.92,35786 +10/02/2017,53.28,53.47,53.2,53.45,115234 +13/02/2017,53.57,53.9,53.55,53.82,76093 +14/02/2017,54.08,54.18,53.8,53.83,260753 +15/02/2017,54.13,54.38,54.11,54.3,60604 +16/02/2017,54.43,54.52,54.15,54.38,53953 +17/02/2017,54.38,54.39,54.21,54.26,38660 +20/02/2017,54.35,54.35,54.08,54.21,33609 +21/02/2017,54.32,54.32,54.08,54.2,47436 +22/02/2017,54.42,54.49,54.26,54.49,54677 +23/02/2017,54.32,54.44,54.13,54.35,36872 +24/02/2017,54.28,54.28,53.84,53.91,36949 +27/02/2017,53.8,53.94,53.65,53.76,279430 +28/02/2017,53.86,54.1,53.72,53.72,105432 +1/03/2017,53.59,53.68,53.41,53.68,376923 +2/03/2017,54.3,54.43,54.28,54.43,158410 +3/03/2017,54.05,54.05,53.83,53.95,73535 +6/03/2017,54.04,54.17,53.87,54.16,72175 +7/03/2017,54.03,54.46,53.95,54.33,57454 +8/03/2017,54.22,54.34,54.13,54.34,852373 +9/03/2017,54.22,54.44,54.1,54.24,1791811 +10/03/2017,54.45,54.65,54.37,54.57,137946 +13/03/2017,54.58,54.59,54.29,54.38,158850 +14/03/2017,54.59,54.67,54.29,54.42,49425 +15/03/2017,54.31,54.61,54.14,54.61,46276 +16/03/2017,54.89,54.94,54.49,54.67,111741 +17/03/2017,54.74,54.99,54.71,54.84,44027 +20/03/2017,54.51,54.72,54.5,54.57,39768 +21/03/2017,54.44,54.65,54.37,54.6,30034 +22/03/2017,54.01,54.03,53.68,53.72,96647 +23/03/2017,53.85,53.97,53.77,53.94,66115 +24/03/2017,54.07,54.56,54.07,54.37,1581130 +27/03/2017,53.99,54.35,53.88,54.32,91760 +28/03/2017,54.55,55.08,54.54,55.04,305012 +29/03/2017,55.19,55.58,55.19,55.51,165791 +30/03/2017,55.27,55.37,55.18,55.33,271098 +31/03/2017,55.28,55.4,55.04,55.04,217408 +3/04/2017,55.01,55.13,54.83,55.1,259221 +4/04/2017,55.06,55.08,54.87,55,90758 +5/04/2017,55.12,55.2,54.86,55.12,57918 +6/04/2017,54.97,55.01,54.75,54.98,41662 +7/04/2017,55.15,55.3,54.81,55.03,106324 +10/04/2017,55.26,55.49,55.26,55.49,76290 +11/04/2017,55.42,55.88,55.38,55.7,63428 +12/04/2017,55.74,55.82,55.54,55.69,284332 +13/04/2017,55.39,55.42,55.22,55.32,86410 +18/04/2017,55.2,55.22,54.69,54.82,90535 +19/04/2017,54.55,54.67,54.38,54.51,197912 +20/04/2017,54.68,54.69,54.56,54.63,62077 +21/04/2017,54.96,55.11,54.93,55.02,256180 +24/04/2017,55.24,55.4,54.98,55.12,156150 +26/04/2017,55.57,55.66,55.5,55.52,45117 +27/04/2017,55.55,55.66,55.49,55.6,51041 +28/04/2017,55.44,55.61,55.32,55.61,205787 +1/05/2017,55.53,55.9,55.53,55.9,116355 +2/05/2017,55.87,55.87,55.57,55.83,85744 +3/05/2017,55.75,55.85,55.23,55.32,69190 +4/05/2017,55.41,55.42,54.98,55.17,106615 +5/05/2017,55.15,55.21,54.7,54.81,101735 +8/05/2017,55.41,55.41,55.12,55.23,110364 +9/05/2017,55.14,55.15,54.86,54.91,283425 +10/05/2017,54.8,55.38,54.65,55.26,152004 +11/05/2017,55.47,55.71,55.27,55.28,142702 +12/05/2017,55.05,55.29,54.66,54.86,213193 +15/05/2017,54.6,54.97,54.6,54.92,91040 +16/05/2017,55.16,55.37,54.99,55.15,118100 +17/05/2017,54.98,55,54.51,54.55,135292 +18/05/2017,54.01,54.2,53.81,54.2,169774 +19/05/2017,54.16,54.16,53.9,54.08,97074 +22/05/2017,54.39,54.59,54.37,54.51,68114 +23/05/2017,54.57,54.79,54.36,54.4,89593 +24/05/2017,54.6,54.62,54.37,54.51,69080 +25/05/2017,54.66,54.72,54.36,54.71,72234 +26/05/2017,54.58,54.58,54.23,54.34,145437 +29/05/2017,54.41,54.41,53.91,53.91,117036 +30/05/2017,53.97,54.08,53.63,54.07,181787 +31/05/2017,54.08,54.23,53.94,54.08,66419 +1/06/2017,54,54.22,53.95,54.16,137076 +2/06/2017,54.55,54.75,54.46,54.73,57738 +5/06/2017,54.56,54.56,54.2,54.37,74770 +6/06/2017,54.12,54.12,53.53,53.53,66920 +7/06/2017,53.59,53.66,53.31,53.54,227952 +8/06/2017,53.25,53.64,53.18,53.62,175591 +9/06/2017,53.39,53.79,53.39,53.66,234085 +13/06/2017,53.78,54.57,53.71,54.57,81379 +14/06/2017,54.63,55.18,54.63,55.15,665761 +15/06/2017,54.76,54.82,54.33,54.42,75085 +16/06/2017,54.52,54.75,54.42,54.52,86525 +19/06/2017,54.49,54.9,54.49,54.86,102523 +20/06/2017,54.81,54.88,54.41,54.41,95570 +21/06/2017,53.79,53.79,53.5,53.53,132398 +22/06/2017,53.64,54.1,53.63,53.94,1695087 +23/06/2017,54.04,54.09,53.81,54,97471 +26/06/2017,54.1,54.35,53.99,54.08,73590 +27/06/2017,54.08,54.08,53.68,53.99,516016 +28/06/2017,53.85,54.44,53.85,54.38,229361 +29/06/2017,54.21,54.67,54.21,54.49,142386 +30/06/2017,53.97,54.25,53.56,53.56,243084 +3/07/2017,53.54,53.68,53.22,53.23,73371 +4/07/2017,53.74,54.26,53.74,54.17,99596 +5/07/2017,54.18,54.18,53.89,54.08,55548 +6/07/2017,54,54,53.75,53.96,23071 +7/07/2017,53.46,53.53,53.16,53.39,121412 +10/07/2017,53.65,53.83,53.57,53.65,162196 +11/07/2017,53.72,53.8,53.39,53.69,97647 +12/07/2017,53.56,53.58,53.05,53.14,118003 +13/07/2017,53.65,53.78,53.49,53.78,50151 +14/07/2017,53.85,54.13,53.835,53.91,96521 +17/07/2017,53.8,54.09,53.71,53.9,285374 +18/07/2017,53.88,53.95,53.16,53.27,100416 +19/07/2017,53.73,53.82,53.4,53.7,127641 +20/07/2017,53.97,54.01,53.85,53.94,117423 +21/07/2017,53.64,53.92,53.43,53.58,144145 +24/07/2017,53.31,53.31,52.95,53.23,91267 +25/07/2017,53.36,53.8,53.36,53.63,98962 +26/07/2017,54.09,54.21,54.09,54.11,63783 +27/07/2017,54.15,54.32,54.14,54.19,85021 +28/07/2017,53.89,53.89,53.3,53.35,97278 +31/07/2017,53.45,53.82,53.4,53.58,86856 +1/08/2017,53.53,54.1,53.5,54.06,56194 +2/08/2017,54.2,54.2,53.71,53.8,44773 +3/08/2017,53.82,53.82,53.45,53.67,70605 +4/08/2017,53.5,53.76,53.48,53.6,31443 +7/08/2017,53.9,54.17,53.9,54.06,83681 +8/08/2017,54.2,54.28,53.59,53.81,125460 +9/08/2017,53.7,54.13,53.66,54.02,79709 +10/08/2017,54.06,54.32,53.83,53.95,100586 +11/08/2017,53.65,53.65,53.21,53.4,206927 +14/08/2017,53.67,53.78,53.5,53.73,92538 +15/08/2017,54.05,54.19,53.96,53.99,171919 +16/08/2017,54,54.4,53.87,54.4,98064 +17/08/2017,54.61,54.61,54.21,54.33,55468 +18/08/2017,53.72,54.09,53.69,54.07,116179 +21/08/2017,54.02,54.04,53.59,53.82,161670 +22/08/2017,53.95,54.17,53.95,54.15,698261 +23/08/2017,54.51,54.58,53.89,54.02,85588 +24/08/2017,53.95,54.23,53.82,54.09,189374 +25/08/2017,54.15,54.2,53.94,54.14,92502 +28/08/2017,54.14,54.14,53.73,53.82,92787 +29/08/2017,53.62,53.62,53.23,53.45,111494 +30/08/2017,53.67,53.67,53.38,53.54,63560 +31/08/2017,53.74,53.96,53.67,53.93,33524 +1/09/2017,54.08,54.2,53.85,54.06,88373 +4/09/2017,54.01,54.01,53.75,53.88,48257 +5/09/2017,53.99,54,53.54,53.88,54425 +6/09/2017,53.71,53.9,53.57,53.8,51479 +7/09/2017,54.03,54.17,53.8,53.81,54210 +8/09/2017,53.99,53.99,53.64,53.76,40978 +11/09/2017,53.98,54.27,53.98,54.18,121492 +12/09/2017,54.44,54.66,54.38,54.48,50239 +13/09/2017,54.82,54.82,54.49,54.5,101023 +14/09/2017,54.47,54.53,54.36,54.4,31953 +15/09/2017,54.25,54.28,53.95,54.05,181486 +18/09/2017,54.2,54.38,54.2,54.29,92985 +19/09/2017,54.37,54.48,54.21,54.21,89168 +20/09/2017,54.1,54.22,53.9,54.15,98350 +21/09/2017,54.15,54.15,53.5,53.69,97335 +22/09/2017,53.87,53.98,53.71,53.95,60350 +25/09/2017,54.19,54.2,53.93,53.97,33898 +26/09/2017,54.08,54.13,53.83,53.85,79402 +27/09/2017,53.98,53.98,53.6,53.78,84591 +28/09/2017,53.25,53.36,52.91,52.98,222531 +29/09/2017,53.02,53.15,52.8,53.06,61870 +2/10/2017,53.33,53.75,53.28,53.6,61675 +3/10/2017,53.65,53.65,53.16,53.23,43539 +4/10/2017,53.26,53.26,52.77,52.79,151764 +5/10/2017,52.87,52.95,52.79,52.8,20993 +6/10/2017,53.27,53.33,53.08,53.33,131570 +9/10/2017,53.41,53.82,53.41,53.64,58591 +10/10/2017,53.44,53.72,53.44,53.58,701440 +11/10/2017,53.65,53.99,53.58,53.94,41330 +12/10/2017,53.89,54.12,53.86,54.11,90032 +13/10/2017,54.15,54.4,54.12,54.33,92674 +16/10/2017,54.56,54.71,54.55,54.63,62866 +17/10/2017,54.74,55.1,54.74,55.01,181283 +18/10/2017,54.99,55.2,54.99,55.1,66109 +19/10/2017,55.14,55.23,54.98,55.04,138271 +20/10/2017,54.85,55.37,54.85,55.18,213021 +23/10/2017,55.32,55.36,55.06,55.07,42863 +24/10/2017,55.07,55.2,55,55.12,35282 +25/10/2017,55.27,55.32,55.1,55.17,55123 +26/10/2017,55.12,55.27,54.99,55.27,69937 +27/10/2017,55.4,55.5,54.76,55.15,97473 +30/10/2017,55.4,55.42,55.22,55.31,31601 +31/10/2017,55.29,55.45,55.22,55.23,81692 +1/11/2017,55.38,55.62,55.38,55.46,101420 +2/11/2017,55.7,55.74,55.39,55.46,79999 +3/11/2017,55.6,55.78,55.53,55.72,59616 +6/11/2017,55.77,55.77,55.6,55.63,68785 +7/11/2017,55.92,56.24,55.92,56.23,67696 +8/11/2017,56.06,56.32,56.06,56.25,41631 +9/11/2017,56.44,56.67,56.38,56.63,78606 +10/11/2017,56.43,56.54,56.38,56.44,59056 +13/11/2017,56.57,56.65,56.5,56.62,110727 +14/11/2017,56.22,56.23,55.95,56.09,98522 +15/11/2017,55.88,55.96,55.74,55.74,103257 +16/11/2017,55.68,55.94,55.6,55.84,43752 +17/11/2017,56.19,56.2,55.95,55.97,47059 +20/11/2017,55.73,55.95,55.65,55.86,46987 +21/11/2017,56.07,56.1,55.89,56.06,49219 +22/11/2017,56.32,56.39,56.19,56.3,56837 +23/11/2017,56.24,56.29,56.13,56.25,50447 +24/11/2017,56.17,56.23,55.93,56.23,47310 +27/11/2017,56.15,56.45,56.15,56.31,59387 +28/11/2017,56.16,56.45,56.16,56.24,785248 +29/11/2017,56.57,56.69,56.48,56.5,165444 +30/11/2017,56.19,56.26,55.92,56.11,304441 +1/12/2017,56.33,56.46,56.2,56.31,55626 +4/12/2017,56.34,56.45,56.2,56.26,54864 +5/12/2017,55.94,56.26,55.9,56.09,66202 +6/12/2017,55.89,56.04,55.79,55.87,123299 +7/12/2017,55.96,56.28,55.91,56.25,47063 +8/12/2017,56.3,56.5,56.24,56.33,102838 +11/12/2017,56.52,56.55,56.3,56.38,44191 +12/12/2017,56.47,56.57,56.39,56.52,63047 +13/12/2017,56.6,56.67,56.41,56.58,114145 +14/12/2017,56.74,56.84,56.53,56.53,119652 +15/12/2017,56.43,56.48,56.28,56.35,70681 +18/12/2017,56.65,56.79,56.57,56.76,52818 +19/12/2017,56.95,57.17,56.95,57.06,62356 +20/12/2017,56.9,57.19,56.9,57.1,173303 +21/12/2017,56.92,56.97,56.88,56.89,422205 +22/12/2017,57.06,57.16,57,57,214591 +27/12/2017,57.17,57.25,57,57,92219 +28/12/2017,57.11,57.11,56.57,56.79,50671 +29/12/2017,56.81,56.81,56.42,56.57,432777 diff --git a/examples/example-11.ts b/examples/example-11.ts new file mode 100644 index 0000000..72ad784 --- /dev/null +++ b/examples/example-11.ts @@ -0,0 +1,31 @@ +// +// Example of rendering a line chart from real data. +// + +import * as dataForge from 'data-forge'; +import 'data-forge-fs'; +import 'data-forge-indicators'; +import '../src/index'; +import * as fs from 'fs-extra'; +import * as path from 'path'; + +const outputName = path.basename(__filename, ".ts"); +const outputPath = path.join("./output", outputName); +fs.emptyDirSync(outputPath); + +async function main(): Promise { + + let df = (await dataForge.readFileSync("./STW.csv").parseCSV({ dynamicTyping: true })) + .parseDates("date", "D/MM/YYYY"); + df = df.merge(df.deflate(row => row.close).bollinger(20, 2, 2)); + + const plot = df.plot({}, { x: "date", y: [ "close", "upper", "middle", "lower" ] }); + await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); + await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); +} + +main() + .then(() => console.log("Done")) + .catch(err => console.error(err && err.stack || err)); + + diff --git a/examples/package-lock.json b/examples/package-lock.json index 486dc74..5c3b094 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -19,6 +19,50 @@ "integrity": "sha512-/OMMBnjVtDuwX1tg2pkYVSqRIDSmNTnvVvmvP/2xiMAAWf4a5+JozrApCrO4WCAILmXVxfNoQ3E+0HJbNpFVGg==", "dev": true }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + }, + "data-forge-fs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/data-forge-fs/-/data-forge-fs-0.0.6.tgz", + "integrity": "sha512-oTX8ofmbauqZGNeqCbniwlKwdKbM7SKYKAnUZmqL8YvU0U3l9njA6KuF2j68TAqAazzX4jvkn+Va/nwZCNctgQ==", + "requires": { + "chai": "^4.1.2" + } + }, + "data-forge-indicators": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/data-forge-indicators/-/data-forge-indicators-0.2.4.tgz", + "integrity": "sha512-Pa0NnTGFR9Bt/3w+0E5rd9I5pC00vEuryzU23KuVCTsxvlfN+t16rX5+8YCi8Y0GOU/ZomhkKBv3woam/KTrmQ==" + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "requires": { + "type-detect": "^4.0.0" + } + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -29,6 +73,11 @@ "universalify": "^0.1.0" } }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + }, "graceful-fs": { "version": "4.1.15", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", @@ -42,6 +91,16 @@ "graceful-fs": "^4.1.6" } }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", diff --git a/examples/package.json b/examples/package.json index 9cf6008..77c1191 100644 --- a/examples/package.json +++ b/examples/package.json @@ -10,6 +10,8 @@ "author": "", "license": "ISC", "dependencies": { + "data-forge-fs": "0.0.6", + "data-forge-indicators": "^0.2.4", "fs-extra": "^7.0.1" }, "devDependencies": { diff --git a/examples/run.bat b/examples/run.bat index 4ae78fb..bb6a67d 100644 --- a/examples/run.bat +++ b/examples/run.bat @@ -7,4 +7,5 @@ call ts-node example-6.ts call ts-node example-7.ts call ts-node example-8.ts call ts-node example-9.ts -call ts-node example-10.ts \ No newline at end of file +call ts-node example-10.ts +call ts-node example-11.ts \ No newline at end of file From 30e927bbaf2b6f457918b5263bc59ca0e88117f0 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sun, 28 Apr 2019 17:16:59 +1000 Subject: [PATCH 03/28] Bumped version no. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6fa1c77..f84796a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.1", + "version": "0.3.2", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", From a5d10b452a68c68447c100efc6e39a4e9a0623eb Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Tue, 30 Apr 2019 07:05:16 +1000 Subject: [PATCH 04/28] Fixed lint issue in tests. --- src/test/apply-defaults.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/apply-defaults.test.ts b/src/test/apply-defaults.test.ts index 8837cee..0ccd306 100644 --- a/src/test/apply-defaults.test.ts +++ b/src/test/apply-defaults.test.ts @@ -276,7 +276,6 @@ describe("apply defaults", () => { expect(chartDef.plotConfig.y!.max).toBe(300); }); - it("y2 min can be passed through", () => { const inputChartDef: any = { From 89149cac10ebfef3a7701f18d696586da671cc84 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Wed, 1 May 2019 17:07:00 +1000 Subject: [PATCH 05/28] Updated chart def and apex. --- package-lock.json | 22 ++++++++--------- package.json | 6 ++--- src/expand-chart-def.ts | 7 +++++- src/plot-api.ts | 41 ++++++++++++++++--------------- src/test/expand-chart-def.test.ts | 2 +- src/test/plot-api.test.ts | 22 ----------------- 6 files changed, 42 insertions(+), 58 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2a6c78..e467dcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.1", + "version": "0.3.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,19 +240,19 @@ } }, "@data-forge-plot/apex": { - "version": "0.0.31", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.31.tgz", - "integrity": "sha512-fRTGr6rSf8er8M/HUfAWt8/ZtZ6QfsGtAv2+QgKQrdSfEhVVQSw/q5ymJWGRuksZEy1CeYDNPeCGC7yVQglCdw==", + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.33.tgz", + "integrity": "sha512-rBTfDFOM2LXwV3yu6+i/u8uSljMom1GpQ7Z0q4vLI68scf7FSQ9EhxO5a3goYQAEK0EHy0MEztv3qoF9aEWAVg==", "requires": { - "@data-forge-plot/chart-def": "^1.0.9", + "@data-forge-plot/chart-def": "^1.1.1", "@data-forge/serialization": "^1.0.0", "apexcharts": "^3.6.8" } }, "@data-forge-plot/chart-def": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.0.9.tgz", - "integrity": "sha512-zMTpxK3nQPAT9IPfIGKSvmjIYfnLfR1rfrPvGtpdMVj1Fm0g6IAYXX3OWH6mxKR9bw1NQUmTsgEylLs4mbVzdg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.1.1.tgz", + "integrity": "sha512-xOvV2FiVRZSv4yNtSuyg3ukqnw/JbgkhZtFDFI8LEP0ARgZFQDKZSNJauaCSFyYrNAA4U7x5gJkNpUKNQUDiqw==", "requires": { "@data-forge/serialization": "^1.0.0" } @@ -682,9 +682,9 @@ } }, "apexcharts": { - "version": "3.6.8", - "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.6.8.tgz", - "integrity": "sha512-53cgmbPAnHTHQEqvbLphEaLBWG3kJdCxCGkBQss+ZCAxnD/TwS6wxI1SIN0uBQf35d8hN/IXCAH4ayGPEBftXQ==", + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.6.9.tgz", + "integrity": "sha512-ZsvNlOWAEC6IHausuTGSihJWWhZT5df3ik1RsUnpiJ1pBYZMmlsxhf14BLEtlzjs8T3uFdHUp88p5P72Xf24cg==", "requires": { "promise-polyfill": "8.1.0", "svg.draggable.js": "^2.2.1", diff --git a/package.json b/package.json index f84796a..117d044 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.2", + "version": "0.3.3", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,8 +34,8 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.0.31", - "@data-forge-plot/chart-def": "^1.0.9", + "@data-forge-plot/apex": "0.0.33", + "@data-forge-plot/chart-def": "^1.1.1", "@data-forge/serialization": "^1.0.0", "capture-template": "^1.1.10", "inflate-template": "^1.1.6", diff --git a/src/expand-chart-def.ts b/src/expand-chart-def.ts index d64fb59..a187a0f 100644 --- a/src/expand-chart-def.ts +++ b/src/expand-chart-def.ts @@ -1,4 +1,4 @@ -import { IChartDef, IPlotConfig as IExpandedPlotConfig, IAxisMap as IExpandedAxisMap, ChartType, IAxisConfig as IExpandedAxisConfig, IYAxisConfig as IExpandedYAxisConfig, IAxisSeriesConfig as IExpandedAxisSeriesConfig, IYAxisSeriesConfig as IExpandedYAxisSeriesConfig } from "@data-forge-plot/chart-def"; +import { IChartDef, IPlotConfig as IExpandedPlotConfig, IAxisMap as IExpandedAxisMap, ChartType, IAxisConfig as IExpandedAxisConfig, IYAxisConfig as IExpandedYAxisConfig, IXAxisConfig as IExpandedXAxisConfig, IAxisSeriesConfig as IExpandedAxisSeriesConfig, IYAxisSeriesConfig as IExpandedYAxisSeriesConfig } from "@data-forge-plot/chart-def"; import { IAxisMap, IPlotConfig, IAxisConfig, IYAxisConfig, IAxisSeriesConfig, IYAxisSeriesConfig } from "./chart-def"; import { ISerializedDataFrame } from "@data-forge/serialization"; import { isString } from "./utils"; @@ -19,6 +19,11 @@ export function expandAxisConfig(axisConfig: IAxisConfig): IExpandedAxisConfig { return expandedAxisConfig; } +export function expandXAxisConfig(axisConfig: IYAxisConfig): IExpandedXAxisConfig { + const expandedAxisConfig = expandAxisConfig(axisConfig); + return expandedAxisConfig; +} + export function expandYAxisConfig(axisConfig: IYAxisConfig): IExpandedYAxisConfig { const expandedAxisConfig = expandAxisConfig(axisConfig); return expandedAxisConfig; diff --git a/src/plot-api.ts b/src/plot-api.ts index 71f157b..4b3ee94 100644 --- a/src/plot-api.ts +++ b/src/plot-api.ts @@ -5,7 +5,7 @@ import { exportTemplate, IExportOptions } from "inflate-template"; import { captureImage, ICaptureOptions } from "capture-template"; import { IPlotConfig, IAxisMap } from "./chart-def"; import { isObject } from "./utils"; -import { ChartType, IChartDef, AxisType, HorizontalLabelPosition, VerticalLabelPosition, IAxisConfig, IYAxisSeriesConfig, IAxisSeriesConfig } from "@data-forge-plot/chart-def"; +import { ChartType, IChartDef, AxisType, HorizontalLabelPosition, VerticalLabelPosition, IAxisConfig, IYAxisSeriesConfig, IAxisSeriesConfig, IXAxisConfig, IYAxisConfig } from "@data-forge-plot/chart-def"; import { expandChartDef } from "./expand-chart-def"; import { applyDefaults } from "./apply-defaults"; @@ -169,11 +169,6 @@ export interface IAxisConfigAPI extends IPlotAPI { * Set the label for the axis. */ label(label: string): FluentT; - - /** - * Set the type of the axis. - */ - type(axisType: AxisType): FluentT; } /** @@ -220,6 +215,11 @@ export interface IXAxisConfigAPI extends IAxisConfigAPI { */ setSeries(seriesName: string): IXAxisSeriesConfigAPI; + /** + * Set the type of the axis. + */ + type(axisType: AxisType): IXAxisSeriesConfigAPI; + /** * Set the position for the label. */ @@ -577,7 +577,7 @@ class YAxisSeriesConfigAPI extends AxisSeriesConfigAPI extends AbstractPlotAPI implements IAxisConfigAPI { +abstract class AxisConfigAPI extends AbstractPlotAPI implements IAxisConfigAPI { /** * The name of the axis being configured. @@ -587,11 +587,11 @@ abstract class AxisConfigAPI extends AbstractPlotAPI implemen /** * Configuration for the axis. */ - protected axisConfig: IAxisConfig; + protected axisConfig: AxisConfigT; constructor( axisName: string, - axisConfig: IAxisConfig, + axisConfig: AxisConfigT, chartDef: IChartDef ) { super(chartDef); @@ -613,25 +613,18 @@ abstract class AxisConfigAPI extends AbstractPlotAPI implemen return this as any as FluentT; } - /** - * Set the type of the axis. - */ - type(axisType: AxisType): FluentT { - this.axisConfig.axisType = axisType; - return this as any as FluentT; - } } /** * Fluent API for configuring an axis of the chart. */ -class XAxisConfigAPI extends AxisConfigAPI implements IXAxisConfigAPI { +class XAxisConfigAPI extends AxisConfigAPI implements IXAxisConfigAPI { createSeriesConfig: (seriesName: string) => IAxisSeriesConfig; constructor( axisName: string, - axisConfig: IAxisConfig, + axisConfig: IXAxisConfig, createSeriesConfig: (seriesName: string) => IAxisSeriesConfig, chartDef: IChartDef ) { @@ -651,6 +644,14 @@ class XAxisConfigAPI extends AxisConfigAPI impleme ); } + /** + * Set the type of the axis. + */ + type(axisType: AxisType): IXAxisSeriesConfigAPI { + this.axisConfig.axisType = axisType; + return this as any as IXAxisSeriesConfigAPI; + } + /** * Set the position for the label. */ @@ -668,13 +669,13 @@ class XAxisConfigAPI extends AxisConfigAPI impleme /** * Fluent API for configuring an axis of the chart. */ -class YAxisConfigAPI extends AxisConfigAPI implements IYAxisConfigAPI { +class YAxisConfigAPI extends AxisConfigAPI implements IYAxisConfigAPI { createSeriesConfig: (seriesName: string) => IYAxisSeriesConfig; constructor( axisName: string, - axisConfig: IAxisConfig, + axisConfig: IYAxisConfig, createSeriesConfig: (seriesName: string) => IYAxisSeriesConfig, chartDef: IChartDef ) { diff --git a/src/test/expand-chart-def.test.ts b/src/test/expand-chart-def.test.ts index 518d7e2..d44ff64 100644 --- a/src/test/expand-chart-def.test.ts +++ b/src/test/expand-chart-def.test.ts @@ -163,7 +163,7 @@ describe("expand chart def", () => { it("can expand axis config", () => { const xConfig = { axisType: AxisType.Category }; - const yConfig = { axisType: AxisType.Indexed }; + const yConfig = { axisType: AxisType.Numerical }; const y2Config = { axisType: AxisType.Timeseries }; const expanded = expandChartDef({} as any, { x: xConfig, y: yConfig, y2: y2Config }, {}); expect(expanded.plotConfig.x).not.toBe(xConfig); diff --git a/src/test/plot-api.test.ts b/src/test/plot-api.test.ts index 5970e53..c6573c3 100644 --- a/src/test/plot-api.test.ts +++ b/src/test/plot-api.test.ts @@ -375,17 +375,6 @@ describe("plot-api", () => { expect(serialized.plotConfig.y!.label!.position).toBe(VerticalLabelPosition.OuterMiddle); }); - it("can set y axis type", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .y() - .type(AxisType.Timeseries); - const serialized = plot.serialize(); - expect(serialized.plotConfig.y!.axisType).toBe(AxisType.Timeseries); - }); - it("can set y2 axis label", () => { const data: any = {}; const plotConfig: IPlotConfig = { y2: { label: { text: "A label!" }}}; @@ -429,17 +418,6 @@ describe("plot-api", () => { expect(serialized.plotConfig.y2!.label!.position).toBe(VerticalLabelPosition.OuterMiddle); }); - it("can set y2 axis type", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .y2() - .type(AxisType.Timeseries); - const serialized = plot.serialize(); - expect(serialized.plotConfig.y2!.axisType).toBe(AxisType.Timeseries); - }); - it("can render image", async () => { const data: any = {}; const plotConfig: IPlotConfig = { x: { label: { position: HorizontalLabelPosition.OuterRight }}}; From 128a44c40628fea190b0e58bd3c170c38a691086 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Fri, 3 May 2019 18:31:31 +1000 Subject: [PATCH 06/28] Now rounding computed min and max. --- package.json | 2 +- src/apply-defaults.ts | 16 +++++------ src/test/apply-defaults.test.ts | 51 +++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 117d044..756969e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.3", + "version": "0.3.4", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", diff --git a/src/apply-defaults.ts b/src/apply-defaults.ts index 0ef2849..82c2b00 100644 --- a/src/apply-defaults.ts +++ b/src/apply-defaults.ts @@ -14,12 +14,12 @@ function extractValues(data: ISerializedDataFrame, seriesConfigs: IYAxisSeriesCo return flattened; } -function findMin(values: number[]): number { - return Math.min(...values.filter(v => v !== undefined && v !== null && !Number.isNaN(v))); +function computeMin(values: number[]): number { + return Math.floor(Math.min(...values.filter(v => v !== undefined && v !== null && !Number.isNaN(v))) * 100) / 100; } -function findMax(values: number[]): number { - return Math.max(...values.filter(v => v !== undefined && v !== null && !Number.isNaN(v) && Number.isFinite(v))); +function computeMax(values: number[]): number { + return Math.ceil(Math.max(...values.filter(v => v !== undefined && v !== null && !Number.isNaN(v) && Number.isFinite(v))) * 100) / 100; } // @@ -87,7 +87,7 @@ export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConf y1Values = extractValues(chartDef.data, chartDef.axisMap.y); if (y1Values.length > 0) { - chartDef.plotConfig.y.min = findMin(y1Values); + chartDef.plotConfig.y.min = computeMin(y1Values); } } @@ -97,7 +97,7 @@ export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConf } if (y1Values.length > 0) { - chartDef.plotConfig.y.max = findMax(y1Values); + chartDef.plotConfig.y.max = computeMax(y1Values); } } @@ -110,7 +110,7 @@ export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConf if (chartDef.plotConfig.y2.min === undefined) { y2Values = extractValues(chartDef.data, chartDef.axisMap.y2); if (y2Values.length > 0) { - chartDef.plotConfig.y2.min = findMin(y2Values); + chartDef.plotConfig.y2.min = computeMin(y2Values); } } @@ -120,7 +120,7 @@ export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConf } if (y2Values.length > 0) { - chartDef.plotConfig.y2.max = findMax(y2Values); + chartDef.plotConfig.y2.max = computeMax(y2Values); } } diff --git a/src/test/apply-defaults.test.ts b/src/test/apply-defaults.test.ts index 0ccd306..7d66ca2 100644 --- a/src/test/apply-defaults.test.ts +++ b/src/test/apply-defaults.test.ts @@ -464,4 +464,55 @@ describe("apply defaults", () => { expect(chartDef.plotConfig.y2!.min).toBeUndefined(); expect(chartDef.plotConfig.y2!.max).toBeUndefined(); }); + + it("computed min and max are rounded", () => { + + const testData = { + columnOrder: [ "a" ], + columns: { + a: "number", + b: "number", + }, + index: { + type: "number", + values: [2, 3, 4], + }, + values: [ + { + a: 10.123456, + }, + { + a: 20, + }, + { + a: 30.01234567, + }, + ], + }; + + const inputChartDef: any = { + data: testData, + plotConfig: { + y: { + }, + y2: { + }, + }, + axisMap: { + y: [ + { + series: "a", + }, + { + series: "b", + }, + ], + }, + }; + + const chartDef = applyDefaults(inputChartDef); + expect(chartDef.plotConfig.y!.min).toBe(10.12); + expect(chartDef.plotConfig.y!.max).toBe(30.02); + }); + }); From da41c10d05baf426414905fecbd69b5e6e01e5f8 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sat, 4 May 2019 16:13:53 +1000 Subject: [PATCH 07/28] Updated charts. --- package-lock.json | 10 +++++----- package.json | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index e467dcb..5024578 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.3", + "version": "0.3.5", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,13 +240,13 @@ } }, "@data-forge-plot/apex": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.33.tgz", - "integrity": "sha512-rBTfDFOM2LXwV3yu6+i/u8uSljMom1GpQ7Z0q4vLI68scf7FSQ9EhxO5a3goYQAEK0EHy0MEztv3qoF9aEWAVg==", + "version": "0.0.34", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.34.tgz", + "integrity": "sha512-aLKv3jZXmOLcwr7xqc+pwSikCtqJoG8dYhV+8UjsdQiH+2GwEwtgaZoD7KPfffoOceFu6H3TDIIW2CVihoj1CQ==", "requires": { "@data-forge-plot/chart-def": "^1.1.1", "@data-forge/serialization": "^1.0.0", - "apexcharts": "^3.6.8" + "apexcharts": "^3.6.9" } }, "@data-forge-plot/chart-def": { diff --git a/package.json b/package.json index 756969e..1c5f125 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.4", + "version": "0.3.5", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,7 +34,7 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.0.33", + "@data-forge-plot/apex": "0.0.34", "@data-forge-plot/chart-def": "^1.1.1", "@data-forge/serialization": "^1.0.0", "capture-template": "^1.1.10", From 1bdff9d77fef16b1960617442fc79282266e7eab Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sat, 4 May 2019 17:15:47 +1000 Subject: [PATCH 08/28] Updated apex library. --- package-lock.json | 34 ++++++++++++++++++++++++++++------ package.json | 4 ++-- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5024578..d14307d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.5", + "version": "0.3.6", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,13 +240,25 @@ } }, "@data-forge-plot/apex": { - "version": "0.0.34", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.34.tgz", - "integrity": "sha512-aLKv3jZXmOLcwr7xqc+pwSikCtqJoG8dYhV+8UjsdQiH+2GwEwtgaZoD7KPfffoOceFu6H3TDIIW2CVihoj1CQ==", + "version": "0.0.35", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.35.tgz", + "integrity": "sha512-aH2Une1u8eMHw+O/sfLAz0QgjpzJivFtkEOvHlvk2dzqRqWmcUk9joEo6Cs2iFV/znhoLG2IxYYn/GGljVR73Q==", "requires": { - "@data-forge-plot/chart-def": "^1.1.1", + "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", - "apexcharts": "^3.6.9" + "apexcharts": "^3.6.9", + "dayjs": "^1.8.13", + "numeral": "^2.0.6" + }, + "dependencies": { + "@data-forge-plot/chart-def": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.1.2.tgz", + "integrity": "sha512-bmaBz81QIS/4ljBVbAQG9q1895anm1SPDSYNR494Lh04Z9gPsI8aTFKzlT2YD+AE68lt2VWamdjc8MjAB08pKg==", + "requires": { + "@data-forge/serialization": "^1.0.0" + } + } } }, "@data-forge-plot/chart-def": { @@ -1526,6 +1538,11 @@ } } }, + "dayjs": { + "version": "1.8.13", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.13.tgz", + "integrity": "sha512-JZ01l/PMU8OqwuUs2mOQ/CTekMtoXOUSylfjqjgDzbhRSxpFIrPnHn8Y8a0lfocNgAdBNZb8y0/gbzJ2riQ4WQ==" + }, "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", @@ -4623,6 +4640,11 @@ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, + "numeral": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", + "integrity": "sha1-StCAk21EPCVhrtnyGX7//iX05QY=" + }, "nwsapi": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.3.tgz", diff --git a/package.json b/package.json index 1c5f125..3d4d49f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.5", + "version": "0.3.6", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,7 +34,7 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.0.34", + "@data-forge-plot/apex": "0.0.35", "@data-forge-plot/chart-def": "^1.1.1", "@data-forge/serialization": "^1.0.0", "capture-template": "^1.1.10", From 894ccc7276bce52edb62e10352d02924704aebec Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sun, 5 May 2019 18:16:41 +1000 Subject: [PATCH 09/28] Updated chart def. --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index d14307d..6090d6c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.6", + "version": "0.3.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -262,9 +262,9 @@ } }, "@data-forge-plot/chart-def": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.1.1.tgz", - "integrity": "sha512-xOvV2FiVRZSv4yNtSuyg3ukqnw/JbgkhZtFDFI8LEP0ARgZFQDKZSNJauaCSFyYrNAA4U7x5gJkNpUKNQUDiqw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.1.2.tgz", + "integrity": "sha512-bmaBz81QIS/4ljBVbAQG9q1895anm1SPDSYNR494Lh04Z9gPsI8aTFKzlT2YD+AE68lt2VWamdjc8MjAB08pKg==", "requires": { "@data-forge/serialization": "^1.0.0" } diff --git a/package.json b/package.json index 3d4d49f..7bf6200 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.6", + "version": "0.3.7", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -35,7 +35,7 @@ "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { "@data-forge-plot/apex": "0.0.35", - "@data-forge-plot/chart-def": "^1.1.1", + "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", "capture-template": "^1.1.10", "inflate-template": "^1.1.6", From a73d4cc63a5f279924575ba1e4a071d0a3a6af5d Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sun, 5 May 2019 18:20:50 +1000 Subject: [PATCH 10/28] Updated apex plugin. --- package-lock.json | 18 ++++-------------- package.json | 4 ++-- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6090d6c..a1b41b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.7", + "version": "0.3.8", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,25 +240,15 @@ } }, "@data-forge-plot/apex": { - "version": "0.0.35", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.35.tgz", - "integrity": "sha512-aH2Une1u8eMHw+O/sfLAz0QgjpzJivFtkEOvHlvk2dzqRqWmcUk9joEo6Cs2iFV/znhoLG2IxYYn/GGljVR73Q==", + "version": "0.0.36", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.36.tgz", + "integrity": "sha512-8+4lnQJWgpu/yjD+pxlDsVKhPHPi47+XR7G+YrMPOKfy3vgs//E06AHI7fWDBXbubcBnnmmm2rw7aA/FolKS2w==", "requires": { "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", "apexcharts": "^3.6.9", "dayjs": "^1.8.13", "numeral": "^2.0.6" - }, - "dependencies": { - "@data-forge-plot/chart-def": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.1.2.tgz", - "integrity": "sha512-bmaBz81QIS/4ljBVbAQG9q1895anm1SPDSYNR494Lh04Z9gPsI8aTFKzlT2YD+AE68lt2VWamdjc8MjAB08pKg==", - "requires": { - "@data-forge/serialization": "^1.0.0" - } - } } }, "@data-forge-plot/chart-def": { diff --git a/package.json b/package.json index 7bf6200..4e851c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.7", + "version": "0.3.8", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,7 +34,7 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.0.35", + "@data-forge-plot/apex": "0.0.36", "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", "capture-template": "^1.1.10", From 84318f6de567e85cb2831b28dc3670f7c1137f25 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sun, 5 May 2019 18:38:15 +1000 Subject: [PATCH 11/28] Update apex plugin. --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index a1b41b6..98f2c0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.8", + "version": "0.3.9", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,9 +240,9 @@ } }, "@data-forge-plot/apex": { - "version": "0.0.36", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.36.tgz", - "integrity": "sha512-8+4lnQJWgpu/yjD+pxlDsVKhPHPi47+XR7G+YrMPOKfy3vgs//E06AHI7fWDBXbubcBnnmmm2rw7aA/FolKS2w==", + "version": "0.0.37", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.37.tgz", + "integrity": "sha512-PCX/S3MbCGoAdkOM8uDU6jKvB1ri5qH5E1L73nz3sRRFtT272uy6EHXqu9/mZF4jCIzMsB7T/McOPyP8lVzRXQ==", "requires": { "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", diff --git a/package.json b/package.json index 4e851c3..6ca6fd7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.8", + "version": "0.3.9", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,7 +34,7 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.0.36", + "@data-forge-plot/apex": "0.0.37", "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", "capture-template": "^1.1.10", From 68e9ee1a7469ae48efd48446e5e4472fa72e57a6 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sun, 5 May 2019 18:44:44 +1000 Subject: [PATCH 12/28] Update apex plugin. --- package-lock.json | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 98f2c0f..ff368b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.9", + "version": "0.3.10", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,9 +240,9 @@ } }, "@data-forge-plot/apex": { - "version": "0.0.37", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.37.tgz", - "integrity": "sha512-PCX/S3MbCGoAdkOM8uDU6jKvB1ri5qH5E1L73nz3sRRFtT272uy6EHXqu9/mZF4jCIzMsB7T/McOPyP8lVzRXQ==", + "version": "0.0.38", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.38.tgz", + "integrity": "sha512-Noa0eiG9k+1KuFslhnxG+/wUu/ehU7kluI9vAEARryT2+1z7lGLiLNw7Jj0jC0P8sxUfqEY62BaQ6PehkWs5Xg==", "requires": { "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", diff --git a/package.json b/package.json index 6ca6fd7..fe8e5b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.9", + "version": "0.3.10", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,7 +34,7 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.0.37", + "@data-forge-plot/apex": "0.0.38", "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", "capture-template": "^1.1.10", From b0dc2686e14c8f11cca6fa694650e4a4355f9ef0 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 9 May 2019 08:47:14 +1000 Subject: [PATCH 13/28] Update to apex plugin to fix issue with xaxis category data type. --- package-lock.json | 20 ++++++++++---------- package.json | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index ff368b8..3f11e77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.10", + "version": "0.3.11", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,9 +240,9 @@ } }, "@data-forge-plot/apex": { - "version": "0.0.38", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.38.tgz", - "integrity": "sha512-Noa0eiG9k+1KuFslhnxG+/wUu/ehU7kluI9vAEARryT2+1z7lGLiLNw7Jj0jC0P8sxUfqEY62BaQ6PehkWs5Xg==", + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.39.tgz", + "integrity": "sha512-u8ceYtKgW9Vpt6lsxWI43cQxzZwTvO/wq/SOLLB1D/1rQLAEMZZ+J1B7VaQtiStOZImWenKLHHR5ScUrunPXNg==", "requires": { "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", @@ -684,9 +684,9 @@ } }, "apexcharts": { - "version": "3.6.9", - "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.6.9.tgz", - "integrity": "sha512-ZsvNlOWAEC6IHausuTGSihJWWhZT5df3ik1RsUnpiJ1pBYZMmlsxhf14BLEtlzjs8T3uFdHUp88p5P72Xf24cg==", + "version": "3.6.10", + "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.6.10.tgz", + "integrity": "sha512-RdlpC3KqEAAPBH7RaE6pwXGlp2XUtlNgAfE7xmvmquLl6W6RYU6dicIqPsuJtpePrZqLAYdbtxOiwrIrc7Xkjg==", "requires": { "promise-polyfill": "8.1.0", "svg.draggable.js": "^2.2.1", @@ -1529,9 +1529,9 @@ } }, "dayjs": { - "version": "1.8.13", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.13.tgz", - "integrity": "sha512-JZ01l/PMU8OqwuUs2mOQ/CTekMtoXOUSylfjqjgDzbhRSxpFIrPnHn8Y8a0lfocNgAdBNZb8y0/gbzJ2riQ4WQ==" + "version": "1.8.14", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.14.tgz", + "integrity": "sha512-AVhDmRTe541iWirnoeFSSDDGvCT6HWaNQ4z2WmmzXMGZj6ph6ydao2teKq/eUtR43GPJXlYFD+C/SotG1P9wUQ==" }, "debug": { "version": "2.6.8", diff --git a/package.json b/package.json index fe8e5b5..c954aa2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.10", + "version": "0.3.11", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -34,7 +34,7 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.0.38", + "@data-forge-plot/apex": "0.0.39", "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", "capture-template": "^1.1.10", From 82d9b6ccd2dd31e7209f46393ad71431fdc1d43b Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Mon, 13 May 2019 08:45:03 +1000 Subject: [PATCH 14/28] Striped capture-template to remove dependency on Nightmare/Electron. Having this dependency makes DFP take too long to install. This removes the renderImage function, this function is quite important - it will still be available but is being moved to a separately installable plugin. --- README.md | 4 + package-lock.json | 1221 ++++--------------------------------- package.json | 6 +- src/plot-api.ts | 46 -- src/test/plot-api.test.ts | 12 - 5 files changed, 117 insertions(+), 1172 deletions(-) diff --git a/README.md b/README.md index f1943b7..30a09d4 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ Do your prototyping and exploratory data analysis in JavaScript with [Data-Forge Please join the conversation on [Gitter](https://gitter.im/data-forge) +## Breaking changes + +As of version 0.4.0 the Nightmare/Electron depenency has been removed along with the `renderImage` function. The `renderImage` function will soon be made available in a separately installable plugin. This has been removed due to the size that the Electron dependency adds to this package. In the future you you will have to install the separate package to render a plot to an image. + ## Project Goals - To simply and conveniently from a series or dataframe to chart. diff --git a/package-lock.json b/package-lock.json index 3f11e77..1d894d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.3.11", + "version": "0.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -603,15 +603,6 @@ "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", "dev": true }, - "accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", - "requires": { - "mime-types": "~2.1.18", - "negotiator": "0.6.1" - } - }, "acorn": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", @@ -646,6 +637,7 @@ "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", @@ -737,16 +729,6 @@ "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" - }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -774,6 +756,7 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, "requires": { "safer-buffer": "~2.1.0" } @@ -781,7 +764,8 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true }, "assertion-error": { "version": "1.1.0", @@ -817,7 +801,8 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "atob": { "version": "2.1.1", @@ -827,12 +812,14 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true }, "aws4": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", + "dev": true }, "babel-code-frame": { "version": "6.26.0", @@ -1019,6 +1006,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -1028,41 +1016,6 @@ "resolved": "http://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" }, - "body-parser": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", - "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", - "requires": { - "bytes": "3.0.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "~1.6.3", - "iconv-lite": "0.4.23", - "on-finished": "~2.3.0", - "qs": "6.5.2", - "raw-body": "2.3.3", - "type-is": "~1.6.16" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1143,7 +1096,8 @@ "buffer-from": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==" + "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", + "dev": true }, "builtin-modules": { "version": "1.1.1", @@ -1151,11 +1105,6 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -1188,22 +1137,6 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==" }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - } - } - }, "capture-exit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", @@ -1213,49 +1146,11 @@ "rsvp": "^4.8.4" } }, - "capture-template": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/capture-template/-/capture-template-1.1.10.tgz", - "integrity": "sha512-wzbgkSv40b0U1x4Pr+44bIFJKMIsPjpDcwNCV49k85u9Cc9HGrBn3JF2dBXYlBs0EwYyJj039+9ax8Dkw7wVMQ==", - "requires": { - "chai": "4.1.2", - "express": "^4.16.4", - "fs-extra": "^7.0.1", - "inflate-template": "^1.1.6", - "nightmare": "^3.0.1", - "promisify-any": "^2.0.1", - "yargs": "^12.0.5" - }, - "dependencies": { - "chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", - "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", - "requires": { - "assertion-error": "^1.0.1", - "check-error": "^1.0.1", - "deep-eql": "^3.0.0", - "get-func-name": "^2.0.0", - "pathval": "^1.0.0", - "type-detect": "^4.0.0" - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } - } - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true }, "chalk": { "version": "2.4.1", @@ -1327,11 +1222,6 @@ "wrap-ansi": "^2.0.0" } }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" - }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1385,6 +1275,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -1411,27 +1302,6 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "content-disposition": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", - "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, "convert-source-map": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", @@ -1441,16 +1311,6 @@ "safe-buffer": "~5.1.1" } }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" - }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -1459,7 +1319,8 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cross-spawn": { "version": "6.0.5", @@ -1488,18 +1349,11 @@ "cssom": "0.3.x" } }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "^1.0.1" - } - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -1551,14 +1405,6 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, - "deep-defaults": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/deep-defaults/-/deep-defaults-1.0.5.tgz", - "integrity": "sha512-5ev/sNkiHTmeTqbDJEDgdQa/Ub0eOMQNix9l+dLLGbwOos7/in5HdvHXI014wqxsET4YeJG9Eq4qj0PJRL8rSw==", - "requires": { - "lodash": "^4.17.5" - } - }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -1567,11 +1413,6 @@ "type-detect": "^4.0.0" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -1587,14 +1428,6 @@ "strip-bom": "^3.0.0" } }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "requires": { - "clone": "^1.0.2" - } - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1652,17 +1485,8 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, "detect-newline": { "version": "2.1.0", @@ -1704,89 +1528,12 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "electron": { - "version": "1.8.8", - "resolved": "https://registry.npmjs.org/electron/-/electron-1.8.8.tgz", - "integrity": "sha512-1f9zJehcTTGjrkb06o6ds+gsRq6SYhZJyxOk6zIWjRH8hVy03y/RzUDELzNas71f5vcvXmfGVvyjeEsadDI8tg==", - "requires": { - "@types/node": "^8.0.24", - "electron-download": "^3.0.1", - "extract-zip": "^1.0.3" - }, - "dependencies": { - "@types/node": { - "version": "8.10.45", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.45.tgz", - "integrity": "sha512-tGVTbA+i3qfXsLbq9rEq/hezaHY55QxQLeXQL2ejNgFAxxrgu8eMmYIOsRcl7hN1uTLVsKOOYacV/rcJM3sfgQ==" - } - } - }, - "electron-download": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-3.3.0.tgz", - "integrity": "sha1-LP1U1pZsAZxNSa1l++Zcyc3vaMg=", - "requires": { - "debug": "^2.2.0", - "fs-extra": "^0.30.0", - "home-path": "^1.0.1", - "minimist": "^1.2.0", - "nugget": "^2.0.0", - "path-exists": "^2.1.0", - "rc": "^1.1.2", - "semver": "^5.3.0", - "sumchecker": "^1.2.0" - }, - "dependencies": { - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "^2.0.0" - } - } - } - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", @@ -1795,25 +1542,11 @@ "once": "^1.4.0" } }, - "enqueue": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/enqueue/-/enqueue-1.0.2.tgz", - "integrity": "sha1-kBTpvOVw7pPKlubI5jrVTBkra8g=", - "requires": { - "sliced": "0.0.5" - }, - "dependencies": { - "sliced": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz", - "integrity": "sha1-XtwETKTrb3gW1Qui/GPiXY/kcH8=" - } - } - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -1851,16 +1584,6 @@ "is-symbol": "^1.0.2" } }, - "es6-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1906,11 +1629,6 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" - }, "exec-sh": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.2.tgz", @@ -1983,57 +1701,11 @@ "jest-regex-util": "^24.3.0" } }, - "express": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", - "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", - "requires": { - "accepts": "~1.3.5", - "array-flatten": "1.1.1", - "body-parser": "1.18.3", - "content-disposition": "0.5.2", - "content-type": "~1.0.4", - "cookie": "0.3.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.1.1", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.4", - "qs": "6.5.2", - "range-parser": "~1.2.0", - "safe-buffer": "5.1.2", - "send": "0.16.2", - "serve-static": "1.13.2", - "setprototypeof": "1.1.0", - "statuses": "~1.4.0", - "type-is": "~1.6.16", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - } - } - }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true }, "extend-shallow": { "version": "3.0.2", @@ -2113,36 +1785,17 @@ } } }, - "extract-zip": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", - "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", - "requires": { - "concat-stream": "1.6.2", - "debug": "2.6.9", - "mkdirp": "0.5.1", - "yauzl": "2.4.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - } - } - }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true }, "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true }, "fast-glob": { "version": "2.2.2", @@ -2160,7 +1813,8 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -2177,14 +1831,6 @@ "bser": "^2.0.0" } }, - "fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", - "requires": { - "pend": "~1.2.0" - } - }, "fileset": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", @@ -2216,30 +1862,6 @@ } } }, - "finalhandler": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", - "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.2", - "statuses": "~1.4.0", - "unpipe": "~1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - } - } - }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", @@ -2256,23 +1878,20 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true }, "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", "mime-types": "^2.1.12" } }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" - }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -2281,11 +1900,6 @@ "map-cache": "^0.2.2" } }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2826,11 +2440,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "function-source": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/function-source/-/function-source-0.1.0.tgz", - "integrity": "sha1-2RBL8+RniLVUaMAr8bL6vPj8Ga8=" - }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -2841,11 +2450,6 @@ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" - }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -2863,6 +2467,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -2965,12 +2570,14 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true }, "har-validator": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, "requires": { "ajv": "^6.5.5", "har-schema": "^2.0.0" @@ -3043,15 +2650,11 @@ } } }, - "home-path": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.6.tgz", - "integrity": "sha512-wo+yjrdAtoXt43Vy92a+0IPCYViiyLAHyp0QVS4xL/tfvVz5sXIW1ubLZk3nhVkD92fQpUMKX+fzMjr5F489vw==" - }, "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true }, "html-encoding-sniffer": { "version": "1.0.2", @@ -3062,21 +2665,11 @@ "whatwg-encoding": "^1.0.1" } }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -3113,14 +2706,6 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "^2.0.0" - } - }, "inflate-template": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/inflate-template/-/inflate-template-1.1.6.tgz", @@ -3173,11 +2758,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -3192,11 +2772,6 @@ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" }, - "ipaddr.js": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", - "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" - }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -3218,7 +2793,8 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, "is-buffer": { "version": "1.1.6", @@ -3291,14 +2867,6 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -3375,12 +2943,8 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "is-windows": { "version": "1.0.2", @@ -3395,7 +2959,8 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "isexe": { "version": "2.0.0", @@ -3410,7 +2975,8 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true }, "istanbul-api": { "version": "2.1.4", @@ -4031,7 +3597,8 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true }, "jsdom": { "version": "11.12.0", @@ -4067,11 +3634,6 @@ "xml-name-validator": "^3.0.0" } }, - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" - }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -4081,17 +3643,20 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true }, "json5": { "version": "2.1.0", @@ -4122,6 +3687,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -4129,24 +3695,11 @@ "verror": "1.10.0" } }, - "keypress": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz", - "integrity": "sha1-SjGI1CkbZrT2XtuZ+AaqmuKTWSo=" - }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "requires": { - "graceful-fs": "^4.1.9" - } - }, "kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -4183,33 +3736,6 @@ "type-check": "~0.3.2" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "^0.2.0" - } - } - } - }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -4222,7 +3748,8 @@ "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true }, "lodash.sortby": { "version": "4.7.0", @@ -4239,15 +3766,6 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, "make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -4294,11 +3812,6 @@ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", @@ -4307,11 +3820,6 @@ "object-visit": "^1.0.0" } }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, "mem": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz", @@ -4322,35 +3830,6 @@ "p-is-promise": "^2.0.0" } }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, "merge-stream": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", @@ -4365,11 +3844,6 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==" }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -4390,20 +3864,17 @@ "to-regex": "^3.0.2" } }, - "mime": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", - "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" - }, "mime-db": { "version": "1.38.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", - "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", + "dev": true }, "mime-types": { "version": "2.1.22", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "dev": true, "requires": { "mime-db": "~1.38.0" } @@ -4426,24 +3897,6 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" }, - "minstache": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minstache/-/minstache-1.2.0.tgz", - "integrity": "sha1-/xzEA6woRPaNvxjGYhKb5+sO/EE=", - "requires": { - "commander": "1.0.4" - }, - "dependencies": { - "commander": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz", - "integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=", - "requires": { - "keypress": "0.1.x" - } - } - } - }, "mixin-deep": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", @@ -4467,6 +3920,7 @@ "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, "requires": { "minimist": "0.0.8" } @@ -4476,14 +3930,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "multiline": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz", - "integrity": "sha1-abHyX/B00oKJBPJE3dBrfZbvbJM=", - "requires": { - "strip-indent": "^1.0.0" - } - }, "nan": { "version": "2.13.2", "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", @@ -4515,11 +3961,6 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "negotiator": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", - "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" - }, "neo-async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", @@ -4530,27 +3971,6 @@ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, - "nightmare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nightmare/-/nightmare-3.0.1.tgz", - "integrity": "sha512-WptvyPfp5mHRRYHzt6+4xazaR9cc437BuLJI6cLFnqwwgxgdtsFImfBVDeTUCPAeLrkp5VryX5jlw7Wwg+UnFQ==", - "requires": { - "debug": "^2.2.0", - "deep-defaults": "^1.0.3", - "defaults": "^1.0.2", - "electron": "^1.8.4", - "enqueue": "^1.0.2", - "function-source": "^0.1.0", - "jsesc": "^0.5.0", - "minstache": "^1.2.0", - "mkdirp": "^0.5.1", - "multiline": "^1.0.2", - "once": "^1.3.3", - "rimraf": "^2.4.3", - "sliced": "1.0.1", - "split2": "^2.0.1" - } - }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -4580,6 +4000,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -4604,27 +4025,6 @@ "path-key": "^2.0.0" } }, - "nugget": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", - "integrity": "sha1-IBCVpIfhrTYIGzQy+jytpPjQcbA=", - "requires": { - "debug": "^2.1.3", - "minimist": "^1.1.0", - "pretty-bytes": "^1.0.2", - "progress-stream": "^1.1.0", - "request": "^2.45.0", - "single-line-log": "^1.1.2", - "throttleit": "0.0.2" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } - }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -4644,12 +4044,8 @@ "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true }, "object-copy": { "version": "0.1.0", @@ -4679,11 +4075,6 @@ } } }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" - }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -4710,14 +4101,6 @@ "isobject": "^3.0.1" } }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4826,25 +4209,12 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==" }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "^1.2.0" - } - }, "parse5": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", "dev": true }, - "parseurl": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", - "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" - }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -4873,12 +4243,8 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" - }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true }, "path-type": { "version": "3.0.0", @@ -4893,34 +4259,17 @@ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "^2.0.0" - } - }, "pirates": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", @@ -4956,15 +4305,6 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, - "pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=", - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.1.0" - } - }, "pretty-format": { "version": "24.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.7.0.tgz", @@ -4988,56 +4328,8 @@ "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "progress-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/progress-stream/-/progress-stream-1.2.0.tgz", - "integrity": "sha1-LNPP6jO6OonJwSHsM0er6asSX3c=", - "requires": { - "speedometer": "~0.1.2", - "through2": "~0.2.3" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, - "through2": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", - "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", - "requires": { - "readable-stream": "~1.1.9", - "xtend": "~2.1.1" - } - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "requires": { - "object-keys": "~0.4.0" - } - } - } + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true }, "promise-polyfill": { "version": "8.1.0", @@ -5064,19 +4356,11 @@ "sisteransi": "^1.0.0" } }, - "proxy-addr": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", - "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", - "requires": { - "forwarded": "~0.1.2", - "ipaddr.js": "1.8.0" - } - }, "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", + "dev": true }, "pump": { "version": "3.0.0", @@ -5090,56 +4374,14 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "range-parser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", - "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" - }, - "raw-body": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", - "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.3", - "iconv-lite": "0.4.23", - "unpipe": "1.0.0" - }, - "dependencies": { - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - } - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true }, "react-is": { "version": "16.8.6", @@ -5147,65 +4389,11 @@ "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==", "dev": true }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "dependencies": { - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "^2.0.0" - } - } - } - }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -5220,6 +4408,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, "requires": { "safe-buffer": "~5.1.0" } @@ -5235,15 +4424,6 @@ "util.promisify": "^1.0.0" } }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -5269,18 +4449,11 @@ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "^1.0.0" - } - }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -5338,6 +4511,7 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "dev": true, "requires": { "path-parse": "^1.0.6" } @@ -5371,6 +4545,7 @@ "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, "requires": { "glob": "^7.1.3" }, @@ -5379,6 +4554,7 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -5399,7 +4575,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true }, "safe-regex": { "version": "1.1.0", @@ -5412,7 +4589,8 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "sane": { "version": "4.1.0", @@ -5450,47 +4628,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" }, - "send": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", - "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", - "requires": { - "debug": "2.6.9", - "depd": "~1.1.2", - "destroy": "~1.0.4", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "~1.6.2", - "mime": "1.4.1", - "ms": "2.0.0", - "on-finished": "~2.3.0", - "range-parser": "~1.2.0", - "statuses": "~1.4.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - } - } - }, - "serve-static": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", - "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.2", - "send": "0.16.2" - } - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -5517,11 +4654,6 @@ } } }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -5546,47 +4678,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, - "single-line-log": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/single-line-log/-/single-line-log-1.1.2.tgz", - "integrity": "sha1-wvg/Jzo+GhbtsJlWYdoO1e8DM2Q=", - "requires": { - "string-width": "^1.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, "sisteransi": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.0.tgz", @@ -5598,11 +4689,6 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -5741,6 +4827,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -5749,12 +4836,14 @@ "spdx-exceptions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -5763,12 +4852,8 @@ "spdx-license-ids": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", - "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==" - }, - "speedometer": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz", - "integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=" + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", + "dev": true }, "split-string": { "version": "3.1.0", @@ -5778,14 +4863,6 @@ "extend-shallow": "^3.0.0" } }, - "split2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", - "requires": { - "through2": "^2.0.2" - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -5796,6 +4873,7 @@ "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -5833,11 +4911,6 @@ } } }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", @@ -5882,28 +4955,6 @@ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "sumchecker": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-1.3.1.tgz", - "integrity": "sha1-ebs7RFbdBPGOvbwNcDodHa7FEF0=", - "requires": { - "debug": "^2.2.0", - "es6-promise": "^4.0.5" - } - }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -6056,20 +5107,6 @@ "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", "dev": true }, - "throttleit": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-0.0.2.tgz", - "integrity": "sha1-z+34jmDADdlpe2H90qg0OptoDq8=" - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, "tmpl": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", @@ -6124,6 +5161,7 @@ "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" @@ -6146,11 +5184,6 @@ } } }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", @@ -6261,6 +5294,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -6268,7 +5302,8 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true }, "type-check": { "version": "0.3.2", @@ -6284,20 +5319,6 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, - "type-is": { - "version": "1.6.16", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", - "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.18" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, "typescript": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.1.tgz", @@ -6364,11 +5385,6 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -6414,6 +5430,7 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, "requires": { "punycode": "^2.1.0" }, @@ -6421,7 +5438,8 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true } } }, @@ -6441,7 +5459,8 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true }, "util.promisify": { "version": "1.0.0", @@ -6453,34 +5472,27 @@ "object.getownpropertydescriptors": "^2.0.3" } }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" - }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -6628,11 +5640,6 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", @@ -6666,14 +5673,6 @@ "decamelize": "^1.2.0" } }, - "yauzl": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", - "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", - "requires": { - "fd-slicer": "~1.0.1" - } - }, "yn": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", diff --git a/package.json b/package.json index c954aa2..363b346 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { "name": "data-forge-plot", - "version": "0.3.11", + "version": "0.4.0", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", "scripts": { + "setup": "npm install --save=false data-forge", "c": "npm run clean", "clean": "rm -rf build/*", "b": "npm run build", @@ -13,7 +14,7 @@ "clean-build": "npm run clean && npm run build", "build:watch": "tsc --watch", "clean-build:watch": "rm -rf build/* && tsc --watch", - "prepublishOnly": "npm test && npm run clean-build", + "prepublishOnly": "npm run setup && npm test && npm run clean-build", "l": "npm run lint", "lint": "tslint -c tslint.json 'src/**/*.{ts,tsx}'", "pretest": "npm run lint", @@ -37,7 +38,6 @@ "@data-forge-plot/apex": "0.0.39", "@data-forge-plot/chart-def": "^1.1.2", "@data-forge/serialization": "^1.0.0", - "capture-template": "^1.1.10", "inflate-template": "^1.1.6", "opn": "^5.5.0", "typy": "^3.0.1" diff --git a/src/plot-api.ts b/src/plot-api.ts index 4b3ee94..a9559ce 100644 --- a/src/plot-api.ts +++ b/src/plot-api.ts @@ -2,7 +2,6 @@ const opn = require("opn"); import * as path from "path"; import { ISerializedDataFrame } from "@data-forge/serialization"; import { exportTemplate, IExportOptions } from "inflate-template"; -import { captureImage, ICaptureOptions } from "capture-template"; import { IPlotConfig, IAxisMap } from "./chart-def"; import { isObject } from "./utils"; import { ChartType, IChartDef, AxisType, HorizontalLabelPosition, VerticalLabelPosition, IAxisConfig, IYAxisSeriesConfig, IAxisSeriesConfig, IXAxisConfig, IYAxisConfig } from "@data-forge-plot/chart-def"; @@ -143,11 +142,6 @@ export interface IPlotAPI { */ y2(): IYAxisConfigAPI; - /** - * Render the plot to an image file. - */ - renderImage(imageFilePath: string, renderOptions?: IRenderOptions): Promise; - /** * Export an interactive web visualization of the chart. */ @@ -372,46 +366,6 @@ export abstract class AbstractPlotAPI implements IPlotAPI { ); } - /** - * Render the plot to an image file. - */ - async renderImage(imageFilePath: string, renderOptions?: IRenderOptions): Promise { - - const chartDef = this.serialize(); - if (renderOptions && renderOptions.showChartDef) { - console.log("Expanded chart definition:"); - console.log(JSON.stringify(chartDef, null, 4)); - } - - const templatePath = renderOptions && renderOptions.template || await findChartTemplatePath(); - const captureOptions: ICaptureOptions = { - electronPath: renderOptions && renderOptions.electronPath, - inflateOptions: { - inMemoryFiles: [ - { - file: "chart-def.json", - content: JSON.stringify( - { - chartDef, - options: { - makeStatic: true, - showChartDef: renderOptions && renderOptions.showChartDef || false, - }, - }, - null, - 4 - ), - }, - ], - }, - }; - await captureImage(templatePath, { chartDef }, imageFilePath, captureOptions); - - if (renderOptions && renderOptions.openImage) { - opn(path.resolve(imageFilePath)); - } - } - /** * Export an interactive web visualization of the chart. */ diff --git a/src/test/plot-api.test.ts b/src/test/plot-api.test.ts index c6573c3..45f283f 100644 --- a/src/test/plot-api.test.ts +++ b/src/test/plot-api.test.ts @@ -1,7 +1,5 @@ import "jest"; -jest.mock("capture-template"); jest.mock("inflate-template"); -import { captureImage } from "capture-template"; import { exportTemplate } from "inflate-template"; import { PlotAPI } from "../plot-api"; import { ChartType, HorizontalLabelPosition, VerticalLabelPosition, AxisType } from "@data-forge-plot/chart-def"; @@ -418,16 +416,6 @@ describe("plot-api", () => { expect(serialized.plotConfig.y2!.label!.position).toBe(VerticalLabelPosition.OuterMiddle); }); - it("can render image", async () => { - const data: any = {}; - const plotConfig: IPlotConfig = { x: { label: { position: HorizontalLabelPosition.OuterRight }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const outputPath = "./output/test"; - await plot.renderImage(outputPath); - expect(captureImage).toHaveBeenCalled(); - }); - it("can export web", async () => { const data: any = {}; const plotConfig: IPlotConfig = { x: { label: { position: HorizontalLabelPosition.OuterRight }}}; From 03e1acc89f32595e858640412f669769cf553de9 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Mon, 13 May 2019 17:18:56 +1000 Subject: [PATCH 15/28] Moved IRenderOptions to render plugin. --- package.json | 2 +- src/plot-api.ts | 30 +----------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 363b346..2389f1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.4.0", + "version": "0.4.1", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", diff --git a/src/plot-api.ts b/src/plot-api.ts index a9559ce..3a25049 100644 --- a/src/plot-api.ts +++ b/src/plot-api.ts @@ -16,7 +16,7 @@ const DEFAULT_CHART_PACKAGE = "@data-forge-plot/apex"; // // TODO :export let globalChartRenderer: IChartRenderer | null = null; -async function findChartTemplatePath(): Promise { +export async function findChartTemplatePath(): Promise { const defaultTemplatePath = require.resolve(`${DEFAULT_CHART_PACKAGE}/build/template/template.json`); const chartTemplatesPath = path.dirname(defaultTemplatePath); return chartTemplatesPath; @@ -38,34 +38,6 @@ export async function endPlot(): Promise { */ } -/** - * Options for image rendering. - */ -export interface IRenderOptions { - /** - * Open the image in your default image viewer. - */ - openImage?: boolean; - - /** - * Path to electron, so that electron can be installed separately to a different location and shared - * between the various packages that need it. - * - * Electron is used to render charts and capture them to images. - */ - electronPath?: string; - - /** - * Name of the template used to render the image. - */ - template?: string; - - /** - * Set to true to show the chart definition after expansion and also after formatting. - */ - showChartDef?: boolean; -} - /** * Options for exporting web projects for interactive charts. */ From 06bf2d2955de759f5fc03590e67a29328a8fb2db Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Tue, 14 May 2019 17:47:21 +1000 Subject: [PATCH 16/28] Updated readme and exports. --- README.md | 10 ++++++++-- package.json | 2 +- src/index.ts | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 30a09d4..049552a 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,12 @@ Please join the conversation on [Gitter](https://gitter.im/data-forge) ## Breaking changes -As of version 0.4.0 the Nightmare/Electron depenency has been removed along with the `renderImage` function. The `renderImage` function will soon be made available in a separately installable plugin. This has been removed due to the size that the Electron dependency adds to this package. In the future you you will have to install the separate package to render a plot to an image. +As of version 0.4.0 the Nightmare/Electron depenency has been removed along with the `renderImage` function. + +The `renderImage` function has been moved to the separate library [@data-forge-plot/render](todo). This has been removed due to the size that the Electron dependency adds to this package. In the future you you will have to install the separate package to render a plot to an image. + +Please note that the sample code below to see how the new library is installed and *required* to access the `renderImage` function. + ## Project Goals @@ -32,7 +37,7 @@ Some instructions for using Data-Forge Plot. These instructions are for JavaScri ### Install - npm install --save data-forge data-forge-plot + npm install --save data-forge data-forge-plot data-forge-plot-render ### Setup @@ -40,6 +45,7 @@ Some instructions for using Data-Forge Plot. These instructions are for JavaScri const dataForge = require('data-forge'); require('data-forge-fs'); // Extends Data-Forge with 'readFile' function. require('data-forge-plot'); // Extends Data-Forge with the 'plot' function. + require('@data-forge-plot/render'); // Extends Data-Forge Plot with the 'renderImage' function. ``` ### Rendering a chart from a CSV file to an image file diff --git a/package.json b/package.json index 2389f1f..63b4b02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.4.1", + "version": "0.4.3", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", diff --git a/src/index.ts b/src/index.ts index a8acc9d..a0f4473 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,7 @@ import { IDataFrame, DataFrame } from "data-forge"; import { IPlotAPI, PlotAPI, /*todo: globalChartRenderer,*/ startPlot, endPlot } from "./plot-api"; import { IPlotConfig, IAxisMap } from "./chart-def"; export * from "./chart-def"; +export { IPlotAPI } from "./plot-api"; export { ChartType, AxisType, HorizontalLabelPosition, VerticalLabelPosition } from "@data-forge-plot/chart-def"; // From 800b0b40bb96088c118cb49adbcfdf9727ba42e0 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Tue, 21 May 2019 22:30:48 +1000 Subject: [PATCH 17/28] Removed Data-Forge Plot example code to a separate repo. --- examples/STW.csv | 760 ------------------------------------- examples/example-1.ts | 39 -- examples/example-10.ts | 56 --- examples/example-11.ts | 31 -- examples/example-2.ts | 44 --- examples/example-3.ts | 42 -- examples/example-4.ts | 48 --- examples/example-5.ts | 42 -- examples/example-6.ts | 43 --- examples/example-7.ts | 40 -- examples/example-8.ts | 45 --- examples/example-9.ts | 69 ---- examples/package-lock.json | 110 ------ examples/package.json | 20 - examples/run.bat | 11 - 15 files changed, 1400 deletions(-) delete mode 100644 examples/STW.csv delete mode 100644 examples/example-1.ts delete mode 100644 examples/example-10.ts delete mode 100644 examples/example-11.ts delete mode 100644 examples/example-2.ts delete mode 100644 examples/example-3.ts delete mode 100644 examples/example-4.ts delete mode 100644 examples/example-5.ts delete mode 100644 examples/example-6.ts delete mode 100644 examples/example-7.ts delete mode 100644 examples/example-8.ts delete mode 100644 examples/example-9.ts delete mode 100644 examples/package-lock.json delete mode 100644 examples/package.json delete mode 100644 examples/run.bat diff --git a/examples/STW.csv b/examples/STW.csv deleted file mode 100644 index de55dc5..0000000 --- a/examples/STW.csv +++ /dev/null @@ -1,760 +0,0 @@ -date,open,high,low,close,volume -2/01/2015,50.03,50.4,50.03,50.4,84844 -5/01/2015,50.69,50.73,50.32,50.65,42645 -6/01/2015,50.18,50.18,49.46,49.77,232437 -7/01/2015,49.88,49.88,49.3,49.63,58253 -8/01/2015,49.9,50.05,49.74,49.77,83496 -9/01/2015,49.93,50.69,49.93,50.69,46818 -12/01/2015,50.26,50.51,50.24,50.28,55655 -13/01/2015,49.91,50.22,49.79,49.99,117553 -14/01/2015,50,50.09,49.53,49.6,36094 -15/01/2015,49.51,49.51,49.12,49.39,47060 -16/01/2015,49.2,49.39,48.8,49.08,135653 -19/01/2015,49.58,49.82,49.11,49.19,67519 -20/01/2015,49.24,49.24,48.99,49.24,72647 -21/01/2015,49.5,50,49.48,49.98,48733 -22/01/2015,50.31,50.45,50.11,50.2,149185 -23/01/2015,50.78,51,50.66,51,126883 -27/01/2015,51.04,51.47,50.99,51.32,222744 -28/01/2015,51.18,51.53,51.14,51.44,59821 -29/01/2015,51.19,51.69,51.09,51.57,115067 -30/01/2015,51.81,52.1,51.79,51.82,175872 -2/02/2015,51.84,52.29,51.8,52.08,103012 -3/02/2015,52.39,52.99,52.17,52.82,490148 -4/02/2015,53.54,53.8,53.18,53.52,200494 -5/02/2015,53.52,53.94,53.36,53.88,182557 -6/02/2015,54.03,54.26,53.83,53.89,245743 -9/02/2015,53.79,53.92,53.57,53.92,129986 -10/02/2015,54.01,54.01,53.58,53.78,40312 -11/02/2015,54,54,53.37,53.51,64443 -12/02/2015,53.92,53.92,53.22,53.35,93260 -13/02/2015,53.75,54.65,53.75,54.53,450344 -16/02/2015,54.61,54.71,54.15,54.58,109518 -17/02/2015,54.37,54.64,54.27,54.41,191610 -18/02/2015,54.79,54.98,54.43,54.91,153915 -19/02/2015,55,55.31,54.75,54.93,141390 -20/02/2015,55.01,55.01,54.58,54.63,44591 -23/02/2015,54.86,55.01,54.59,54.94,61687 -24/02/2015,55.02,55.22,54.8,55.21,63450 -25/02/2015,55.28,55.59,55.21,55.43,98839 -26/02/2015,55.43,55.43,55.05,55.11,99926 -27/02/2015,55.24,55.55,54.84,55.42,67964 -2/03/2015,55.48,55.94,55.37,55.62,109107 -3/03/2015,55.85,56.09,55.22,55.45,106674 -4/03/2015,55.63,55.63,55.13,55.2,137470 -5/03/2015,55.07,55.28,54.9,55.28,237175 -6/03/2015,55.47,55.53,54.94,55.14,63024 -9/03/2015,54.9,54.9,54.4,54.43,70103 -10/03/2015,54.76,54.79,54.36,54.61,141506 -11/03/2015,54.16,54.43,53.9,54.27,59723 -12/03/2015,54.17,54.92,54.17,54.92,99904 -13/03/2015,54.95,54.98,54.33,54.5,38244 -16/03/2015,54.38,54.52,54.05,54.43,38327 -17/03/2015,54.9,55.01,54.73,54.78,161812 -18/03/2015,54.67,54.79,54.43,54.76,67793 -19/03/2015,55.3,55.9,55.3,55.82,532261 -20/03/2015,55.76,56.17,55.74,56.17,143862 -23/03/2015,56.17,56.27,55.82,55.92,72589 -24/03/2015,55.86,56.15,55.86,56.06,56683 -25/03/2015,56,56.24,55.95,56.11,67146 -26/03/2015,55.67,55.67,55.15,55.15,82754 -27/03/2015,55.06,55.74,55.06,55.57,40953 -30/03/2015,55.2,55.21,54.66,54.82,197036 -31/03/2015,55.5,55.72,55.27,55.36,126468 -1/04/2015,54.92,55.31,54.83,55.04,187449 -2/04/2015,55.14,55.43,54.58,55.31,52939 -7/04/2015,55.76,56.15,55.32,55.55,123909 -8/04/2015,55.64,56.13,55.64,56,74101 -9/04/2015,56.05,56.05,55.66,55.67,77246 -10/04/2015,55.95,56.05,55.66,55.98,29926 -13/04/2015,56.15,56.32,55.91,56,81870 -14/04/2015,55.85,55.89,55.66,55.79,97128 -15/04/2015,55.88,55.96,55.31,55.48,82100 -16/04/2015,55.85,56.04,55.68,55.84,52935 -17/04/2015,55.82,55.82,55.08,55.16,73444 -20/04/2015,54.99,54.99,54.55,54.84,201005 -21/04/2015,55.26,55.34,54.98,55.09,86550 -22/04/2015,55.15,55.16,54.6,54.72,36209 -23/04/2015,54.85,54.95,54.69,54.82,74827 -24/04/2015,55.21,55.77,55.21,55.74,294994 -27/04/2015,55.86,56.24,55.86,56.24,147112 -28/04/2015,56.29,56.29,55.87,55.87,111248 -29/04/2015,55.66,55.71,54.81,54.81,91594 -30/04/2015,54.37,54.45,53.97,54.38,166594 -1/05/2015,54.28,54.65,54.11,54.58,183600 -4/05/2015,54.71,54.93,54.39,54.66,90645 -5/05/2015,55.19,55.47,54.46,54.64,154445 -6/05/2015,54.12,54.15,53.45,53.45,166968 -7/05/2015,53,53.08,52.46,52.81,161375 -8/05/2015,53.26,53.43,52.82,52.94,278166 -11/05/2015,53.4,53.6,52.69,52.7,74368 -12/05/2015,52.84,53.46,52.7,53.32,81167 -13/05/2015,53.59,53.89,53.44,53.88,190110 -14/05/2015,53.64,53.68,53.35,53.68,40719 -15/05/2015,54.18,54.29,53.82,54.09,82532 -18/05/2015,54.1,54.37,53.39,53.39,63160 -19/05/2015,53.66,53.66,53,53.17,154215 -20/05/2015,53,53.1,52.68,53.01,149783 -21/05/2015,53.05,53.55,53.05,53.46,118234 -22/05/2015,53.77,53.77,53.43,53.54,55232 -25/05/2015,53.53,54.19,53.53,54,85101 -26/05/2015,54.08,54.55,54.08,54.5,115497 -27/05/2015,54.23,54.31,53.95,54.09,204683 -28/05/2015,54.4,54.4,53.74,53.96,351645 -29/05/2015,54.26,54.92,54.23,54.63,609757 -1/06/2015,54.28,54.34,53.64,54.13,112478 -2/06/2015,54.31,54.48,53.23,53.23,362866 -3/06/2015,53.11,53.11,52.63,52.66,369552 -4/06/2015,52.92,52.92,51.96,52.01,157170 -5/06/2015,51.84,52.21,51.64,51.97,125166 -9/06/2015,51.98,52.18,51.61,51.65,126317 -10/06/2015,51.72,51.79,51.5,51.77,153806 -11/06/2015,52.13,52.5,52.03,52.43,116872 -12/06/2015,52.49,52.49,52.18,52.36,160967 -15/06/2015,52.09,52.31,51.85,52.27,250347 -16/06/2015,52.41,52.67,52.2,52.3,242950 -17/06/2015,52.59,52.97,52.59,52.88,124973 -18/06/2015,52.85,52.85,51.91,52.13,94646 -19/06/2015,52.7,53.05,52.64,52.85,186882 -22/06/2015,52.86,53.03,52.55,53.03,87010 -23/06/2015,53.44,53.78,53.44,53.67,173947 -24/06/2015,53.77,53.93,53.66,53.78,131740 -25/06/2015,53.63,53.63,53.21,53.21,346128 -26/06/2015,52.01,52.37,51.62,52.2,652266 -29/06/2015,51.52,51.55,50.57,50.75,269162 -30/06/2015,50.35,51.01,50.35,50.94,248618 -1/07/2015,50.95,51.5,50.95,51.5,93127 -2/07/2015,51.68,52.4,51.57,52.26,209136 -3/07/2015,52.27,52.27,51.23,51.61,110390 -6/07/2015,50.84,51.28,50.7,51.08,137924 -7/07/2015,51.46,52.16,51.4,52.05,282704 -8/07/2015,51.59,51.86,51.07,51.07,101683 -9/07/2015,50.66,51.26,50.21,51.09,231648 -10/07/2015,51.36,51.6,51.21,51.26,67073 -13/07/2015,51.28,51.72,50.89,51.09,59989 -14/07/2015,51.93,52.16,51.85,52.06,119927 -15/07/2015,52.13,52.63,52.13,52.55,78847 -16/07/2015,52.95,53.12,52.7,52.88,362962 -17/07/2015,53.13,53.14,52.7,52.94,209485 -20/07/2015,52.86,53.07,52.71,53.02,66593 -21/07/2015,53.25,53.4,53.08,53.27,147358 -22/07/2015,52.86,52.88,52.38,52.42,183646 -23/07/2015,52.36,52.42,52.09,52.16,110030 -24/07/2015,51.87,52.3,51.73,51.91,219209 -27/07/2015,51.65,52.13,51.65,52.13,176722 -28/07/2015,51.65,52.32,51.53,52.09,212572 -29/07/2015,52.7,52.75,52.49,52.52,84266 -30/07/2015,52.8,52.98,52.72,52.92,74214 -31/07/2015,53.02,53.21,53.02,53.16,54302 -3/08/2015,53.25,53.25,52.91,52.93,36108 -4/08/2015,52.95,53.48,52.8,53.15,1688292 -5/08/2015,53,53.05,52.6,52.91,75879 -6/08/2015,52.61,52.61,52.09,52.24,100817 -7/08/2015,51.57,51.64,51.1,51.1,157327 -10/08/2015,50.99,51.45,50.9,51.39,80049 -11/08/2015,51.88,51.88,50.98,51.12,111183 -12/08/2015,50.9,51.29,49.9,50.18,217338 -13/08/2015,50.25,50.74,50.16,50.3,155905 -14/08/2015,50.22,50.42,49.86,49.95,108244 -17/08/2015,50.2,50.47,50.1,50.16,88846 -18/08/2015,50.27,50.53,49.72,49.72,91195 -19/08/2015,49.97,50.48,49.97,50.42,177197 -20/08/2015,49.98,49.98,49.43,49.52,149238 -21/08/2015,48.98,49.22,48.45,48.87,857218 -24/08/2015,47.9,48.01,46.9,46.95,520584 -25/08/2015,45.73,48.45,45.73,48.25,358173 -26/08/2015,47.31,48.77,47.16,48.6,185321 -27/08/2015,49.37,49.6,49.2,49.27,185726 -28/08/2015,50,50.02,49.22,49.5,115882 -31/08/2015,49.2,49.3,48.55,48.99,94430 -1/09/2015,48.77,48.98,47.92,47.95,270532 -2/09/2015,47.5,48.07,47.23,48.05,239482 -3/09/2015,48.53,48.85,47.44,47.45,129001 -4/09/2015,47.56,47.87,47.1,47.53,112249 -7/09/2015,47.53,47.65,46.95,47.55,244516 -8/09/2015,47.8,48.3,47.75,48.3,141573 -9/09/2015,48.83,49.49,48.83,49.49,116558 -10/09/2015,48.43,48.56,48.17,48.25,147559 -11/09/2015,48.22,48.36,47.69,47.89,93436 -14/09/2015,48.6,48.6,47.99,48.22,77721 -15/09/2015,48.38,48.46,47.49,47.53,69584 -16/09/2015,48.01,48.32,47.73,48.32,69888 -17/09/2015,49.01,49.2,48.66,48.69,67261 -18/09/2015,48.52,49.2,48.21,48.94,79896 -21/09/2015,48.09,48.12,47.56,47.97,521925 -22/09/2015,48.54,49.35,47.95,48.23,81783 -23/09/2015,47.64,47.83,47.22,47.31,123568 -24/09/2015,47.5,48.01,47.5,48,65657 -25/09/2015,48.32,48.43,47.68,47.81,174716 -28/09/2015,47.7,48.43,47.66,48.43,165321 -29/09/2015,47.37,47.37,46.63,46.63,300714 -30/09/2015,46.74,47.58,46.68,47.58,291885 -1/10/2015,47.69,48.49,47.69,48.43,284705 -2/10/2015,47.93,48.49,47.75,47.85,75299 -5/10/2015,48.51,48.82,48.29,48.74,73777 -6/10/2015,49.2,49.45,48.95,48.95,175631 -7/10/2015,49.16,49.26,48.65,49.23,129193 -8/10/2015,49.65,49.84,49.3,49.39,140182 -9/10/2015,49.92,50.08,49.7,49.98,170767 -12/10/2015,49.8,49.91,49.48,49.6,177995 -13/10/2015,49.45,49.5,49,49.25,122001 -14/10/2015,49,49.26,48.88,49.2,264584 -15/10/2015,49.27,49.64,49.24,49.51,315810 -16/10/2015,49.95,50.24,49.83,49.99,147912 -19/10/2015,50,50.13,49.76,49.84,191563 -20/10/2015,49.71,49.83,49.45,49.57,105974 -21/10/2015,49.36,49.81,49.18,49.66,109832 -22/10/2015,49.58,49.85,49.41,49.84,50437 -23/10/2015,50.73,50.9,50.63,50.66,93239 -26/10/2015,50.99,51.05,50.66,50.66,238059 -27/10/2015,50.69,50.8,50.63,50.73,53195 -28/10/2015,50.68,50.7,50.37,50.53,57863 -29/10/2015,50.74,50.74,49.8,49.87,73976 -30/10/2015,49.6,49.87,49.25,49.65,559853 -2/11/2015,49.72,49.74,48.88,48.96,83675 -3/11/2015,49.38,49.75,49.2,49.66,51788 -4/11/2015,50.12,50.4,49.63,49.66,85414 -5/11/2015,49.74,49.74,49.05,49.26,56114 -6/11/2015,49.44,49.69,49.02,49.59,268615 -9/11/2015,49.31,49.36,48.52,48.68,492733 -10/11/2015,48.49,48.5,47.98,48.45,197223 -11/11/2015,48.53,48.9,48.52,48.9,170693 -12/11/2015,48.61,49.11,48.43,48.91,115391 -13/11/2015,48.12,48.26,47.75,48.14,274148 -16/11/2015,47.42,47.95,47.25,47.76,355250 -17/11/2015,48.12,48.83,48.06,48.83,146795 -18/11/2015,48.56,49.1,48.52,48.96,90718 -19/11/2015,49.47,50.01,49.26,50,1075829 -20/11/2015,50,50.27,49.93,50.13,220889 -23/11/2015,49.98,50.41,49.98,50.27,107464 -24/11/2015,49.98,50.23,49.82,49.82,107798 -25/11/2015,49.91,49.92,49.5,49.57,87757 -26/11/2015,49.52,50.14,49.51,49.69,222835 -27/11/2015,50,50.21,49.56,49.63,81902 -30/11/2015,49.63,49.7,49.3,49.33,928861 -1/12/2015,49.28,50.39,49.28,50.19,587671 -2/12/2015,50.16,50.31,49.98,50.18,254345 -3/12/2015,49.73,49.99,49.62,49.87,184740 -4/12/2015,49.12,49.13,48.8,49.13,182579 -7/12/2015,49.89,49.99,49.16,49.2,169224 -8/12/2015,48.75,49.04,48.64,48.74,90119 -9/12/2015,48.55,48.83,48.34,48.43,282599 -10/12/2015,48.32,48.43,47.61,48.06,461308 -11/12/2015,48.02,48.28,47.79,47.95,202849 -14/12/2015,47.28,47.5,47,47.02,235555 -15/12/2015,47.04,47.38,46.85,46.85,218540 -16/12/2015,47.32,47.94,47.23,47.94,189521 -17/12/2015,48.53,48.98,48.53,48.66,134994 -18/12/2015,48.02,48.81,47.93,48.69,666014 -21/12/2015,48.32,48.92,48.32,48.77,55724 -22/12/2015,49.21,49.39,48.74,48.85,89915 -23/12/2015,49.07,49.35,49.03,49.09,124156 -24/12/2015,49.59,49.75,49.47,49.57,59274 -29/12/2015,48.51,49.2,48.48,49.2,133137 -30/12/2015,49.64,49.72,49.47,49.66,107188 -31/12/2015,49.58,49.7,49.39,49.39,65504 -4/01/2016,49.35,49.75,49.09,49.16,100426 -5/01/2016,48.71,48.75,48.31,48.36,138295 -6/01/2016,48.65,48.65,47.47,47.79,70590 -7/01/2016,47.74,47.8,46.58,46.74,3419969 -8/01/2016,46.34,46.91,45.9,46.55,146740 -11/01/2016,45.86,46.07,45.51,46.07,416884 -12/01/2016,46.02,46.46,45.75,45.96,92970 -13/01/2016,46.07,46.64,46.03,46.57,131700 -14/01/2016,45.59,46,45.38,45.77,259557 -15/01/2016,46.52,46.67,45.43,45.65,111868 -18/01/2016,45.03,45.38,44.77,45.36,168264 -19/01/2016,45.36,45.78,45.15,45.72,138991 -20/01/2016,45.7,45.98,45.11,45.19,82582 -21/01/2016,45.72,46.04,45.38,45.42,204792 -22/01/2016,45.85,46.03,45.62,45.92,61825 -25/01/2016,46.5,46.74,46.34,46.71,197060 -27/01/2016,46.59,46.63,46.11,46.17,119281 -28/01/2016,46.16,46.59,45.79,46.47,189609 -29/01/2016,46.46,46.9,46.18,46.67,106853 -1/02/2016,47.14,47.34,46.93,47.09,431855 -2/02/2016,47.1,47.1,46.46,46.61,413527 -3/02/2016,45.98,46.16,45.45,45.53,67584 -4/02/2016,45.99,46.57,45.92,46.39,60857 -5/02/2016,46.47,46.47,46.02,46.41,76714 -8/02/2016,46.12,46.5,45.98,46.4,89291 -9/02/2016,45.8,45.8,45.03,45.05,132241 -10/02/2016,45.26,45.26,43.89,44.55,220578 -11/02/2016,44.78,45.06,44.55,45.06,80621 -12/02/2016,44.63,44.89,44.45,44.56,136304 -15/02/2016,45.22,45.37,44.73,45.25,112539 -16/02/2016,45.7,45.99,45.11,45.99,189800 -17/02/2016,46.01,46.15,45.58,45.69,97638 -18/02/2016,46.39,46.8,46.36,46.75,124696 -19/02/2016,46.66,46.72,46.2,46.38,54519 -22/02/2016,46.38,46.92,46.34,46.89,411353 -23/02/2016,47.11,47.27,46.55,46.68,148659 -24/02/2016,46.35,46.35,45.61,45.73,141601 -25/02/2016,46.08,46.17,45.5,45.83,78133 -26/02/2016,46.02,46.02,45.46,45.79,47895 -29/02/2016,45.97,46.32,45.82,45.9,186317 -1/03/2016,45.85,46.44,45.84,46.37,99427 -2/03/2016,47.09,47.63,46.97,47.32,189661 -3/03/2016,47.51,47.94,47.47,47.9,206361 -4/03/2016,48,48.13,47.91,47.96,128352 -7/03/2016,48.38,48.59,48.32,48.55,304424 -8/03/2016,48.8,48.86,48.12,48.19,98606 -9/03/2016,48,48.68,47.96,48.68,82090 -10/03/2016,48.8,48.89,48.62,48.65,91683 -11/03/2016,48.7,48.96,48.36,48.81,287935 -14/03/2016,49.14,49.26,48.9,48.93,301297 -15/03/2016,48.86,48.9,48.24,48.29,95182 -16/03/2016,48.2,48.4,48.08,48.34,262177 -17/03/2016,48.82,49.08,48.59,48.82,67087 -18/03/2016,49.21,49.35,48.88,48.93,104168 -21/03/2016,48.97,49.14,48.63,48.78,52919 -22/03/2016,49.05,49.05,48.66,48.83,37928 -23/03/2016,48.81,48.81,48.4,48.66,54039 -24/03/2016,48.24,48.25,47.91,48.05,107571 -29/03/2016,48.12,48.2,47.22,47.22,57222 -30/03/2016,47.73,47.8,47.13,47.3,115795 -31/03/2016,47.88,48.2,47.83,48.01,103122 -1/04/2016,47.7,47.7,47,47.26,187427 -4/04/2016,47.37,47.73,47.21,47.23,64916 -5/04/2016,47.15,47.15,46.39,46.52,129453 -6/04/2016,46.41,46.89,46.39,46.75,458544 -7/04/2016,46.91,47.13,46.81,46.91,81273 -8/04/2016,46.45,46.81,46.24,46.66,82649 -11/04/2016,46.77,46.77,46.42,46.58,62949 -12/04/2016,46.49,47.04,46.49,47,118217 -13/04/2016,47.39,47.77,47.39,47.76,94119 -14/04/2016,48.05,48.41,47.94,48.33,209547 -15/04/2016,48.35,48.76,48.34,48.73,226737 -18/04/2016,48.43,48.74,48.4,48.55,132793 -19/04/2016,49.12,49.34,49,49.02,107127 -20/04/2016,49.35,49.52,49.15,49.29,91333 -21/04/2016,49.94,50.04,49.64,49.84,150894 -22/04/2016,49.47,49.84,49.43,49.5,60204 -26/04/2016,49.36,49.63,49.25,49.28,294198 -27/04/2016,49.52,49.9,48.91,49.03,89959 -28/04/2016,49.35,49.49,49.2,49.36,57640 -29/04/2016,49.38,49.69,49.26,49.66,112226 -2/05/2016,49.44,49.56,48.96,49.56,67709 -3/05/2016,49.19,50.67,49.19,50.6,149321 -4/05/2016,50.29,50.43,49.8,49.8,190841 -5/05/2016,49.74,50.01,49.61,49.86,61112 -6/05/2016,49.54,50,49.11,49.95,39931 -9/05/2016,50.05,50.4,49.85,50.39,344185 -10/05/2016,50.25,50.61,50.09,50.6,302161 -11/05/2016,50.95,51.43,50.81,50.89,359673 -12/05/2016,50.71,50.89,50.66,50.84,163862 -13/05/2016,50.93,50.98,50.39,50.59,56220 -16/05/2016,50.5,51,50.5,50.84,145305 -17/05/2016,51.2,51.34,51.12,51.31,74938 -18/05/2016,51.09,51.3,50.87,50.92,42234 -19/05/2016,51.09,51.09,50.45,50.65,40110 -20/05/2016,50.69,51.03,50.59,50.9,126197 -23/05/2016,50.98,51.06,50.45,50.61,86239 -24/05/2016,50.55,50.68,50.37,50.37,202420 -25/05/2016,51.13,51.32,50.97,51.18,111365 -26/05/2016,51.26,51.4,50.93,51.25,76249 -27/05/2016,51.41,51.65,51.41,51.44,126153 -30/05/2016,51.5,51.52,51.33,51.47,127632 -31/05/2016,51.42,51.42,51.01,51.15,80205 -1/06/2016,50.69,50.83,50.48,50.63,99569 -2/06/2016,50.67,50.69,50.14,50.2,100389 -3/06/2016,50.59,50.65,50.33,50.58,198455 -6/06/2016,50.61,51.15,50.49,50.98,160309 -7/06/2016,51.06,51.31,51,51.02,74432 -8/06/2016,50.87,51.15,50.79,51.1,58952 -9/06/2016,51.15,51.27,50.78,51.05,82129 -10/06/2016,50.64,50.72,50.36,50.56,143601 -14/06/2016,49.76,49.85,49.44,49.51,261274 -15/06/2016,49.3,49.43,49,49,91714 -16/06/2016,49.01,50,48.9,48.95,96975 -17/06/2016,49.16,49.25,48.98,49.11,178937 -20/06/2016,49.7,50.02,49.6,50.02,115817 -21/06/2016,50.01,50.35,49.92,50.16,110121 -22/06/2016,50.2,50.42,50.07,50.14,109042 -23/06/2016,50.28,50.35,50.12,50.25,807535 -24/06/2016,50.5,50.65,48.3,48.62,597139 -27/06/2016,48.52,49.04,48.28,48.86,179480 -28/06/2016,48.22,48.66,48.02,48.53,226446 -29/06/2016,48.92,49.01,47.96,48.09,246485 -30/06/2016,48.73,49.18,48.69,48.86,245095 -1/07/2016,49.1,49.5,49,49.14,364289 -4/07/2016,49.05,49.48,48.92,49.48,205382 -5/07/2016,49.56,49.56,48.92,48.93,279628 -6/07/2016,48.69,48.76,48.22,48.65,167318 -7/07/2016,49.07,49.13,48.81,48.96,118333 -8/07/2016,48.9,49.12,48.86,49.03,58278 -11/07/2016,49.63,50,49.63,50,134494 -12/07/2016,50.32,50.53,50.18,50.18,204779 -13/07/2016,50.5,50.53,50.28,50.5,139848 -14/07/2016,50.58,50.77,50.55,50.71,128745 -15/07/2016,50.8,51.1,50.78,50.87,127223 -18/07/2016,50.89,51.18,50.89,51.16,40660 -19/07/2016,51.16,51.21,50.91,51.03,114528 -20/07/2016,51.03,51.41,51.03,51.41,73043 -21/07/2016,51.84,51.87,51.56,51.67,97731 -22/07/2016,51.59,51.66,51.34,51.5,50075 -25/07/2016,51.69,52,51.69,51.83,80207 -26/07/2016,51.69,51.88,51.5,51.87,339961 -27/07/2016,52.06,52.15,51.81,51.89,133572 -28/07/2016,51.99,52.13,51.95,52.05,167017 -29/07/2016,52.06,52.2,51.88,52.13,176510 -1/08/2016,52.23,52.58,52.13,52.31,131539 -2/08/2016,52.21,52.4,51.89,51.9,256834 -3/08/2016,51.54,51.54,51.21,51.21,132956 -4/08/2016,51.41,51.57,51.31,51.32,70849 -5/08/2016,51.46,51.62,51.45,51.53,55730 -8/08/2016,51.88,51.96,51.8,51.9,84331 -9/08/2016,51.83,52.02,51.83,52,96415 -10/08/2016,51.88,51.89,51.65,51.88,146980 -11/08/2016,51.69,51.69,51.37,51.6,41990 -12/08/2016,51.97,52.05,51.65,51.87,39779 -15/08/2016,51.7,52.01,51.7,51.93,67971 -16/08/2016,51.99,52.04,51.86,51.87,43993 -17/08/2016,51.84,52.08,51.78,52.07,201657 -18/08/2016,52.22,52.22,51.72,51.78,202382 -19/08/2016,51.97,52.02,51.75,51.98,35828 -22/08/2016,51.94,52.07,51.78,51.78,98603 -23/08/2016,52.01,52.44,51.99,52.24,254196 -24/08/2016,52.48,52.49,52.35,52.42,140536 -25/08/2016,52.34,52.42,52.15,52.2,136238 -26/08/2016,52.12,52.21,51.93,51.95,30886 -29/08/2016,51.96,51.98,51.43,51.58,75809 -30/08/2016,52,52,51.68,51.74,157070 -31/08/2016,51.6,51.6,51.1,51.27,107919 -1/09/2016,51.09,51.3,51.04,51.17,76613 -2/09/2016,51.05,51.05,50.64,50.73,113184 -5/09/2016,51,51.32,50.91,51.29,92899 -6/09/2016,51.24,51.26,50.7,51.18,191607 -7/09/2016,51.19,51.45,51.11,51.32,147499 -8/09/2016,51.02,51.07,50.7,50.99,937066 -9/09/2016,50.64,50.65,50.44,50.56,47970 -12/09/2016,49.69,49.72,49.36,49.41,132606 -13/09/2016,49.91,49.95,49.32,49.36,190490 -14/09/2016,49.2,49.55,49.19,49.51,72235 -15/09/2016,49.33,49.71,49.22,49.71,56063 -16/09/2016,49.96,50.3,49.91,50.16,520160 -19/09/2016,50.08,50.28,49.91,50.19,18569 -20/09/2016,50.05,50.19,49.99,50.15,49818 -21/09/2016,50.29,50.68,50.26,50.61,1168700 -22/09/2016,50.94,51.19,50.89,51.19,168172 -23/09/2016,51.14,51.69,51.04,51.69,231852 -26/09/2016,51.28,51.53,51.26,51.45,179920 -27/09/2016,51.08,51.32,50.89,51.26,70766 -28/09/2016,51.3,51.52,51.15,51.3,186984 -29/09/2016,51.15,51.21,51.05,51.15,106871 -30/09/2016,50.79,50.96,50.65,50.85,68999 -3/10/2016,51.01,51.36,51.01,51.23,46863 -4/10/2016,51.21,51.32,50.99,51.32,65067 -5/10/2016,51.1,51.1,50.88,50.98,1181370 -6/10/2016,51.13,51.31,51.13,51.26,99996 -7/10/2016,51.38,51.41,51.04,51.12,60136 -10/10/2016,51.26,51.39,51.16,51.21,102948 -11/10/2016,51.4,51.42,51.22,51.25,154236 -12/10/2016,50.86,51.16,50.8,51.16,39818 -13/10/2016,50.97,50.97,50.69,50.8,72815 -14/10/2016,50.86,50.9,50.79,50.79,61743 -17/10/2016,50.71,50.84,50.4,50.4,72976 -18/10/2016,50.43,50.64,50.36,50.61,140981 -19/10/2016,50.83,50.85,50.7,50.81,119927 -20/10/2016,50.91,51,50.78,50.91,132449 -21/10/2016,50.89,50.91,50.58,50.76,29515 -24/10/2016,50.75,50.75,50.26,50.55,90202 -25/10/2016,50.67,51.04,50.67,50.88,39062 -26/10/2016,50.46,50.52,49.96,50.09,88945 -27/10/2016,50.1,50.1,49.54,49.54,72287 -28/10/2016,49.51,49.57,49.19,49.41,67229 -31/10/2016,49.35,49.81,49.35,49.73,153218 -1/11/2016,49.46,49.49,49.3,49.45,141468 -2/11/2016,49.04,49.1,48.7,48.86,112783 -3/11/2016,48.57,49,48.55,48.89,170312 -4/11/2016,48.6,48.73,48.5,48.52,223444 -7/11/2016,48.8,49.21,48.77,49.19,365158 -8/11/2016,49.42,49.49,49.16,49.29,282270 -9/11/2016,49.52,49.8,47.31,48.34,532102 -10/11/2016,49.77,49.97,49.6,49.97,138024 -11/11/2016,50.09,50.36,50.03,50.36,89682 -14/11/2016,50.33,50.36,50,50.27,74220 -15/11/2016,50.13,50.16,49.92,50.12,77609 -16/11/2016,50.3,50.32,50.04,50.11,126695 -17/11/2016,49.78,50.26,49.74,50.23,36271 -18/11/2016,50.33,50.5,50.29,50.45,83968 -21/11/2016,50.37,50.51,50.21,50.36,252269 -22/11/2016,50.7,51.1,50.7,50.99,210273 -23/11/2016,50.99,51.69,50.96,51.66,190707 -24/11/2016,51.79,51.81,51.53,51.64,126501 -25/11/2016,51.73,52,51.6,51.81,281121 -28/11/2016,51.86,51.86,51.48,51.48,35884 -29/11/2016,51.42,51.66,51.38,51.39,55936 -30/11/2016,51.34,51.41,51.07,51.13,16624 -1/12/2016,51.54,51.8,51.38,51.8,183287 -2/12/2016,51.66,51.69,51.26,51.26,42619 -5/12/2016,51.16,51.16,50.67,50.83,86763 -6/12/2016,51.17,51.29,51.05,51.11,45096 -7/12/2016,51.36,51.59,51.31,51.59,192107 -8/12/2016,51.98,52.24,51.97,52.18,248205 -9/12/2016,52.25,52.39,52.15,52.33,59490 -12/12/2016,52.35,52.56,52.27,52.36,118451 -13/12/2016,52.23,52.47,52.18,52.23,44062 -14/12/2016,52.34,52.69,52.34,52.6,68345 -15/12/2016,52.27,52.38,51.95,52.15,74705 -16/12/2016,52.18,52.26,51.9,52.06,125867 -19/12/2016,52.13,52.53,52.13,52.36,215616 -20/12/2016,52.35,52.83,52.35,52.64,80105 -21/12/2016,52.79,53.01,52.79,52.85,67650 -22/12/2016,52.83,53.16,52.8,53.14,39371 -23/12/2016,53.16,53.2,52.92,52.96,39387 -28/12/2016,53.27,53.62,53.27,53.56,54578 -29/12/2016,53.01,53.26,52.89,53.26,55770 -30/12/2016,53.11,53.14,52.91,52.92,39828 -3/01/2017,52.97,53.61,52.97,53.57,68555 -4/01/2017,53.56,53.61,53.5,53.55,98428 -5/01/2017,53.71,53.79,53.69,53.73,61875 -6/01/2017,53.75,53.83,53.66,53.74,137648 -9/01/2017,53.82,54.43,53.82,54.26,186224 -10/01/2017,54.01,54.06,53.63,53.76,912441 -11/01/2017,54,54.1,53.84,53.89,319514 -12/01/2017,54.08,54.16,53.79,53.85,395370 -13/01/2017,53.94,53.94,53.32,53.44,555994 -16/01/2017,53.63,53.77,53.63,53.68,85093 -17/01/2017,53.51,53.51,53.18,53.23,135002 -18/01/2017,52.99,53.02,52.84,53.02,120814 -19/01/2017,53.26,53.41,53.01,53.09,166502 -20/01/2017,52.89,52.91,52.73,52.86,266201 -23/01/2017,53.09,53.13,52.34,52.41,110203 -24/01/2017,52.5,52.79,52.41,52.75,370169 -25/01/2017,53.14,53.2,52.84,52.98,71896 -27/01/2017,53.14,53.38,53.01,53.32,862705 -30/01/2017,53.11,53.11,52.73,52.87,72995 -31/01/2017,52.63,52.66,52.34,52.51,80180 -1/02/2017,52.6,52.8,52.41,52.78,35496 -2/02/2017,52.98,53,52.6,52.73,54425 -3/02/2017,52.68,52.9,52.45,52.48,101418 -6/02/2017,52.73,52.87,52.35,52.44,50817 -7/02/2017,52.35,52.5,52.14,52.5,61019 -8/02/2017,52.52,52.84,52.52,52.81,27412 -9/02/2017,52.88,52.98,52.63,52.92,35786 -10/02/2017,53.28,53.47,53.2,53.45,115234 -13/02/2017,53.57,53.9,53.55,53.82,76093 -14/02/2017,54.08,54.18,53.8,53.83,260753 -15/02/2017,54.13,54.38,54.11,54.3,60604 -16/02/2017,54.43,54.52,54.15,54.38,53953 -17/02/2017,54.38,54.39,54.21,54.26,38660 -20/02/2017,54.35,54.35,54.08,54.21,33609 -21/02/2017,54.32,54.32,54.08,54.2,47436 -22/02/2017,54.42,54.49,54.26,54.49,54677 -23/02/2017,54.32,54.44,54.13,54.35,36872 -24/02/2017,54.28,54.28,53.84,53.91,36949 -27/02/2017,53.8,53.94,53.65,53.76,279430 -28/02/2017,53.86,54.1,53.72,53.72,105432 -1/03/2017,53.59,53.68,53.41,53.68,376923 -2/03/2017,54.3,54.43,54.28,54.43,158410 -3/03/2017,54.05,54.05,53.83,53.95,73535 -6/03/2017,54.04,54.17,53.87,54.16,72175 -7/03/2017,54.03,54.46,53.95,54.33,57454 -8/03/2017,54.22,54.34,54.13,54.34,852373 -9/03/2017,54.22,54.44,54.1,54.24,1791811 -10/03/2017,54.45,54.65,54.37,54.57,137946 -13/03/2017,54.58,54.59,54.29,54.38,158850 -14/03/2017,54.59,54.67,54.29,54.42,49425 -15/03/2017,54.31,54.61,54.14,54.61,46276 -16/03/2017,54.89,54.94,54.49,54.67,111741 -17/03/2017,54.74,54.99,54.71,54.84,44027 -20/03/2017,54.51,54.72,54.5,54.57,39768 -21/03/2017,54.44,54.65,54.37,54.6,30034 -22/03/2017,54.01,54.03,53.68,53.72,96647 -23/03/2017,53.85,53.97,53.77,53.94,66115 -24/03/2017,54.07,54.56,54.07,54.37,1581130 -27/03/2017,53.99,54.35,53.88,54.32,91760 -28/03/2017,54.55,55.08,54.54,55.04,305012 -29/03/2017,55.19,55.58,55.19,55.51,165791 -30/03/2017,55.27,55.37,55.18,55.33,271098 -31/03/2017,55.28,55.4,55.04,55.04,217408 -3/04/2017,55.01,55.13,54.83,55.1,259221 -4/04/2017,55.06,55.08,54.87,55,90758 -5/04/2017,55.12,55.2,54.86,55.12,57918 -6/04/2017,54.97,55.01,54.75,54.98,41662 -7/04/2017,55.15,55.3,54.81,55.03,106324 -10/04/2017,55.26,55.49,55.26,55.49,76290 -11/04/2017,55.42,55.88,55.38,55.7,63428 -12/04/2017,55.74,55.82,55.54,55.69,284332 -13/04/2017,55.39,55.42,55.22,55.32,86410 -18/04/2017,55.2,55.22,54.69,54.82,90535 -19/04/2017,54.55,54.67,54.38,54.51,197912 -20/04/2017,54.68,54.69,54.56,54.63,62077 -21/04/2017,54.96,55.11,54.93,55.02,256180 -24/04/2017,55.24,55.4,54.98,55.12,156150 -26/04/2017,55.57,55.66,55.5,55.52,45117 -27/04/2017,55.55,55.66,55.49,55.6,51041 -28/04/2017,55.44,55.61,55.32,55.61,205787 -1/05/2017,55.53,55.9,55.53,55.9,116355 -2/05/2017,55.87,55.87,55.57,55.83,85744 -3/05/2017,55.75,55.85,55.23,55.32,69190 -4/05/2017,55.41,55.42,54.98,55.17,106615 -5/05/2017,55.15,55.21,54.7,54.81,101735 -8/05/2017,55.41,55.41,55.12,55.23,110364 -9/05/2017,55.14,55.15,54.86,54.91,283425 -10/05/2017,54.8,55.38,54.65,55.26,152004 -11/05/2017,55.47,55.71,55.27,55.28,142702 -12/05/2017,55.05,55.29,54.66,54.86,213193 -15/05/2017,54.6,54.97,54.6,54.92,91040 -16/05/2017,55.16,55.37,54.99,55.15,118100 -17/05/2017,54.98,55,54.51,54.55,135292 -18/05/2017,54.01,54.2,53.81,54.2,169774 -19/05/2017,54.16,54.16,53.9,54.08,97074 -22/05/2017,54.39,54.59,54.37,54.51,68114 -23/05/2017,54.57,54.79,54.36,54.4,89593 -24/05/2017,54.6,54.62,54.37,54.51,69080 -25/05/2017,54.66,54.72,54.36,54.71,72234 -26/05/2017,54.58,54.58,54.23,54.34,145437 -29/05/2017,54.41,54.41,53.91,53.91,117036 -30/05/2017,53.97,54.08,53.63,54.07,181787 -31/05/2017,54.08,54.23,53.94,54.08,66419 -1/06/2017,54,54.22,53.95,54.16,137076 -2/06/2017,54.55,54.75,54.46,54.73,57738 -5/06/2017,54.56,54.56,54.2,54.37,74770 -6/06/2017,54.12,54.12,53.53,53.53,66920 -7/06/2017,53.59,53.66,53.31,53.54,227952 -8/06/2017,53.25,53.64,53.18,53.62,175591 -9/06/2017,53.39,53.79,53.39,53.66,234085 -13/06/2017,53.78,54.57,53.71,54.57,81379 -14/06/2017,54.63,55.18,54.63,55.15,665761 -15/06/2017,54.76,54.82,54.33,54.42,75085 -16/06/2017,54.52,54.75,54.42,54.52,86525 -19/06/2017,54.49,54.9,54.49,54.86,102523 -20/06/2017,54.81,54.88,54.41,54.41,95570 -21/06/2017,53.79,53.79,53.5,53.53,132398 -22/06/2017,53.64,54.1,53.63,53.94,1695087 -23/06/2017,54.04,54.09,53.81,54,97471 -26/06/2017,54.1,54.35,53.99,54.08,73590 -27/06/2017,54.08,54.08,53.68,53.99,516016 -28/06/2017,53.85,54.44,53.85,54.38,229361 -29/06/2017,54.21,54.67,54.21,54.49,142386 -30/06/2017,53.97,54.25,53.56,53.56,243084 -3/07/2017,53.54,53.68,53.22,53.23,73371 -4/07/2017,53.74,54.26,53.74,54.17,99596 -5/07/2017,54.18,54.18,53.89,54.08,55548 -6/07/2017,54,54,53.75,53.96,23071 -7/07/2017,53.46,53.53,53.16,53.39,121412 -10/07/2017,53.65,53.83,53.57,53.65,162196 -11/07/2017,53.72,53.8,53.39,53.69,97647 -12/07/2017,53.56,53.58,53.05,53.14,118003 -13/07/2017,53.65,53.78,53.49,53.78,50151 -14/07/2017,53.85,54.13,53.835,53.91,96521 -17/07/2017,53.8,54.09,53.71,53.9,285374 -18/07/2017,53.88,53.95,53.16,53.27,100416 -19/07/2017,53.73,53.82,53.4,53.7,127641 -20/07/2017,53.97,54.01,53.85,53.94,117423 -21/07/2017,53.64,53.92,53.43,53.58,144145 -24/07/2017,53.31,53.31,52.95,53.23,91267 -25/07/2017,53.36,53.8,53.36,53.63,98962 -26/07/2017,54.09,54.21,54.09,54.11,63783 -27/07/2017,54.15,54.32,54.14,54.19,85021 -28/07/2017,53.89,53.89,53.3,53.35,97278 -31/07/2017,53.45,53.82,53.4,53.58,86856 -1/08/2017,53.53,54.1,53.5,54.06,56194 -2/08/2017,54.2,54.2,53.71,53.8,44773 -3/08/2017,53.82,53.82,53.45,53.67,70605 -4/08/2017,53.5,53.76,53.48,53.6,31443 -7/08/2017,53.9,54.17,53.9,54.06,83681 -8/08/2017,54.2,54.28,53.59,53.81,125460 -9/08/2017,53.7,54.13,53.66,54.02,79709 -10/08/2017,54.06,54.32,53.83,53.95,100586 -11/08/2017,53.65,53.65,53.21,53.4,206927 -14/08/2017,53.67,53.78,53.5,53.73,92538 -15/08/2017,54.05,54.19,53.96,53.99,171919 -16/08/2017,54,54.4,53.87,54.4,98064 -17/08/2017,54.61,54.61,54.21,54.33,55468 -18/08/2017,53.72,54.09,53.69,54.07,116179 -21/08/2017,54.02,54.04,53.59,53.82,161670 -22/08/2017,53.95,54.17,53.95,54.15,698261 -23/08/2017,54.51,54.58,53.89,54.02,85588 -24/08/2017,53.95,54.23,53.82,54.09,189374 -25/08/2017,54.15,54.2,53.94,54.14,92502 -28/08/2017,54.14,54.14,53.73,53.82,92787 -29/08/2017,53.62,53.62,53.23,53.45,111494 -30/08/2017,53.67,53.67,53.38,53.54,63560 -31/08/2017,53.74,53.96,53.67,53.93,33524 -1/09/2017,54.08,54.2,53.85,54.06,88373 -4/09/2017,54.01,54.01,53.75,53.88,48257 -5/09/2017,53.99,54,53.54,53.88,54425 -6/09/2017,53.71,53.9,53.57,53.8,51479 -7/09/2017,54.03,54.17,53.8,53.81,54210 -8/09/2017,53.99,53.99,53.64,53.76,40978 -11/09/2017,53.98,54.27,53.98,54.18,121492 -12/09/2017,54.44,54.66,54.38,54.48,50239 -13/09/2017,54.82,54.82,54.49,54.5,101023 -14/09/2017,54.47,54.53,54.36,54.4,31953 -15/09/2017,54.25,54.28,53.95,54.05,181486 -18/09/2017,54.2,54.38,54.2,54.29,92985 -19/09/2017,54.37,54.48,54.21,54.21,89168 -20/09/2017,54.1,54.22,53.9,54.15,98350 -21/09/2017,54.15,54.15,53.5,53.69,97335 -22/09/2017,53.87,53.98,53.71,53.95,60350 -25/09/2017,54.19,54.2,53.93,53.97,33898 -26/09/2017,54.08,54.13,53.83,53.85,79402 -27/09/2017,53.98,53.98,53.6,53.78,84591 -28/09/2017,53.25,53.36,52.91,52.98,222531 -29/09/2017,53.02,53.15,52.8,53.06,61870 -2/10/2017,53.33,53.75,53.28,53.6,61675 -3/10/2017,53.65,53.65,53.16,53.23,43539 -4/10/2017,53.26,53.26,52.77,52.79,151764 -5/10/2017,52.87,52.95,52.79,52.8,20993 -6/10/2017,53.27,53.33,53.08,53.33,131570 -9/10/2017,53.41,53.82,53.41,53.64,58591 -10/10/2017,53.44,53.72,53.44,53.58,701440 -11/10/2017,53.65,53.99,53.58,53.94,41330 -12/10/2017,53.89,54.12,53.86,54.11,90032 -13/10/2017,54.15,54.4,54.12,54.33,92674 -16/10/2017,54.56,54.71,54.55,54.63,62866 -17/10/2017,54.74,55.1,54.74,55.01,181283 -18/10/2017,54.99,55.2,54.99,55.1,66109 -19/10/2017,55.14,55.23,54.98,55.04,138271 -20/10/2017,54.85,55.37,54.85,55.18,213021 -23/10/2017,55.32,55.36,55.06,55.07,42863 -24/10/2017,55.07,55.2,55,55.12,35282 -25/10/2017,55.27,55.32,55.1,55.17,55123 -26/10/2017,55.12,55.27,54.99,55.27,69937 -27/10/2017,55.4,55.5,54.76,55.15,97473 -30/10/2017,55.4,55.42,55.22,55.31,31601 -31/10/2017,55.29,55.45,55.22,55.23,81692 -1/11/2017,55.38,55.62,55.38,55.46,101420 -2/11/2017,55.7,55.74,55.39,55.46,79999 -3/11/2017,55.6,55.78,55.53,55.72,59616 -6/11/2017,55.77,55.77,55.6,55.63,68785 -7/11/2017,55.92,56.24,55.92,56.23,67696 -8/11/2017,56.06,56.32,56.06,56.25,41631 -9/11/2017,56.44,56.67,56.38,56.63,78606 -10/11/2017,56.43,56.54,56.38,56.44,59056 -13/11/2017,56.57,56.65,56.5,56.62,110727 -14/11/2017,56.22,56.23,55.95,56.09,98522 -15/11/2017,55.88,55.96,55.74,55.74,103257 -16/11/2017,55.68,55.94,55.6,55.84,43752 -17/11/2017,56.19,56.2,55.95,55.97,47059 -20/11/2017,55.73,55.95,55.65,55.86,46987 -21/11/2017,56.07,56.1,55.89,56.06,49219 -22/11/2017,56.32,56.39,56.19,56.3,56837 -23/11/2017,56.24,56.29,56.13,56.25,50447 -24/11/2017,56.17,56.23,55.93,56.23,47310 -27/11/2017,56.15,56.45,56.15,56.31,59387 -28/11/2017,56.16,56.45,56.16,56.24,785248 -29/11/2017,56.57,56.69,56.48,56.5,165444 -30/11/2017,56.19,56.26,55.92,56.11,304441 -1/12/2017,56.33,56.46,56.2,56.31,55626 -4/12/2017,56.34,56.45,56.2,56.26,54864 -5/12/2017,55.94,56.26,55.9,56.09,66202 -6/12/2017,55.89,56.04,55.79,55.87,123299 -7/12/2017,55.96,56.28,55.91,56.25,47063 -8/12/2017,56.3,56.5,56.24,56.33,102838 -11/12/2017,56.52,56.55,56.3,56.38,44191 -12/12/2017,56.47,56.57,56.39,56.52,63047 -13/12/2017,56.6,56.67,56.41,56.58,114145 -14/12/2017,56.74,56.84,56.53,56.53,119652 -15/12/2017,56.43,56.48,56.28,56.35,70681 -18/12/2017,56.65,56.79,56.57,56.76,52818 -19/12/2017,56.95,57.17,56.95,57.06,62356 -20/12/2017,56.9,57.19,56.9,57.1,173303 -21/12/2017,56.92,56.97,56.88,56.89,422205 -22/12/2017,57.06,57.16,57,57,214591 -27/12/2017,57.17,57.25,57,57,92219 -28/12/2017,57.11,57.11,56.57,56.79,50671 -29/12/2017,56.81,56.81,56.42,56.57,432777 diff --git a/examples/example-1.ts b/examples/example-1.ts deleted file mode 100644 index ee1555a..0000000 --- a/examples/example-1.ts +++ /dev/null @@ -1,39 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/simple_multiple.html -// - -const data1 = [30, 200, 100, 400, 150, 250]; -const data2 = [50, 20, 10, 40, 15, 25]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - data1: data1, - data2: data2 - }, - }); - - //console.log(df.toString()); - - const plot = df.plot(); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-10.ts b/examples/example-10.ts deleted file mode 100644 index de98e35..0000000 --- a/examples/example-10.ts +++ /dev/null @@ -1,56 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/chart_scatter.html -// - -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.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8 ]; -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 ]; -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.0, 3.0, 4.0, 4.4, 3.9, 3.5, 3.8, 3.8, 3.4, 3.7, 3.6, 3.3, 3.4, 3.0, 3.4, 3.5, 3.4, 3.2, 3.1, 3.4, 4.1, 4.2, 3.1, 3.2, 3.5, 3.6, 3.0, 3.4, 3.5, 2.3, 3.2, 3.5, 3.8, 3.0, 3.8, 3.2, 3.7, 3.3 ]; -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 ]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import { ChartType } from '../src/index'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - versicolor_x: versicolor_x, - versicolor_y: versicolor_y, - setosa_x: setosa_x, - setosa_y: setosa_y, - }, - }); - - //console.log(df.head(10).toString()); - - const plot = df.plot() - .chartType(ChartType.Scatter) - .y() - .addSeries("versicolor_y") - .label("Versicolor") - //todo: .color("blue") - .setX("versicolor_x") - .y() - .addSeries("setosa_y") - .label("Setosa") - //todo: .color("green") - .setX("setosa_x"); - - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-11.ts b/examples/example-11.ts deleted file mode 100644 index 72ad784..0000000 --- a/examples/example-11.ts +++ /dev/null @@ -1,31 +0,0 @@ -// -// Example of rendering a line chart from real data. -// - -import * as dataForge from 'data-forge'; -import 'data-forge-fs'; -import 'data-forge-indicators'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - let df = (await dataForge.readFileSync("./STW.csv").parseCSV({ dynamicTyping: true })) - .parseDates("date", "D/MM/YYYY"); - df = df.merge(df.deflate(row => row.close).bollinger(20, 2, 2)); - - const plot = df.plot({}, { x: "date", y: [ "close", "upper", "middle", "lower" ] }); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-2.ts b/examples/example-2.ts deleted file mode 100644 index 02ee85d..0000000 --- a/examples/example-2.ts +++ /dev/null @@ -1,44 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/timeseries.html -// - -const x = ['2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06']; -const data1 = [30, 200, 100, 400, 150, 250]; -const data2 = [130, 340, 200, 500, 250, 350]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - date: x, - data1: data1, - data2: data2 - }, - }) - .parseDates("date", "YYYY-MM-DD") - .setIndex("date") - .dropSeries("date"); - - //console.log(df.toString()); - - const plot = df.plot(); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-3.ts b/examples/example-3.ts deleted file mode 100644 index 422effd..0000000 --- a/examples/example-3.ts +++ /dev/null @@ -1,42 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/timeseries.html -// - -const x = ['2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06']; -const data1 = [30, 200, 100, 400, 150, 250]; -const data2 = [130, 340, 200, 500, 250, 350]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - date: x, - data1: data1, - data2: data2 - }, - }) - .parseDates("date", "YYYY-MM-DD"); - - //console.log(df.toString()); - - const plot = df.plot({}, { x: "date", y: [ "data1", "data2" ]}); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-4.ts b/examples/example-4.ts deleted file mode 100644 index 3426ae3..0000000 --- a/examples/example-4.ts +++ /dev/null @@ -1,48 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/timeseries.html -// - -const x = ['2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06']; -const data1 = [30, 200, 100, 400, 150, 250]; -const data2 = [130, 340, 200, 500, 250, 350]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - date: x, - data1: data1, - data2: data2 - }, - }) - .parseDates("date", "YYYY-MM-DD"); - - //console.log(df.toString()); - - const plot = df.plot() - .x() - .setSeries("date") - .y() - .addSeries("data1") - .y() - .addSeries("data2"); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-5.ts b/examples/example-5.ts deleted file mode 100644 index 74cd8ad..0000000 --- a/examples/example-5.ts +++ /dev/null @@ -1,42 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/chart_bar.html -// - -const data1 = [30, 200, 100, 400, 150, 250]; -const data2 = [130, 100, 140, 200, 150, 50]; -const data3 = [130, -150, 200, 300, -200, 100]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import { ChartType } from '../src/index'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - data1: data1, - data2: data2, - data3: data3, - }, - }); - - //console.log(df.toString()); - - const plot = df.plot({ chartType: ChartType.Bar }); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-6.ts b/examples/example-6.ts deleted file mode 100644 index 207d7bb..0000000 --- a/examples/example-6.ts +++ /dev/null @@ -1,43 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/chart_bar.html -// - -const data1 = [30, 200, 100, 400, 150, 250]; -const data2 = [130, 100, 140, 200, 150, 50]; -const data3 = [130, -150, 200, 300, -200, 100]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import { ChartType } from '../src/index'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - data1: data1, - data2: data2, - data3: data3, - }, - }); - - //console.log(df.toString()); - - const plot = df.plot() - .chartType(ChartType.Bar); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-7.ts b/examples/example-7.ts deleted file mode 100644 index e6e7c23..0000000 --- a/examples/example-7.ts +++ /dev/null @@ -1,40 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/chart_scatter.html -// - -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.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8 ]; -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 ]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import { ChartType } from '../src/index'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - versicolor_x: versicolor_x, - versicolor_y: versicolor_y, - }, - }); - - //console.log(df.toString()); - - const plot = df.plot({ chartType: ChartType.Scatter }, { x: "versicolor_x", y: "versicolor_y" }); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-8.ts b/examples/example-8.ts deleted file mode 100644 index 3211c61..0000000 --- a/examples/example-8.ts +++ /dev/null @@ -1,45 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/chart_scatter.html -// - -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.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8 ]; -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 ]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import { ChartType } from '../src/index'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - versicolor_x: versicolor_x, - versicolor_y: versicolor_y, - }, - }); - - //console.log(df.toString()); - - const plot = df.plot() - .chartType(ChartType.Scatter) - .x() - .setSeries("versicolor_x") - .y() - .addSeries("versicolor_y"); - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/example-9.ts b/examples/example-9.ts deleted file mode 100644 index 3b04d88..0000000 --- a/examples/example-9.ts +++ /dev/null @@ -1,69 +0,0 @@ -// -// This example modelled on the C3 example line chart. -// -// http://c3js.org/samples/chart_scatter.html -// - -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.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8 ]; -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 ]; -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.0, 3.0, 4.0, 4.4, 3.9, 3.5, 3.8, 3.8, 3.4, 3.7, 3.6, 3.3, 3.4, 3.0, 3.4, 3.5, 3.4, 3.2, 3.1, 3.4, 4.1, 4.2, 3.1, 3.2, 3.5, 3.6, 3.0, 3.4, 3.5, 2.3, 3.2, 3.5, 3.8, 3.0, 3.8, 3.2, 3.7, 3.3 ]; -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 ]; - -import { DataFrame } from 'data-forge'; -import '../src/index'; -import * as fs from 'fs-extra'; -import * as path from 'path'; -import { ChartType } from '../src/index'; - -const outputName = path.basename(__filename, ".ts"); -const outputPath = path.join("./output", outputName); -fs.emptyDirSync(outputPath); - -async function main(): Promise { - - const df = new DataFrame({ - columns: { - versicolor_x: versicolor_x, - versicolor_y: versicolor_y, - setosa_x: setosa_x, - setosa_y: setosa_y, - }, - }); - - //console.log(df.head(10).toString()); - - const plot = df.plot( - { - chartType: ChartType.Scatter - }, - { - y: [ - { - series: "versicolor_y", - label: "Versicolor", - color: "blue", - x: { - series: "versicolor_x", - } - }, - { - series: "setosa_y", - label: "Setosa", - color: "green", - x: { - series: "setosa_x", - } - }, - ], - } - ); - - await plot.renderImage(path.join(outputPath, "image.png"), { openImage: false }); - await plot.exportWeb(path.join(outputPath, "web"), { overwrite: true, openBrowser: false }); -} - -main() - .then(() => console.log("Done")) - .catch(err => console.error(err && err.stack || err)); - - diff --git a/examples/package-lock.json b/examples/package-lock.json deleted file mode 100644 index 5c3b094..0000000 --- a/examples/package-lock.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "name": "examples", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/fs-extra": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.5.tgz", - "integrity": "sha512-w7iqhDH9mN8eLClQOYTkhdYUOSpp25eXxfc6VbFOGtzxW34JcvctH2bKjj4jD4++z4R5iO5D+pg48W2e03I65A==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/node": { - "version": "11.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.5.tgz", - "integrity": "sha512-/OMMBnjVtDuwX1tg2pkYVSqRIDSmNTnvVvmvP/2xiMAAWf4a5+JozrApCrO4WCAILmXVxfNoQ3E+0HJbNpFVGg==", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" - }, - "data-forge-fs": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/data-forge-fs/-/data-forge-fs-0.0.6.tgz", - "integrity": "sha512-oTX8ofmbauqZGNeqCbniwlKwdKbM7SKYKAnUZmqL8YvU0U3l9njA6KuF2j68TAqAazzX4jvkn+Va/nwZCNctgQ==", - "requires": { - "chai": "^4.1.2" - } - }, - "data-forge-indicators": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/data-forge-indicators/-/data-forge-indicators-0.2.4.tgz", - "integrity": "sha512-Pa0NnTGFR9Bt/3w+0E5rd9I5pC00vEuryzU23KuVCTsxvlfN+t16rX5+8YCi8Y0GOU/ZomhkKBv3woam/KTrmQ==" - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "requires": { - "type-detect": "^4.0.0" - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - } - } -} diff --git a/examples/package.json b/examples/package.json deleted file mode 100644 index 77c1191..0000000 --- a/examples/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "examples", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "data-forge-fs": "0.0.6", - "data-forge-indicators": "^0.2.4", - "fs-extra": "^7.0.1" - }, - "devDependencies": { - "@types/fs-extra": "^5.0.5" - } -} diff --git a/examples/run.bat b/examples/run.bat deleted file mode 100644 index bb6a67d..0000000 --- a/examples/run.bat +++ /dev/null @@ -1,11 +0,0 @@ -call ts-node example-1.ts -call ts-node example-2.ts -call ts-node example-3.ts -call ts-node example-4.ts -call ts-node example-5.ts -call ts-node example-6.ts -call ts-node example-7.ts -call ts-node example-8.ts -call ts-node example-9.ts -call ts-node example-10.ts -call ts-node example-11.ts \ No newline at end of file From bb38ade05267f79a7c79455def63fff9b7382aaf Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Wed, 22 May 2019 18:16:41 +1000 Subject: [PATCH 18/28] Fixed documentation. --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 049552a..62e5e4c 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Some instructions for using Data-Forge Plot. These instructions are for JavaScri ### Install - npm install --save data-forge data-forge-plot data-forge-plot-render + npm install --save data-forge data-forge-plot @data-forge-plot/render ### Setup diff --git a/package.json b/package.json index 63b4b02..297b135 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.4.3", + "version": "0.4.4", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", From 27a10cf6538618e7129abd763d0da2938cbdd20a Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Wed, 22 May 2019 18:23:49 +1000 Subject: [PATCH 19/28] Fixes to documentation. --- README.md | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 62e5e4c..5d71913 100644 --- a/README.md +++ b/README.md @@ -70,11 +70,12 @@ To see examples of API usage please see my blog posts: - http://www.the-data-wrangler.com/introducing-data-forge-plot/ - http://www.the-data-wrangler.com/data-forge-plot-update/ - http://www.the-data-wrangler.com/data-forge-plot-update2/ +- http://www.the-data-wrangler.com/data-forge-plot-update3/ There's also a first example of DFP here (JavaScript): https://github.com/data-forge/data-forge-plot-first-example -There's a bunch of TypeScript examples in DFP's GitHub repo: +And a bunch of examples in this repo: -https://github.com/data-forge/data-forge-plot/tree/master/examples/ +https://github.com/data-forge/data-forge-plot-examples diff --git a/package.json b/package.json index 297b135..01ef756 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.4.4", + "version": "0.4.5", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", From 2c7c5a582af0adb42062f5c86e3af6f4f50835c9 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 20 Jun 2019 21:28:00 +1000 Subject: [PATCH 20/28] Fleshed out font settings in the chart def. --- package-lock.json | 29 +++++++++++---------- package.json | 6 ++--- src/chart-def.ts | 42 +++++++++---------------------- src/expand-chart-def.ts | 27 +++++++++++++++++--- src/test/expand-chart-def.test.ts | 24 +++++++++++++++--- src/test/plot-api.test.ts | 4 +-- 6 files changed, 75 insertions(+), 57 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1d894d4..3bf2321 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.4.0", + "version": "0.6.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,21 +240,21 @@ } }, "@data-forge-plot/apex": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.0.39.tgz", - "integrity": "sha512-u8ceYtKgW9Vpt6lsxWI43cQxzZwTvO/wq/SOLLB1D/1rQLAEMZZ+J1B7VaQtiStOZImWenKLHHR5ScUrunPXNg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.2.0.tgz", + "integrity": "sha512-ZEQ9zKQ5jWrjECEvd611qM1wSILFPvOJll7oV3q6aBSamFgo2j+BapSaNVeWQgYP5KG1jrzMz+fVFVyu5wj4GA==", "requires": { - "@data-forge-plot/chart-def": "^1.1.2", + "@data-forge-plot/chart-def": "^1.4.0", "@data-forge/serialization": "^1.0.0", - "apexcharts": "^3.6.9", + "apexcharts": "^3.8.0", "dayjs": "^1.8.13", "numeral": "^2.0.6" } }, "@data-forge-plot/chart-def": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.1.2.tgz", - "integrity": "sha512-bmaBz81QIS/4ljBVbAQG9q1895anm1SPDSYNR494Lh04Z9gPsI8aTFKzlT2YD+AE68lt2VWamdjc8MjAB08pKg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.4.0.tgz", + "integrity": "sha512-Np7dZACYKqkr2FBbdePou07ryFgSyoSJc3qDk9Db2l2wZNGSKiIChPNi2NQFTYznl7kkuZ6wIl+vDYro9Hxk4g==", "requires": { "@data-forge/serialization": "^1.0.0" } @@ -676,17 +676,16 @@ } }, "apexcharts": { - "version": "3.6.10", - "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.6.10.tgz", - "integrity": "sha512-RdlpC3KqEAAPBH7RaE6pwXGlp2XUtlNgAfE7xmvmquLl6W6RYU6dicIqPsuJtpePrZqLAYdbtxOiwrIrc7Xkjg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.8.0.tgz", + "integrity": "sha512-5BNH2wzmx3xOCDVXbEiOnyyxy7ngzvu8IUt59wxdIXipq4pqlGGmASehiEneUo1HfKu8a7enjiuDN5AjJtPINQ==", "requires": { "promise-polyfill": "8.1.0", - "svg.draggable.js": "^2.2.1", + "svg.draggable.js": "^2.2.2", "svg.easing.js": "^2.0.0", "svg.filter.js": "^2.0.2", - "svg.js": "^2.6.6", "svg.pathmorphing.js": "^0.1.3", - "svg.resize.js": "^1.4.1", + "svg.resize.js": "^1.4.3", "svg.select.js": "^2.1.2" } }, diff --git a/package.json b/package.json index 01ef756..d9e7c7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.4.5", + "version": "0.6.0", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.0.39", - "@data-forge-plot/chart-def": "^1.1.2", + "@data-forge-plot/apex": "0.2.0", + "@data-forge-plot/chart-def": "^1.4.0", "@data-forge/serialization": "^1.0.0", "inflate-template": "^1.1.6", "opn": "^5.5.0", diff --git a/src/chart-def.ts b/src/chart-def.ts index 1185a28..418b803 100644 --- a/src/chart-def.ts +++ b/src/chart-def.ts @@ -1,38 +1,26 @@ -import { ISerializedDataFrame } from "@data-forge/serialization"; -import { HorizontalLabelPosition, VerticalLabelPosition, AxisType, ChartType } from "@data-forge-plot/chart-def"; +import { AxisType, ChartType, IAxisLabelConfig, ILegendConfig, IDataLabels } from "@data-forge-plot/chart-def"; /** - * Defines the configuration of an axis label. + * Configures an axis of the chart. */ -export interface IAxisLabelConfig { - - /** - * The text for the label. - */ - text?: string; +export interface IAxisConfig { /** - * Position of the label. + * Label for the axis. */ - position?: HorizontalLabelPosition | VerticalLabelPosition; + label?: string | IAxisLabelConfig; } /** * Configures an axis of the chart. */ -export interface IAxisConfig { +export interface IXAxisConfig extends IAxisConfig { /** * Sets the type of the axis' data. - * Default: AxisType.Indexed ("indexed") */ axisType?: AxisType; - - /** - * Label for the axis. - */ - label?: string | IAxisLabelConfig; } /** @@ -51,17 +39,6 @@ export interface IYAxisConfig extends IAxisConfig { max?: number; } -/** - * Configures the legend of the chart. - */ -export interface ILegendConfig { - - /** - * Set to true (default) to show the legend for the chart . - */ - show?: boolean; -} - /** * Defines the chart. */ @@ -88,7 +65,7 @@ export interface IPlotConfig { /** * Configuration for the x axis. */ - x?: IAxisConfig; + x?: IXAxisConfig; /** * Configuration for the y axis. @@ -104,6 +81,11 @@ export interface IPlotConfig { * Configures the chart's legend. */ legend?: ILegendConfig; + + /** + * Configure data labels for the whole chart. + */ + dataLabels?: IDataLabels; } /** diff --git a/src/expand-chart-def.ts b/src/expand-chart-def.ts index a187a0f..7b024f6 100644 --- a/src/expand-chart-def.ts +++ b/src/expand-chart-def.ts @@ -1,4 +1,4 @@ -import { IChartDef, IPlotConfig as IExpandedPlotConfig, IAxisMap as IExpandedAxisMap, ChartType, IAxisConfig as IExpandedAxisConfig, IYAxisConfig as IExpandedYAxisConfig, IXAxisConfig as IExpandedXAxisConfig, IAxisSeriesConfig as IExpandedAxisSeriesConfig, IYAxisSeriesConfig as IExpandedYAxisSeriesConfig } from "@data-forge-plot/chart-def"; +import { IChartDef, IPlotConfig as IExpandedPlotConfig, IAxisMap as IExpandedAxisMap, IAxisConfig as IExpandedAxisConfig, IYAxisConfig as IExpandedYAxisConfig, IXAxisConfig as IExpandedXAxisConfig, IAxisSeriesConfig as IExpandedAxisSeriesConfig, IYAxisSeriesConfig as IExpandedYAxisSeriesConfig, ISeriesLabelConfig } from "@data-forge-plot/chart-def"; import { IAxisMap, IPlotConfig, IAxisConfig, IYAxisConfig, IAxisSeriesConfig, IYAxisSeriesConfig } from "./chart-def"; import { ISerializedDataFrame } from "@data-forge/serialization"; import { isString } from "./utils"; @@ -36,14 +36,33 @@ export function expandSeriesConfig(series: string | IAxisSeriesConfig): IExpande }; } else { - return Object.assign({}, series); + const inputSeriesConfig = series as IAxisSeriesConfig; + const expandedSeriesConfig: IExpandedAxisSeriesConfig = { + series: inputSeriesConfig.series, + }; + + if (inputSeriesConfig.label) { + expandedSeriesConfig.label = inputSeriesConfig.label; + } + + if (inputSeriesConfig.format) { + expandedSeriesConfig.format = inputSeriesConfig.format; + } + + if (inputSeriesConfig.color) { + expandedSeriesConfig.color = inputSeriesConfig.color; + } + + return expandedSeriesConfig; } } export function expandYSeriesConfig(series: string | IYAxisSeriesConfig): IExpandedYAxisSeriesConfig { const expanded = expandSeriesConfig(series) as IExpandedYAxisSeriesConfig; - if (expanded.x) { - expanded.x = expandSeriesConfig(expanded.x); + if (!isString(series)) { + if (series.x) { + expanded.x = expandSeriesConfig(series.x); + } } return expanded; } diff --git a/src/test/expand-chart-def.test.ts b/src/test/expand-chart-def.test.ts index d44ff64..d02e547 100644 --- a/src/test/expand-chart-def.test.ts +++ b/src/test/expand-chart-def.test.ts @@ -14,13 +14,31 @@ describe("expand chart def", () => { expect(expanded.series).toBe("my series"); }); - it("can clone object series config", () => { + it("can expand series config", () => { const seriesConfig = { series: "my series" }; const expanded = expandSeriesConfig(seriesConfig); expect(expanded).not.toBe(seriesConfig); expect(expanded).toEqual(seriesConfig); }); + it("can expand series config with string label", () => { + const seriesConfig = { series: "my series", label: "a great series" }; + const expanded = expandSeriesConfig(seriesConfig); + expect(expanded.label).toBe("a great series"); + }); + + it("can expand series config with format", () => { + const seriesConfig = { series: "my series", format: "the format!" }; + const expanded = expandSeriesConfig(seriesConfig); + expect(expanded.format).toBe("the format!"); + }); + + it("can expand series config with color", () => { + const seriesConfig = { series: "my series", format: "red" }; + const expanded = expandSeriesConfig(seriesConfig); + expect(expanded.format).toBe("red"); + }); + it("can expand y series config with specific x series as string", () => { const seriesConfig = { series: "my y series", x: "my x series" }; const expanded = expandYSeriesConfig(seriesConfig); @@ -163,8 +181,8 @@ describe("expand chart def", () => { it("can expand axis config", () => { const xConfig = { axisType: AxisType.Category }; - const yConfig = { axisType: AxisType.Numerical }; - const y2Config = { axisType: AxisType.Timeseries }; + const yConfig = {}; + const y2Config = {}; const expanded = expandChartDef({} as any, { x: xConfig, y: yConfig, y2: y2Config }, {}); expect(expanded.plotConfig.x).not.toBe(xConfig); expect(expanded.plotConfig.x).toEqual(xConfig); diff --git a/src/test/plot-api.test.ts b/src/test/plot-api.test.ts index 45f283f..718bb2c 100644 --- a/src/test/plot-api.test.ts +++ b/src/test/plot-api.test.ts @@ -183,7 +183,7 @@ describe("plot-api", () => { .addSeries("my series") .label("a great series") .serialize(); - expect(serialized.axisMap.y[0].label!).toBe("a great series"); + expect(serialized.axisMap.y[0].label).toBe("a great series"); }); it("can set specific x series for y axis series", () => { @@ -209,7 +209,7 @@ describe("plot-api", () => { .addSeries("my series") .label("a great series") .serialize(); - expect(serialized.axisMap.y2[0].label!).toBe("a great series"); + expect(serialized.axisMap.y2[0].label).toBe("a great series"); }); it("can set specific x series for y2 axis series", () => { From fd65106225f15a9a65f915d43de4ae7971997f37 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 27 Jun 2019 16:01:00 +1000 Subject: [PATCH 21/28] Updated chart def so that font for axis ticks can be configured. --- package-lock.json | 16 ++++++++-------- package.json | 6 +++--- src/chart-def.ts | 7 ++++++- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3bf2321..707b5e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.6.0", + "version": "0.6.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -240,11 +240,11 @@ } }, "@data-forge-plot/apex": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.2.0.tgz", - "integrity": "sha512-ZEQ9zKQ5jWrjECEvd611qM1wSILFPvOJll7oV3q6aBSamFgo2j+BapSaNVeWQgYP5KG1jrzMz+fVFVyu5wj4GA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.2.1.tgz", + "integrity": "sha512-jL2UISKtyn5Te+gqmaHMNdDVeIEQ547TK9n8MvEE/cjWwBAMyZdtNIEw5FyFTePspmy/bUzDlXvVZlz+aIj2lA==", "requires": { - "@data-forge-plot/chart-def": "^1.4.0", + "@data-forge-plot/chart-def": "^1.4.1", "@data-forge/serialization": "^1.0.0", "apexcharts": "^3.8.0", "dayjs": "^1.8.13", @@ -252,9 +252,9 @@ } }, "@data-forge-plot/chart-def": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.4.0.tgz", - "integrity": "sha512-Np7dZACYKqkr2FBbdePou07ryFgSyoSJc3qDk9Db2l2wZNGSKiIChPNi2NQFTYznl7kkuZ6wIl+vDYro9Hxk4g==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.4.1.tgz", + "integrity": "sha512-Gpq6/mzMCO+55nobF/a3v6ZnV0gn38VfUKZrZs+/NaXMunH9aNkJPA7eCAmXVamz/WZpirN9kT2+jCJpG2qpCw==", "requires": { "@data-forge/serialization": "^1.0.0" } diff --git a/package.json b/package.json index d9e7c7e..9d21ef8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.6.0", + "version": "0.6.2", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.2.0", - "@data-forge-plot/chart-def": "^1.4.0", + "@data-forge-plot/apex": "0.2.1", + "@data-forge-plot/chart-def": "^1.4.1", "@data-forge/serialization": "^1.0.0", "inflate-template": "^1.1.6", "opn": "^5.5.0", diff --git a/src/chart-def.ts b/src/chart-def.ts index 418b803..57e6dfb 100644 --- a/src/chart-def.ts +++ b/src/chart-def.ts @@ -1,5 +1,5 @@ -import { AxisType, ChartType, IAxisLabelConfig, ILegendConfig, IDataLabels } from "@data-forge-plot/chart-def"; +import { AxisType, ChartType, IAxisLabelConfig, ILegendConfig, IDataLabels, IAxisTicksConfiguration } from "@data-forge-plot/chart-def"; /** * Configures an axis of the chart. @@ -10,6 +10,11 @@ export interface IAxisConfig { * Label for the axis. */ label?: string | IAxisLabelConfig; + + /** + * Configuration for axis tick marks. + */ + ticks?: IAxisTicksConfiguration; } /** From 223e65ee56a1891a06299cc18efbbdbd293676e7 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 26 Sep 2019 15:18:42 +1000 Subject: [PATCH 22/28] Now using resolve-cwd because require.resolve doesn't work after browserify is run. --- package-lock.json | 35 +++++++++++++++++++++++++---------- package.json | 3 ++- src/plot-api.ts | 3 ++- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 707b5e7..ea25ff4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.6.1", + "version": "0.6.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2697,6 +2697,23 @@ "requires": { "pkg-dir": "^3.0.0", "resolve-cwd": "^2.0.0" + }, + "dependencies": { + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } } }, "imurmurhash": { @@ -4516,19 +4533,17 @@ } }, "resolve-cwd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", - "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "requires": { - "resolve-from": "^3.0.0" + "resolve-from": "^5.0.0" } }, "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "dev": true + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" }, "resolve-url": { "version": "0.2.1", diff --git a/package.json b/package.json index 9d21ef8..c5e53a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.6.2", + "version": "0.6.3", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -40,6 +40,7 @@ "@data-forge/serialization": "^1.0.0", "inflate-template": "^1.1.6", "opn": "^5.5.0", + "resolve-cwd": "^3.0.0", "typy": "^3.0.1" }, "peerDependencies": { diff --git a/src/plot-api.ts b/src/plot-api.ts index 3a25049..35c0ba9 100644 --- a/src/plot-api.ts +++ b/src/plot-api.ts @@ -7,6 +7,7 @@ import { isObject } from "./utils"; import { ChartType, IChartDef, AxisType, HorizontalLabelPosition, VerticalLabelPosition, IAxisConfig, IYAxisSeriesConfig, IAxisSeriesConfig, IXAxisConfig, IYAxisConfig } from "@data-forge-plot/chart-def"; import { expandChartDef } from "./expand-chart-def"; import { applyDefaults } from "./apply-defaults"; +const resolve = require('resolve-cwd'); const DEFAULT_CHART_PACKAGE = "@data-forge-plot/apex"; @@ -17,7 +18,7 @@ const DEFAULT_CHART_PACKAGE = "@data-forge-plot/apex"; // TODO :export let globalChartRenderer: IChartRenderer | null = null; export async function findChartTemplatePath(): Promise { - const defaultTemplatePath = require.resolve(`${DEFAULT_CHART_PACKAGE}/build/template/template.json`); + const defaultTemplatePath = resolve(`${DEFAULT_CHART_PACKAGE}/build/template/template.json`); const chartTemplatesPath = path.dirname(defaultTemplatePath); return chartTemplatesPath; } From 7624429f7ba9cf49263d163c64f42d693fa33763 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sun, 20 Oct 2019 19:31:42 +1000 Subject: [PATCH 23/28] Create FUNDING.yml --- .github/FUNDING.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..7549b0f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: ashleydavis From 63c706a0928a4df50f8445976413888a5ae7a1c3 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 11 Feb 2021 08:15:58 +1000 Subject: [PATCH 24/28] Data-Forge Plot is now just a wrapper for the Plot library. --- .vscode/settings.json | 2 +- README.md | 52 ++- package-lock.json | 751 ++++++++++++------------------ package.json | 10 +- src/apply-defaults.ts | 128 ----- src/chart-def.ts | 151 ------ src/expand-chart-def.ts | 129 ----- src/index.ts | 29 +- src/plot-api.ts | 661 -------------------------- src/test/apply-defaults.test.ts | 518 --------------------- src/test/dataframe-fluent.test.ts | 67 ++- src/test/dataframe.test.ts | 75 ++- src/test/expand-chart-def.test.ts | 202 -------- src/test/plot-api.test.ts | 428 ----------------- src/test/series.test.ts | 69 +-- 15 files changed, 423 insertions(+), 2849 deletions(-) delete mode 100644 src/apply-defaults.ts delete mode 100644 src/chart-def.ts delete mode 100644 src/expand-chart-def.ts delete mode 100644 src/plot-api.ts delete mode 100644 src/test/apply-defaults.test.ts delete mode 100644 src/test/expand-chart-def.test.ts delete mode 100644 src/test/plot-api.test.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index ec75252..52bdb61 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.tabSize": 4, - "editor.renderWhitespace": "boundary", + "editor.renderWhitespace": "none", "editor.insertSpaces": true, "typescript.reportStyleChecksAsWarnings": true, "editor.trimAutoWhitespace": true, diff --git a/README.md b/README.md index 5d71913..59b5922 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ The forgiving plotting API designed for use with [Data-Forge](https://github.com/data-forge/data-forge-ts). +Data-Forge Plot is now a simple wrapper for [the Plot library](https://www.npmjs.com/package/plot). + Use Data-Forge Plot to quickly and conveniently render charts from your data in JavaScript or TypeScript. It is an abstraction layer that connects Data-Forge with JavaScript visualization libraries so that it's easy to plot charts from your data. Why not do your data wrangling, analysis and visualization entirely in JavaScript? To support my effort please buy or help promote my book @@ -15,6 +17,24 @@ Please join the conversation on [Gitter](https://gitter.im/data-forge) ## Breaking changes +As of version 1.0.0 Data-Forge Plot has been gutted and reimplimented in terms of the [Plot library](https://www.npmjs.com/package/plot) (which is very similar). DFP is now just a wrapper for Plot to ease my maintence burden. + +The function `exportWeb` has been removed because it is to difficult to maintain. + +If you want to use this in the browser please use the [Plot library](https://www.npmjs.com/package/plot) instead, e.g.: + +```javascript +const dataframe = ... +const plotConfig = { ... }; +const axisMap = { ... }; +import { plot } from "plot"; +import "@plotex/render-dom"; +plot(dataframe.toArray(), plotConfig, axisMap) + .renderDOM(document.getElementByID("a-chart"); +``` + +-- + As of version 0.4.0 the Nightmare/Electron depenency has been removed along with the `renderImage` function. The `renderImage` function has been moved to the separate library [@data-forge-plot/render](todo). This has been removed due to the size that the Electron dependency adds to this package. In the future you you will have to install the separate package to render a plot to an image. @@ -26,7 +46,6 @@ Please note that the sample code below to see how the new library is installed a - To simply and conveniently from a series or dataframe to chart. - To create charts and visualizations in Node.js and the browser. -- To export web-based interactive charts that can easily be hosted under a web-server. - To be able to serialize a chart to JSON and then reinstantiate it from the JSON in a web-app. - To separate configuration and data definition to make it easy to reuse charts. - To configure charts in JSON or fluent API. @@ -37,7 +56,7 @@ Some instructions for using Data-Forge Plot. These instructions are for JavaScri ### Install - npm install --save data-forge data-forge-plot @data-forge-plot/render + npm install --save data-forge data-forge-plot @plotex/render-image ### Setup @@ -45,7 +64,8 @@ Some instructions for using Data-Forge Plot. These instructions are for JavaScri const dataForge = require('data-forge'); require('data-forge-fs'); // Extends Data-Forge with 'readFile' function. require('data-forge-plot'); // Extends Data-Forge with the 'plot' function. - require('@data-forge-plot/render'); // Extends Data-Forge Plot with the 'renderImage' function. + require('@plotex/render-image'); // Extends Data-Forge Plot with the 'renderImage' function. + require('@plotex/render-dom'); // Extends Data-Forge Plot with the 'renderDOM' function. ``` ### Rendering a chart from a CSV file to an image file @@ -55,27 +75,11 @@ Some instructions for using Data-Forge Plot. These instructions are for JavaScri await dataFrame.plot().renderImage("my-chart.png"); ``` -### Exporting a chart from a CSV file to an interactive web visualization +### Rendering a chart to a web page. ```javascript - const dataFrame = await dataForge.readFile("my-data-file.csv").parseCSV(); - await dataFrame.plot().exportWeb("./output-path"); + const dataArray = // ... acquire data, e.g. from a REST API ... + const dataFrame = new DataFrame(dataArray); + const chartElement = document.getElementById("chart"); + await dataFrame.plot().renderDOM(chartElement); ``` - -### More docs coming soon - -It's early days for DFP. I'll be working on more docs soon. - -To see examples of API usage please see my blog posts: -- http://www.the-data-wrangler.com/introducing-data-forge-plot/ -- http://www.the-data-wrangler.com/data-forge-plot-update/ -- http://www.the-data-wrangler.com/data-forge-plot-update2/ -- http://www.the-data-wrangler.com/data-forge-plot-update3/ - -There's also a first example of DFP here (JavaScript): - -https://github.com/data-forge/data-forge-plot-first-example - -And a bunch of examples in this repo: - -https://github.com/data-forge/data-forge-plot-examples diff --git a/package-lock.json b/package-lock.json index ea25ff4..709c3e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.6.3", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -239,31 +239,6 @@ } } }, - "@data-forge-plot/apex": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@data-forge-plot/apex/-/apex-0.2.1.tgz", - "integrity": "sha512-jL2UISKtyn5Te+gqmaHMNdDVeIEQ547TK9n8MvEE/cjWwBAMyZdtNIEw5FyFTePspmy/bUzDlXvVZlz+aIj2lA==", - "requires": { - "@data-forge-plot/chart-def": "^1.4.1", - "@data-forge/serialization": "^1.0.0", - "apexcharts": "^3.8.0", - "dayjs": "^1.8.13", - "numeral": "^2.0.6" - } - }, - "@data-forge-plot/chart-def": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@data-forge-plot/chart-def/-/chart-def-1.4.1.tgz", - "integrity": "sha512-Gpq6/mzMCO+55nobF/a3v6ZnV0gn38VfUKZrZs+/NaXMunH9aNkJPA7eCAmXVamz/WZpirN9kT2+jCJpG2qpCw==", - "requires": { - "@data-forge/serialization": "^1.0.0" - } - }, - "@data-forge/serialization": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@data-forge/serialization/-/serialization-1.0.0.tgz", - "integrity": "sha512-I1xNietgBq6635D52WYauLjQihHwtRsbx0JFCKkH3l/gRPmGky7jwC9+X26mlh1eOSKmuVFX+/1OtUU3upHJeg==" - }, "@jest/console": { "version": "24.7.1", "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.7.1.tgz", @@ -503,19 +478,18 @@ "@types/yargs": "^12.0.9" } }, - "@mrmlnc/readdir-enhanced": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", - "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "@plotex/chart-def": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@plotex/chart-def/-/chart-def-1.0.15.tgz", + "integrity": "sha512-q6cGi0MNPS0JRbrB6Z+kCTvh7ztVSHi+ZDONTH3ROwnLl2TZralSPhFf/0CKBUoNDEOyiDce0KjpWS88T+QIbw==", "requires": { - "call-me-maybe": "^1.0.1", - "glob-to-regexp": "^0.3.0" + "@plotex/serialization": "^1.0.11" } }, - "@nodelib/fs.stat": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.0.tgz", - "integrity": "sha512-LAQ1d4OPfSJ/BMbI2DuizmYrrkD9JMaTdi2hQTlI53lQ4kRQPyZQRS4CYQ7O66bnBBnP/oYdRxbk++X0xuFU6A==" + "@plotex/serialization": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@plotex/serialization/-/serialization-1.0.11.tgz", + "integrity": "sha512-ugvfkh6kSJQ2SnVAm733klHs5g50gMgSfxFDLQgqnV8RdUSdMMuzH/2iqcKJdcV9kvE/J/jTNAs+YECc57yb3Q==" }, "@types/babel__core": { "version": "7.1.1", @@ -654,7 +628,8 @@ "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true }, "ansi-styles": { "version": "3.2.1", @@ -675,20 +650,6 @@ "normalize-path": "^2.1.1" } }, - "apexcharts": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.8.0.tgz", - "integrity": "sha512-5BNH2wzmx3xOCDVXbEiOnyyxy7ngzvu8IUt59wxdIXipq4pqlGGmASehiEneUo1HfKu8a7enjiuDN5AjJtPINQ==", - "requires": { - "promise-polyfill": "8.1.0", - "svg.draggable.js": "^2.2.2", - "svg.easing.js": "^2.0.0", - "svg.filter.js": "^2.0.2", - "svg.pathmorphing.js": "^0.1.3", - "svg.resize.js": "^1.4.3", - "svg.select.js": "^2.1.2" - } - }, "append-transform": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", @@ -710,17 +671,20 @@ "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true }, "array-equal": { "version": "1.0.0", @@ -728,28 +692,17 @@ "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", "dev": true }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true }, "asn1": { "version": "0.2.4", @@ -766,15 +719,11 @@ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" - }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true }, "astral-regex": { "version": "1.0.0", @@ -806,7 +755,8 @@ "atob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", - "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" + "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=", + "dev": true }, "aws-sign2": { "version": "0.7.0", @@ -949,12 +899,14 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", @@ -969,6 +921,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -977,6 +930,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -985,6 +939,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -993,6 +948,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1010,15 +966,11 @@ "tweetnacl": "^0.14.3" } }, - "bluebird": { - "version": "2.11.0", - "resolved": "http://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", - "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1028,6 +980,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", @@ -1045,6 +998,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -1108,6 +1062,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", @@ -1120,11 +1075,6 @@ "unset-value": "^1.0.0" } }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1134,7 +1084,8 @@ "camelcase": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", - "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==" + "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "dev": true }, "capture-exit": { "version": "2.0.0", @@ -1179,11 +1130,6 @@ } } }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" - }, "ci-info": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", @@ -1194,6 +1140,7 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", @@ -1205,6 +1152,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -1215,6 +1163,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, "requires": { "string-width": "^2.1.1", "strip-ansi": "^4.0.0", @@ -1227,29 +1176,17 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, - "co-bluebird": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/co-bluebird/-/co-bluebird-1.1.0.tgz", - "integrity": "sha1-yLnzqTIKftMJh9zKGlw8/1llXHw=", - "requires": { - "bluebird": "^2.10.0", - "co-use": "^1.1.0" - } - }, - "co-use": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/co-use/-/co-use-1.1.0.tgz", - "integrity": "sha1-xrs83xDLc17Kqdru2kbXJclKTmI=" - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" @@ -1294,12 +1231,14 @@ "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "convert-source-map": { "version": "1.6.0", @@ -1313,7 +1252,8 @@ "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -1325,6 +1265,7 @@ "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -1381,15 +1322,11 @@ } } }, - "dayjs": { - "version": "1.8.14", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.14.tgz", - "integrity": "sha512-AVhDmRTe541iWirnoeFSSDDGvCT6HWaNQ4z2WmmzXMGZj6ph6ydao2teKq/eUtR43GPJXlYFD+C/SotG1P9wUQ==" - }, "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", + "dev": true, "requires": { "ms": "2.0.0" } @@ -1397,20 +1334,14 @@ "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "requires": { - "type-detect": "^4.0.0" - } + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true }, "deep-is": { "version": "0.1.3", @@ -1448,6 +1379,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" @@ -1457,6 +1389,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1465,6 +1398,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1473,6 +1407,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1505,15 +1440,6 @@ "integrity": "sha512-xLqpez+Zj9GKSnPWS0WZw1igGocZ+uua8+y+5dDNTT934N3QuY1sp2LkHzwiaYQGz60hMq0pjAshdeXm5VUOEw==", "dev": true }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -1537,6 +1463,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, "requires": { "once": "^1.4.0" } @@ -1638,6 +1565,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -1658,6 +1586,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", @@ -1672,6 +1601,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -1680,6 +1610,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -1710,6 +1641,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -1719,6 +1651,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -1729,6 +1662,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", @@ -1744,6 +1678,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -1752,6 +1687,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -1760,6 +1696,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1768,6 +1705,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -1776,6 +1714,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1796,19 +1735,6 @@ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, - "fast-glob": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.2.tgz", - "integrity": "sha512-TR6zxCKftDQnUAPvkrCWdBgDq/gbqx8A3ApnBrR5rMvpp6+KMJI0Igw7fkWPgeVK0uhRXTXdvO3O+YP0CaUX2g==", - "requires": { - "@mrmlnc/readdir-enhanced": "^2.2.1", - "@nodelib/fs.stat": "^1.0.1", - "glob-parent": "^3.1.0", - "is-glob": "^4.0.0", - "merge2": "^1.2.1", - "micromatch": "^3.1.10" - } - }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", @@ -1844,6 +1770,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", @@ -1855,6 +1782,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -1865,6 +1793,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -1872,7 +1801,8 @@ "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true }, "forever-agent": { "version": "0.6.1", @@ -1895,6 +1825,7 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, "requires": { "map-cache": "^0.2.2" } @@ -1902,7 +1833,8 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "fsevents": { "version": "1.2.8", @@ -1924,7 +1856,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1945,12 +1878,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1965,17 +1900,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2092,7 +2030,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2104,6 +2043,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2118,6 +2058,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2125,12 +2066,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2149,6 +2092,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2229,7 +2173,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2241,6 +2186,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2326,7 +2272,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2362,6 +2309,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2381,6 +2329,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2424,12 +2373,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -2442,17 +2393,14 @@ "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, "requires": { "pump": "^3.0.0" } @@ -2460,7 +2408,8 @@ "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true }, "getpass": { "version": "0.1.7", @@ -2485,69 +2434,17 @@ "path-is-absolute": "^1.0.0" } }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-to-regexp": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" - }, "globals": { "version": "11.11.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz", "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==", "dev": true }, - "globby": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", - "integrity": "sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w==", - "requires": { - "array-union": "^1.0.1", - "dir-glob": "2.0.0", - "fast-glob": "^2.0.2", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" - }, - "dependencies": { - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true }, "growly": { "version": "1.3.0", @@ -2559,6 +2456,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.1.tgz", "integrity": "sha512-3Zhi6C0euYZL5sM0Zcy7lInLXKQ+YLcF/olbN010mzGQ4XVm50JeyBnMqofHh696GrciGruC7kCcApPDJvVgwA==", + "dev": true, "requires": { "neo-async": "^2.6.0", "optimist": "^0.6.1", @@ -2624,6 +2522,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", @@ -2634,6 +2533,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" @@ -2643,6 +2543,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -2684,11 +2585,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" - }, "import-local": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", @@ -2722,48 +2618,11 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "inflate-template": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/inflate-template/-/inflate-template-1.1.6.tgz", - "integrity": "sha512-E/6wrSKZPtBa8KFlgxvkbVzzhWIvi7a34qDdNfmAflOOw+I3SoLJzGwZJHef9r6f+hGwNTK4pcicyBVxBrFWDw==", - "requires": { - "chai": "4.1.2", - "fs-extra": "^7.0.1", - "globby": "^8.0.2", - "handlebars": "^4.1.1", - "promisify-any": "^2.0.1", - "yargs": "^12.0.5" - }, - "dependencies": { - "chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", - "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", - "requires": { - "assertion-error": "^1.0.1", - "check-error": "^1.0.1", - "deep-eql": "^3.0.0", - "get-func-name": "^2.0.0", - "pathval": "^1.0.0", - "type-detect": "^4.0.0" - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } - } - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2772,7 +2631,8 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true }, "invariant": { "version": "2.2.4", @@ -2786,12 +2646,14 @@ "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==" + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -2800,6 +2662,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -2815,7 +2678,8 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true }, "is-callable": { "version": "1.1.4", @@ -2836,6 +2700,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -2844,6 +2709,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -2860,6 +2726,7 @@ "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", @@ -2869,29 +2736,22 @@ "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true } } }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-generator": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-generator/-/is-generator-1.0.3.tgz", - "integrity": "sha1-wUwhBX7TbjKNuANHlmxpP4hjifM=" + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true }, "is-generator-fn": { "version": "2.1.0", @@ -2899,18 +2759,11 @@ "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", "dev": true }, - "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", - "requires": { - "is-extglob": "^2.1.1" - } - }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -2919,6 +2772,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -2929,6 +2783,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, "requires": { "isobject": "^3.0.1" } @@ -2945,7 +2800,8 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true }, "is-symbol": { "version": "1.0.2", @@ -2965,7 +2821,8 @@ "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true }, "is-wsl": { "version": "1.1.0", @@ -2981,12 +2838,14 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true }, "isstream": { "version": "0.1.2", @@ -3691,14 +3550,6 @@ } } }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -3714,7 +3565,8 @@ "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true }, "kleur": { "version": "3.0.3", @@ -3726,6 +3578,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, "requires": { "invert-kv": "^2.0.0" } @@ -3756,6 +3609,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -3819,6 +3673,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, "requires": { "p-defer": "^1.0.0" } @@ -3826,12 +3681,14 @@ "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, "requires": { "object-visit": "^1.0.0" } @@ -3840,6 +3697,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz", "integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==", + "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", @@ -3855,15 +3713,11 @@ "readable-stream": "^2.0.1" } }, - "merge2": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.2.tgz", - "integrity": "sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg==" - }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -3898,12 +3752,14 @@ "mimic-fn": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.0.0.tgz", - "integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==" + "integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==", + "dev": true }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3911,12 +3767,14 @@ "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true }, "mixin-deep": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -3926,6 +3784,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, "requires": { "is-plain-object": "^2.0.4" } @@ -3944,7 +3803,8 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "nan": { "version": "2.13.2", @@ -3957,6 +3817,7 @@ "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -3980,12 +3841,14 @@ "neo-async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz", - "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==" + "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", + "dev": true }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true }, "node-int64": { "version": "0.4.0", @@ -4037,6 +3900,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, "requires": { "path-key": "^2.0.0" } @@ -4044,12 +3908,8 @@ "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "numeral": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/numeral/-/numeral-2.0.6.tgz", - "integrity": "sha1-StCAk21EPCVhrtnyGX7//iX05QY=" + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true }, "nwsapi": { "version": "2.1.3", @@ -4067,6 +3927,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -4077,6 +3938,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -4085,6 +3947,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -4095,6 +3958,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, "requires": { "isobject": "^3.0.0" } @@ -4113,6 +3977,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, "requires": { "isobject": "^3.0.1" } @@ -4121,6 +3986,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -4137,6 +4003,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, "requires": { "minimist": "~0.0.1", "wordwrap": "~0.0.2" @@ -4168,6 +4035,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", @@ -4177,7 +4045,8 @@ "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true }, "p-each-series": { "version": "1.0.0", @@ -4191,17 +4060,20 @@ "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true }, "p-is-promise": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", - "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==" + "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "dev": true }, "p-limit": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "dev": true, "requires": { "p-try": "^2.0.0" } @@ -4210,6 +4082,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, "requires": { "p-limit": "^2.0.0" } @@ -4223,7 +4096,8 @@ "p-try": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", - "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==" + "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==", + "dev": true }, "parse5": { "version": "4.0.0", @@ -4234,27 +4108,26 @@ "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true }, "path-parse": { "version": "1.0.6", @@ -4266,15 +4139,11 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, "requires": { "pify": "^3.0.0" } }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -4284,7 +4153,8 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true }, "pirates": { "version": "4.0.1", @@ -4304,6 +4174,16 @@ "find-up": "^3.0.0" } }, + "plot": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/plot/-/plot-1.0.15.tgz", + "integrity": "sha512-3OFvinV15qm1JxOP1pSSTD/s/UMUL4vxk3sZufAsUDT7pB+zRN2XMa34ccmausdihIrnLNlUI/RYGxf8iHEc5Q==", + "requires": { + "@plotex/chart-def": "^1.0.15", + "@plotex/serialization": "^1.0.11", + "typy": "3.0.1" + } + }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", @@ -4313,7 +4193,8 @@ "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true }, "prelude-ls": { "version": "1.1.2", @@ -4347,21 +4228,6 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, - "promise-polyfill": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.0.tgz", - "integrity": "sha512-OzSf6gcCUQ01byV4BgwyUCswlaQQ6gzXc23aLQWhicvfX9kfsUiUhgt3CCQej8jDnl8/PhGF31JdHX2/MzF3WA==" - }, - "promisify-any": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promisify-any/-/promisify-any-2.0.1.tgz", - "integrity": "sha1-QD4AqIE/F1JCq1D+M6afjuzkcwU=", - "requires": { - "bluebird": "^2.10.0", - "co-bluebird": "^1.1.0", - "is-generator": "^1.0.2" - } - }, "prompts": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.0.4.tgz", @@ -4382,6 +4248,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -4444,6 +4311,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -4458,12 +4326,14 @@ "repeat-element": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true }, "request": { "version": "2.88.0", @@ -4516,12 +4386,14 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true }, "resolve": { "version": "1.10.0", @@ -4548,12 +4420,14 @@ "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true }, "rimraf": { "version": "2.6.3", @@ -4596,6 +4470,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, "requires": { "ret": "~0.1.10" } @@ -4640,17 +4515,20 @@ "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -4662,6 +4540,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -4672,6 +4551,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, "requires": { "shebang-regex": "^1.0.0" } @@ -4679,7 +4559,8 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true }, "shellwords": { "version": "0.1.1", @@ -4690,7 +4571,8 @@ "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true }, "sisteransi": { "version": "1.0.0", @@ -4698,15 +4580,11 @@ "integrity": "sha512-N+z4pHB4AmUv0SjveWRd6q1Nj5w62m5jodv+GD8lvmbY/83T/rpbJGZOnK5T149OldDj4Db07BSv9xY4K6NTPQ==", "dev": true }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", @@ -4722,6 +4600,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -4730,6 +4609,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -4737,7 +4617,8 @@ "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true } } }, @@ -4745,6 +4626,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", @@ -4755,6 +4637,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, "requires": { "is-descriptor": "^1.0.0" } @@ -4763,6 +4646,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -4771,6 +4655,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, "requires": { "kind-of": "^6.0.0" } @@ -4779,6 +4664,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -4791,6 +4677,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, "requires": { "kind-of": "^3.2.0" }, @@ -4799,6 +4686,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -4808,12 +4696,14 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "source-map-resolve": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, "requires": { "atob": "^2.1.1", "decode-uri-component": "^0.2.0", @@ -4835,7 +4725,8 @@ "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true }, "spdx-correct": { "version": "3.1.0", @@ -4873,6 +4764,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, "requires": { "extend-shallow": "^3.0.0" } @@ -4910,6 +4802,7 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -4919,6 +4812,7 @@ "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, "requires": { "is-descriptor": "^0.1.0" } @@ -4945,6 +4839,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" @@ -4954,6 +4849,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, "requires": { "ansi-regex": "^3.0.0" } @@ -4967,7 +4863,8 @@ "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true }, "supports-color": { "version": "6.1.0", @@ -4978,60 +4875,6 @@ "has-flag": "^3.0.0" } }, - "svg.draggable.js": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/svg.draggable.js/-/svg.draggable.js-2.2.2.tgz", - "integrity": "sha512-JzNHBc2fLQMzYCZ90KZHN2ohXL0BQJGQimK1kGk6AvSeibuKcIdDX9Kr0dT9+UJ5O8nYA0RB839Lhvk4CY4MZw==", - "requires": { - "svg.js": "^2.0.1" - } - }, - "svg.easing.js": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/svg.easing.js/-/svg.easing.js-2.0.0.tgz", - "integrity": "sha1-iqmUawqOJ4V6XEChDrpAkeVpHxI=", - "requires": { - "svg.js": ">=2.3.x" - } - }, - "svg.filter.js": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/svg.filter.js/-/svg.filter.js-2.0.2.tgz", - "integrity": "sha1-kQCOFROJ3ZIwd5/L5uLJo2LRwgM=", - "requires": { - "svg.js": "^2.2.5" - } - }, - "svg.js": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/svg.js/-/svg.js-2.7.1.tgz", - "integrity": "sha512-ycbxpizEQktk3FYvn/8BH+6/EuWXg7ZpQREJvgacqn46gIddG24tNNe4Son6omdXCnSOaApnpZw6MPCBA1dODA==" - }, - "svg.pathmorphing.js": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/svg.pathmorphing.js/-/svg.pathmorphing.js-0.1.3.tgz", - "integrity": "sha512-49HWI9X4XQR/JG1qXkSDV8xViuTLIWm/B/7YuQELV5KMOPtXjiwH4XPJvr/ghEDibmLQ9Oc22dpWpG0vUDDNww==", - "requires": { - "svg.js": "^2.4.0" - } - }, - "svg.resize.js": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/svg.resize.js/-/svg.resize.js-1.4.3.tgz", - "integrity": "sha512-9k5sXJuPKp+mVzXNvxz7U0uC9oVMQrrf7cFsETznzUDDm0x8+77dtZkWdMfRlmbkEEYvUn9btKuZ3n41oNA+uw==", - "requires": { - "svg.js": "^2.6.5", - "svg.select.js": "^2.1.2" - } - }, - "svg.select.js": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/svg.select.js/-/svg.select.js-2.1.2.tgz", - "integrity": "sha512-tH6ABEyJsAOVAhwcCjF8mw4crjXSI1aa7j2VQR8ZuJ37H2MBUbyeqYr5nEO7sSN3cy9AR9DUwNg0t/962HlDbQ==", - "requires": { - "svg.js": "^2.2.5" - } - }, "symbol-tree": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", @@ -5137,6 +4980,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, "requires": { "kind-of": "^3.0.2" }, @@ -5145,6 +4989,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, "requires": { "is-buffer": "^1.1.5" } @@ -5155,6 +5000,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -5166,6 +5012,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" @@ -5328,11 +5175,6 @@ "prelude-ls": "~1.1.2" } }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" - }, "typescript": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.1.tgz", @@ -5348,6 +5190,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.2.tgz", "integrity": "sha512-imog1WIsi9Yb56yRt5TfYVxGmnWs3WSGU73ieSOlMVFwhJCA9W8fqFFMMj4kgDqiS/80LGdsYnWL7O9UcjEBlg==", + "dev": true, "optional": true, "requires": { "commander": "~2.19.0", @@ -5358,6 +5201,7 @@ "version": "2.19.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "dev": true, "optional": true } } @@ -5366,6 +5210,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", @@ -5377,6 +5222,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, "requires": { "is-extendable": "^0.1.0" } @@ -5385,6 +5231,7 @@ "version": "0.4.3", "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -5394,15 +5241,11 @@ } } }, - "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" - }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -5412,6 +5255,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -5422,6 +5266,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, "requires": { "isarray": "1.0.0" } @@ -5431,12 +5276,14 @@ "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true } } }, @@ -5460,12 +5307,14 @@ "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true }, "use": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/use/-/use-3.1.0.tgz", "integrity": "sha512-6UJEQM/L+mzC3ZJNM56Q4DFGLX/evKGRg15UJHGB9X5j5Z3AFbgZvjUh2yq/UJUY4U5dh7Fal++XbNg1uzpRAw==", + "dev": true, "requires": { "kind-of": "^6.0.2" } @@ -5567,6 +5416,7 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -5574,17 +5424,20 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true }, "wrap-ansi": { "version": "2.1.0", "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" @@ -5593,12 +5446,14 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5607,6 +5462,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5617,6 +5473,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5626,7 +5483,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "write-file-atomic": { "version": "2.4.1", @@ -5657,12 +5515,14 @@ "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true }, "yargs": { "version": "12.0.5", "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, "requires": { "cliui": "^4.0.0", "decamelize": "^1.2.0", @@ -5682,6 +5542,7 @@ "version": "11.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" diff --git a/package.json b/package.json index c5e53a0..98b46e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "0.6.3", + "version": "1.0.0", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -35,16 +35,14 @@ }, "homepage": "https://github.com/data-forge/data-forge-plot#readme", "dependencies": { - "@data-forge-plot/apex": "0.2.1", - "@data-forge-plot/chart-def": "^1.4.1", - "@data-forge/serialization": "^1.0.0", - "inflate-template": "^1.1.6", + "@plotex/chart-def": "^1.0.15", "opn": "^5.5.0", + "plot": "^1.0.15", "resolve-cwd": "^3.0.0", "typy": "^3.0.1" }, "peerDependencies": { - "data-forge": "^1.6.7" + "data-forge": "^1.8.17" }, "devDependencies": { "@types/jest": "^24.0.6", diff --git a/src/apply-defaults.ts b/src/apply-defaults.ts deleted file mode 100644 index 82c2b00..0000000 --- a/src/apply-defaults.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { IChartDef, ChartType, IYAxisSeriesConfig } from "@data-forge-plot/chart-def"; -import { expandYSeriesConfigArray, expandPlotConfig } from "./expand-chart-def"; -import { IPlotConfig } from "./chart-def"; -import { ISerializedDataFrame } from "@data-forge/serialization"; - -// -// Extract series from the chart definition's data. -// -function extractValues(data: ISerializedDataFrame, seriesConfigs: IYAxisSeriesConfig[]): any[] { - const values = seriesConfigs - .filter(axis => data && data.columns && data.columns[axis.series] === "number") - .map(axis => data.values && data.values.map(row => row[axis.series]) || []); - const flattened = [].concat.apply([], values); // Flatten array of arrays. - return flattened; -} - -function computeMin(values: number[]): number { - return Math.floor(Math.min(...values.filter(v => v !== undefined && v !== null && !Number.isNaN(v))) * 100) / 100; -} - -function computeMax(values: number[]): number { - return Math.ceil(Math.max(...values.filter(v => v !== undefined && v !== null && !Number.isNaN(v) && Number.isFinite(v))) * 100) / 100; -} - -// -// Apply defaults to a chart definition and patch misssing values. -// -export function applyDefaults(inputChartDef: IChartDef, plotDefaults?: IPlotConfig): IChartDef { - - const chartDef = Object.assign({}, inputChartDef); - - if (!chartDef.plotConfig) { - if (plotDefaults) { - chartDef.plotConfig = Object.assign({}, expandPlotConfig(plotDefaults)); - } - else { - chartDef.plotConfig = {}; - } - } - else { - if (plotDefaults) { - chartDef.plotConfig = Object.assign({}, expandPlotConfig(plotDefaults), chartDef.plotConfig); - } - else { - chartDef.plotConfig = Object.assign({}, chartDef.plotConfig); - } - } - - if (chartDef.plotConfig.chartType === undefined) { - chartDef.plotConfig.chartType = ChartType.Line; - } - - if (chartDef.plotConfig.width === undefined) { - chartDef.plotConfig.width = 800; - } - - if (chartDef.plotConfig.height === undefined) { - chartDef.plotConfig.height = 600; - } - - if (!chartDef.axisMap) { - chartDef.axisMap = { y: [], y2: [] }; - } - else { - chartDef.axisMap = Object.assign({}, chartDef.axisMap); - if (!chartDef.axisMap.y) { - chartDef.axisMap.y = []; - } - - if (!chartDef.axisMap.y2) { - chartDef.axisMap.y2 = []; - } - } - - if (chartDef.axisMap.y.length === 0 && - chartDef.axisMap.y2.length === 0) { - chartDef.axisMap.y = expandYSeriesConfigArray(chartDef.data.columnOrder); - } - - if (!chartDef.plotConfig.y) { - chartDef.plotConfig.y = {}; - } - - let y1Values; - - if (chartDef.plotConfig.y.min === undefined) { - y1Values = extractValues(chartDef.data, chartDef.axisMap.y); - - if (y1Values.length > 0) { - chartDef.plotConfig.y.min = computeMin(y1Values); - } - } - - if (chartDef.plotConfig.y.max === undefined) { - if (!y1Values) { - y1Values = extractValues(chartDef.data, chartDef.axisMap.y); - } - - if (y1Values.length > 0) { - chartDef.plotConfig.y.max = computeMax(y1Values); - } - } - - if (!chartDef.plotConfig.y2) { - chartDef.plotConfig.y2 = {}; - } - - let y2Values; - - if (chartDef.plotConfig.y2.min === undefined) { - y2Values = extractValues(chartDef.data, chartDef.axisMap.y2); - if (y2Values.length > 0) { - chartDef.plotConfig.y2.min = computeMin(y2Values); - } - } - - if (chartDef.plotConfig.y2.max === undefined) { - if (!y2Values) { - y2Values = extractValues(chartDef.data, chartDef.axisMap.y2); - } - - if (y2Values.length > 0) { - chartDef.plotConfig.y2.max = computeMax(y2Values); - } - } - - return chartDef; -} diff --git a/src/chart-def.ts b/src/chart-def.ts deleted file mode 100644 index 57e6dfb..0000000 --- a/src/chart-def.ts +++ /dev/null @@ -1,151 +0,0 @@ - -import { AxisType, ChartType, IAxisLabelConfig, ILegendConfig, IDataLabels, IAxisTicksConfiguration } from "@data-forge-plot/chart-def"; - -/** - * Configures an axis of the chart. - */ -export interface IAxisConfig { - - /** - * Label for the axis. - */ - label?: string | IAxisLabelConfig; - - /** - * Configuration for axis tick marks. - */ - ticks?: IAxisTicksConfiguration; -} - -/** - * Configures an axis of the chart. - */ -export interface IXAxisConfig extends IAxisConfig { - - /** - * Sets the type of the axis' data. - */ - axisType?: AxisType; -} - -/** - * Configures a Y axis of the chart. - */ -export interface IYAxisConfig extends IAxisConfig { - - /** - * The minimum value to render on the axis. - */ - min?: number; - - /** - * The maximum value to render on the axis. - */ - max?: number; -} - -/** - * Defines the chart. - */ -export interface IPlotConfig { - - /** - * The type of chart to render. - * Default to "line". - */ - chartType?: ChartType; - - /** - * Width of the plot. - * Default to 800. - */ - width?: number | string; - - /** - * Height of the plot. - * Default to 600. - */ - height?: number | string; - - /** - * Configuration for the x axis. - */ - x?: IXAxisConfig; - - /** - * Configuration for the y axis. - */ - y?: IYAxisConfig; - - /** - * Configuration for the second y axis. - */ - y2?: IYAxisConfig; - - /** - * Configures the chart's legend. - */ - legend?: ILegendConfig; - - /** - * Configure data labels for the whole chart. - */ - dataLabels?: IDataLabels; -} - -/** - * Relates a single axis to data series. - */ -export interface IAxisSeriesConfig { - - /** - * The name of the series to render on the axis. - */ - series: string; - - /** - * The label for the series on this axis. - */ - label?: string; - - /** - * The format for rendering values of the series. - */ - format?: string; - - /** - * The color to render to assign to the series. - */ - color?: string; -} - -/** - * Relates a single Y axis to data series. - */ -export interface IYAxisSeriesConfig extends IAxisSeriesConfig { - /** - * Configure a separate X axis for the y axis. - */ - x?: string | IAxisSeriesConfig; -} - -/** - * Maps the columns in a dataframe to an axis in the chart. - */ -export interface IAxisMap { - - /** - * The x axis for the chart. - */ - x?: string | IAxisSeriesConfig; - - /** - * The y axis for the chart. - */ - y?: string | string[] | IYAxisSeriesConfig | IYAxisSeriesConfig[]; - - /** - * The optional second y axis for the chart. - */ - y2?: string | string[] | IYAxisSeriesConfig | IYAxisSeriesConfig[]; -} diff --git a/src/expand-chart-def.ts b/src/expand-chart-def.ts deleted file mode 100644 index 7b024f6..0000000 --- a/src/expand-chart-def.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { IChartDef, IPlotConfig as IExpandedPlotConfig, IAxisMap as IExpandedAxisMap, IAxisConfig as IExpandedAxisConfig, IYAxisConfig as IExpandedYAxisConfig, IXAxisConfig as IExpandedXAxisConfig, IAxisSeriesConfig as IExpandedAxisSeriesConfig, IYAxisSeriesConfig as IExpandedYAxisSeriesConfig, ISeriesLabelConfig } from "@data-forge-plot/chart-def"; -import { IAxisMap, IPlotConfig, IAxisConfig, IYAxisConfig, IAxisSeriesConfig, IYAxisSeriesConfig } from "./chart-def"; -import { ISerializedDataFrame } from "@data-forge/serialization"; -import { isString } from "./utils"; -import { isObject, isArray } from "util"; - -// -// Expands a chart definition so that chart renderer plugins have less work to do. -// - -export function expandAxisConfig(axisConfig: IAxisConfig): IExpandedAxisConfig { - const expandedAxisConfig = Object.assign({}, axisConfig) as IExpandedAxisConfig; - if (isString(expandedAxisConfig.label)) { - expandedAxisConfig.label = { - text: expandedAxisConfig.label, - }; - } - - return expandedAxisConfig; -} - -export function expandXAxisConfig(axisConfig: IYAxisConfig): IExpandedXAxisConfig { - const expandedAxisConfig = expandAxisConfig(axisConfig); - return expandedAxisConfig; -} - -export function expandYAxisConfig(axisConfig: IYAxisConfig): IExpandedYAxisConfig { - const expandedAxisConfig = expandAxisConfig(axisConfig); - return expandedAxisConfig; -} - -export function expandSeriesConfig(series: string | IAxisSeriesConfig): IExpandedAxisSeriesConfig { - if (isString(series)) { - return { - series: series as string, - }; - } - else { - const inputSeriesConfig = series as IAxisSeriesConfig; - const expandedSeriesConfig: IExpandedAxisSeriesConfig = { - series: inputSeriesConfig.series, - }; - - if (inputSeriesConfig.label) { - expandedSeriesConfig.label = inputSeriesConfig.label; - } - - if (inputSeriesConfig.format) { - expandedSeriesConfig.format = inputSeriesConfig.format; - } - - if (inputSeriesConfig.color) { - expandedSeriesConfig.color = inputSeriesConfig.color; - } - - return expandedSeriesConfig; - } -} - -export function expandYSeriesConfig(series: string | IYAxisSeriesConfig): IExpandedYAxisSeriesConfig { - const expanded = expandSeriesConfig(series) as IExpandedYAxisSeriesConfig; - if (!isString(series)) { - if (series.x) { - expanded.x = expandSeriesConfig(series.x); - } - } - return expanded; -} - -export function expandYSeriesConfigArray(series?: string | string[] | IYAxisSeriesConfig | IYAxisSeriesConfig[]): IExpandedYAxisSeriesConfig[] { - if (!series) { - return []; - } - - if (isString(series)) { - return [{ - series, - }]; - } - - if (isArray(series)) { - return (series as Array).map(expandYSeriesConfig); - } - - if (isObject(series)) { - return [ - expandYSeriesConfig(series as IYAxisSeriesConfig), - ]; - } - - throw new Error(`Unexpected type for series: ${series}.`); -} - -export function expandAxisMap(axisMap: IAxisMap, columns: string[]): IExpandedAxisMap { - const expandedAxisMap = Object.assign({}, axisMap) as IExpandedAxisMap; - if (axisMap.x) { - expandedAxisMap.x = expandSeriesConfig(axisMap.x); - } - - expandedAxisMap.y = expandYSeriesConfigArray(axisMap.y); - expandedAxisMap.y2 = expandYSeriesConfigArray(axisMap.y2); - - return expandedAxisMap; -} - -export function expandPlotConfig(plotConfig: IPlotConfig): IExpandedPlotConfig { - const expandedPlotConfig = Object.assign({}, plotConfig) as IExpandedPlotConfig; - if (plotConfig.x) { - expandedPlotConfig.x = expandAxisConfig(plotConfig.x); - } - - if (plotConfig.y) { - expandedPlotConfig.y = expandYAxisConfig(plotConfig.y); - } - - if (plotConfig.y2) { - expandedPlotConfig.y2 = expandYAxisConfig(plotConfig.y2); - } - - return expandedPlotConfig; -} - -export function expandChartDef(data: ISerializedDataFrame, plotConfig: IPlotConfig, axisMap: IAxisMap): IChartDef { - return { - data, - plotConfig: expandPlotConfig(plotConfig), - axisMap: expandAxisMap(axisMap, data.columnOrder), - }; -} diff --git a/src/index.ts b/src/index.ts index a0f4473..e67cc2f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,9 @@ +import { IAxisMap, IPlotConfig } from "@plotex/chart-def"; import { ISeries, Series } from "data-forge"; import { IDataFrame, DataFrame } from "data-forge"; -import { IPlotAPI, PlotAPI, /*todo: globalChartRenderer,*/ startPlot, endPlot } from "./plot-api"; -import { IPlotConfig, IAxisMap } from "./chart-def"; -export * from "./chart-def"; -export { IPlotAPI } from "./plot-api"; -export { ChartType, AxisType, HorizontalLabelPosition, VerticalLabelPosition } from "@data-forge-plot/chart-def"; +import { IPlotAPI, plot } from "plot"; +export { IPlotAPI } from "plot"; +export * from "@plotex/chart-def"; // // Augment ISeries and Series with plot function. @@ -32,14 +31,9 @@ const seriesPlotDefaults: IPlotConfig = { }; function plotSeries(this: ISeries, plotConfig?: IPlotConfig, axisMap?: IAxisMap): IPlotAPI { - const serializedData = this - .inflate((value: any) => ({ __value__: value })) - .serialize(); - return new PlotAPI(serializedData, plotConfig || {}, axisMap || {}, seriesPlotDefaults); + return plot(this.toArray(), plotConfig, axisMap); } -Series.prototype.startPlot = startPlot; -Series.prototype.endPlot = endPlot; Series.prototype.plot = plotSeries; // @@ -47,16 +41,10 @@ Series.prototype.plot = plotSeries; // declare module "data-forge/build/lib/dataframe" { interface IDataFrame { - startPlot(): void; - endPlot(): void; - plot(plotDef?: IPlotConfig, axisMap?: IAxisMap): IPlotAPI; } interface DataFrame { - startPlot(): void; - endPlot(): void; - plot(plotDef?: IPlotConfig, axisMap?: IAxisMap): IPlotAPI; } } @@ -67,11 +55,8 @@ const dataFramePlotDefaults: IPlotConfig = { }, }; -function plotDataFrame(this: IDataFrame, plotDef?: IPlotConfig, axisMap?: IAxisMap): IPlotAPI { - const serializedData = this.serialize(); - return new PlotAPI(serializedData, plotDef || {}, axisMap || {}, dataFramePlotDefaults); +function plotDataFrame(this: IDataFrame, plotConfig?: IPlotConfig, axisMap?: IAxisMap): IPlotAPI { + return plot(this.toArray(), plotConfig, axisMap); } -DataFrame.prototype.startPlot = startPlot; -DataFrame.prototype.endPlot = endPlot; DataFrame.prototype.plot = plotDataFrame; diff --git a/src/plot-api.ts b/src/plot-api.ts deleted file mode 100644 index 35c0ba9..0000000 --- a/src/plot-api.ts +++ /dev/null @@ -1,661 +0,0 @@ -const opn = require("opn"); -import * as path from "path"; -import { ISerializedDataFrame } from "@data-forge/serialization"; -import { exportTemplate, IExportOptions } from "inflate-template"; -import { IPlotConfig, IAxisMap } from "./chart-def"; -import { isObject } from "./utils"; -import { ChartType, IChartDef, AxisType, HorizontalLabelPosition, VerticalLabelPosition, IAxisConfig, IYAxisSeriesConfig, IAxisSeriesConfig, IXAxisConfig, IYAxisConfig } from "@data-forge-plot/chart-def"; -import { expandChartDef } from "./expand-chart-def"; -import { applyDefaults } from "./apply-defaults"; -const resolve = require('resolve-cwd'); - -const DEFAULT_CHART_PACKAGE = "@data-forge-plot/apex"; - -// -// Reusable chart renderer. -// For improved performance. -// -// TODO :export let globalChartRenderer: IChartRenderer | null = null; - -export async function findChartTemplatePath(): Promise { - const defaultTemplatePath = resolve(`${DEFAULT_CHART_PACKAGE}/build/template/template.json`); - const chartTemplatesPath = path.dirname(defaultTemplatePath); - return chartTemplatesPath; -} - -export async function startPlot(): Promise { - /*TODO: - globalChartRenderer = new ChartRenderer(); - - const chartTemplatesPath = await findChartTemplatesPath(); - await globalChartRenderer.start(chartTemplatesPath, false); - */ -} - -export async function endPlot(): Promise { - /*TODO: - await globalChartRenderer!.end(); - globalChartRenderer = null; - */ -} - -/** - * Options for exporting web projects for interactive charts. - */ -export interface IWebExportOptions { - /** - * Open the exported web visualization in the browser after exporting it. - * Default: false - */ - openBrowser?: boolean; - - /** - * Set to true to overwrite existing output. - * Default: false - */ - overwrite?: boolean; - - /** - * Name of the template used to render the image. - */ - template?: string; - - /** - * Set to true to show the chart definition after expansion and also after formatting. - */ - showChartDef?: boolean; -} - -/** - * Options for exporting Node.js projects for interactive charts. - */ -export interface INodejsExportOptions { - - /** - * Set to true to overwrite existing output. - * Default: false - */ - overwrite?: boolean; -} - -/** - * Fluent API for configuring the plot. - */ -export interface IPlotAPI { - - /** - * Set the type of the chart to be plotted. - * - * @param chartType Specifies the chart type. - */ - chartType(chartType: ChartType): IPlotAPI; - - /** - * Set the width of the chart. - */ - width(width: number | string): IPlotAPI; - - /** - * Set the height of the chart. - */ - height(height: number | string): IPlotAPI; - - /** - * Configure the x axis. - */ - x(): IXAxisConfigAPI; - - /** - * Configure the y axis. - */ - y(): IYAxisConfigAPI; - - /** - * Configure the y axis. - */ - y2(): IYAxisConfigAPI; - - /** - * Export an interactive web visualization of the chart. - */ - exportWeb(outputFolderPath: string, exportOptions?: IWebExportOptions): Promise; - - /** - * Serialize the plot definition so that it can be converted to JSON. - * The JSON definition of the chart can be used to instantiate the chart in a browser. - */ - serialize(): IChartDef; -} - -/** - * Plot API for configuring a particular axis. - */ -export interface IAxisConfigAPI extends IPlotAPI { - - /** - * Set the label for the axis. - */ - label(label: string): FluentT; -} - -/** - * Configure a series. - */ -export interface IAxisSeriesConfigAPI extends IPlotAPI { -} - -/** - * Configure an X axis series. - */ -export interface IXAxisSeriesConfigAPI extends IAxisSeriesConfigAPI { - -} - -/** - * Configure a Y axis series. - */ -export interface IYAxisSeriesConfigAPI extends IAxisSeriesConfigAPI { - - /** - * Set the series label. - */ - label(label: string): IYAxisSeriesConfigAPI; - - /** - * Set the display format for values of this series. - */ - format(formatString: string): IYAxisSeriesConfigAPI; - - /** - * Configure an explicit x axis for this series. - */ - setX(seriesName: string): IXAxisSeriesConfigAPI; -} - -/** - * Plot API for configuring a particular axis. - */ -export interface IXAxisConfigAPI extends IAxisConfigAPI { - - /** - * Set the series for the x axis. - */ - setSeries(seriesName: string): IXAxisSeriesConfigAPI; - - /** - * Set the type of the axis. - */ - type(axisType: AxisType): IXAxisSeriesConfigAPI; - - /** - * Set the position for the label. - */ - labelPosition(position: HorizontalLabelPosition): IXAxisConfigAPI; -} - -/** - * Plot API for configuring a particular Y axis. - */ -export interface IYAxisConfigAPI extends IAxisConfigAPI { - - /** - * Add a series to a Y axis. - */ - addSeries(seriesName: string): IYAxisSeriesConfigAPI; - - /** - * Set the position for the label. - */ - labelPosition(position: VerticalLabelPosition): IYAxisConfigAPI; - - /** - * Sets the minimum value to render on the axis. - * @param value The minimum value to render. - */ - min(value: number): IYAxisConfigAPI; - - /** - * Sets the maximum value to render on the axis. - * @param value The maximum value to render. - */ - max(value: number): IYAxisConfigAPI; -} - -/** - * Fluent API for configuring the plot. - */ -export abstract class AbstractPlotAPI implements IPlotAPI { - - // - // The expanded chart def. - // - protected chartDef: IChartDef; - - // - // Defaults for the chart configuration. - // - private plotDefaults?: IPlotConfig; - - constructor(chartDef: IChartDef, plotDefaults?: IPlotConfig) { - this.chartDef = chartDef; - this.plotDefaults = plotDefaults; - } - - /** - * Set the type of the chart to be plotted. - * - * @param chartType Specifies the chart type. - */ - chartType(chartType: ChartType): IPlotAPI { - this.chartDef.plotConfig.chartType = chartType; // TODO: could call toLower, would have to also toLower the config. - return this; - } - - /** - * Set the width of the chart. - */ - width(width: number | string): IPlotAPI { - this.chartDef.plotConfig.width = width; - return this; - } - - /** - * Set the height of the chart. - */ - height(height: number | string): IPlotAPI { - this.chartDef.plotConfig.height = height; - return this; - } - - /** - * Configure the default x axis. - */ - x(): IXAxisConfigAPI { - if (!this.chartDef.plotConfig.x) { - this.chartDef.plotConfig.x = {}; - } - - return new XAxisConfigAPI( - "x", - this.chartDef.plotConfig.x, - (seriesName: string) => { - if (this.chartDef.axisMap.x) { - this.chartDef.axisMap.x.series = seriesName; - return this.chartDef.axisMap.x; - } - else { - const seriesConfig: IAxisSeriesConfig = { - series: seriesName, - }; - this.chartDef.axisMap.x = seriesConfig; - return seriesConfig; - } - }, - this.chartDef - ); - } - - /** - * Configure the y axis. - */ - y(): IYAxisConfigAPI { - if (!this.chartDef.plotConfig.y) { - this.chartDef.plotConfig.y = {}; - } - - return new YAxisConfigAPI( - "y", - this.chartDef.plotConfig.y!, - (seriesName: string) => { - const seriesConfig: IYAxisSeriesConfig = { - series: seriesName, - }; - this.chartDef.axisMap.y.push(seriesConfig); - return seriesConfig; - }, - this.chartDef - ); - } - - /** - * Configure the y axis. - */ - y2(): IYAxisConfigAPI { - if (!this.chartDef.plotConfig.y2) { - this.chartDef.plotConfig.y2 = {}; - } - - return new YAxisConfigAPI( - "y2", - this.chartDef.plotConfig.y2!, - (seriesName: string) => { - const seriesConfig: IYAxisSeriesConfig = { - series: seriesName, - }; - this.chartDef.axisMap.y2.push(seriesConfig); - return seriesConfig; - }, - this.chartDef - ); - } - - /** - * Export an interactive web visualization of the chart. - */ - async exportWeb(outputFolderPath: string, exportOptions?: IWebExportOptions): Promise { - - const chartDef = this.serialize(); - if (exportOptions && exportOptions.showChartDef) { - console.log("Expanded chart definition:"); - console.log(JSON.stringify(chartDef, null, 4)); - } - - const templatePath = exportOptions && exportOptions.template || await findChartTemplatePath(); - const overwrite = exportOptions && !!exportOptions.overwrite || false; - - const exportTemplateOptions: IExportOptions = { - overwrite, - inMemoryFiles: [ - { - file: "chart-def.json", - content: JSON.stringify( - { - chartDef, - options: { - makeStatic: false, - showChartDef: exportOptions && exportOptions.showChartDef || false, - }, - }, - null, - 4 - ), - }, - ], - }; - - await exportTemplate(templatePath, { chartDef }, outputFolderPath, exportTemplateOptions); - - if (exportOptions && exportOptions.openBrowser) { - opn("file://" + path.resolve(path.join(outputFolderPath, "index.html"))); - } - } - - /** - * Serialize the plot definition so that it can be converted to JSON. - * The JSON definition of the chart can be used to instantiate the chart in a browser. - */ - serialize(): IChartDef { - return applyDefaults(this.chartDef, this.plotDefaults); // Set missing default values after configuration by the fluent. - } - - /** - * Used to external detect the type of this object. - */ - getTypeCode(): string { - return "plot"; - } -} - -/** - * Fluent API for configuring the plot. - */ -export class PlotAPI extends AbstractPlotAPI { - - /** - * Deserialize an instance of PlotAPI from a previously serialize chart def. - * - * @param chartDef The chart definition to deserialize from. - */ - static deserialize(chartDef: IChartDef): IPlotAPI { - return new PlotAPI(chartDef.data, chartDef.plotConfig, chartDef.axisMap); - } - - constructor(data: ISerializedDataFrame, plotConfig: IPlotConfig, axisMap: IAxisMap, plotDefaults?: IPlotConfig) { - if (!isObject(data)) { - throw new Error("Expected 'data' parameter to PlotAPI constructor to be a serialized dataframe."); - } - - super(expandChartDef(data, plotConfig, axisMap), plotDefaults); - } -} - -/** - * Fluent API for series configuration. - */ -abstract class AxisSeriesConfigAPI extends AbstractPlotAPI implements IAxisSeriesConfigAPI { - - seriesName: string; - seriesConfig: SeriesConfigT; - - constructor( - seriesName: string, - seriesConfig: SeriesConfigT, - chartDef: IChartDef - ) { - super(chartDef); - - this.seriesName = seriesName; - this.seriesConfig = seriesConfig; - } -} - -/** - * Fluent API for X axis series configuration. - */ -class XAxisSeriesConfigAPI extends AxisSeriesConfigAPI implements IXAxisSeriesConfigAPI { - - constructor( - seriesName: string, - seriesConfig: IAxisSeriesConfig, - chartDef: IChartDef - ) { - super(seriesName, seriesConfig, chartDef); - } -} - -/** - * Fluent API for Y axis series configuration. - */ -class YAxisSeriesConfigAPI extends AxisSeriesConfigAPI implements IYAxisSeriesConfigAPI { - - constructor( - seriesName: string, - seriesConfig: IYAxisSeriesConfig, - chartDef: IChartDef - ) { - super(seriesName, seriesConfig, chartDef); - } - - /** - * Set the label for the series. - */ - label(label: string): IYAxisSeriesConfigAPI { - this.seriesConfig.label = label; - return this; - } - - /** - * Set the display format for values of this series. - */ - format(formatString: string): IYAxisSeriesConfigAPI { - this.seriesConfig.format = formatString; - return this; - } - - /** - * Configure an explicit x axis for this series. - */ - setX(seriesName: string): IXAxisSeriesConfigAPI { - if (!this.seriesConfig.x) { - this.seriesConfig.x = { series: seriesName }; - } - else { - this.seriesConfig.x.series = seriesName; - } - - return new XAxisSeriesConfigAPI( - "x", - this.seriesConfig.x!, - this.chartDef - ); - } -} - -/** - * Fluent API for configuring an axis of the chart. - */ -abstract class AxisConfigAPI extends AbstractPlotAPI implements IAxisConfigAPI { - - /** - * The name of the axis being configured. - */ - protected axisName: string; - - /** - * Configuration for the axis. - */ - protected axisConfig: AxisConfigT; - - constructor( - axisName: string, - axisConfig: AxisConfigT, - chartDef: IChartDef - ) { - super(chartDef); - - this.axisName = axisName; - this.axisConfig = axisConfig; - } - - /** - * Set the label for the axis. - */ - label(label: string): FluentT { - - if (!this.axisConfig.label) { - this.axisConfig.label = {}; - } - - this.axisConfig.label.text = label; - return this as any as FluentT; - } - -} - -/** - * Fluent API for configuring an axis of the chart. - */ -class XAxisConfigAPI extends AxisConfigAPI implements IXAxisConfigAPI { - - createSeriesConfig: (seriesName: string) => IAxisSeriesConfig; - - constructor( - axisName: string, - axisConfig: IXAxisConfig, - createSeriesConfig: (seriesName: string) => IAxisSeriesConfig, - chartDef: IChartDef - ) { - super(axisName, axisConfig, chartDef); - - this.createSeriesConfig = createSeriesConfig; - } - - /** - * Set the series for the x axis. - */ - setSeries(seriesName: string): IXAxisSeriesConfigAPI { - return new XAxisSeriesConfigAPI( - seriesName, - this.createSeriesConfig(seriesName), - this.chartDef - ); - } - - /** - * Set the type of the axis. - */ - type(axisType: AxisType): IXAxisSeriesConfigAPI { - this.axisConfig.axisType = axisType; - return this as any as IXAxisSeriesConfigAPI; - } - - /** - * Set the position for the label. - */ - labelPosition(position: HorizontalLabelPosition): IXAxisConfigAPI { - - if (!this.axisConfig.label) { - this.axisConfig.label = {}; - } - - this.axisConfig.label.position = position; - return this; - } -} - -/** - * Fluent API for configuring an axis of the chart. - */ -class YAxisConfigAPI extends AxisConfigAPI implements IYAxisConfigAPI { - - createSeriesConfig: (seriesName: string) => IYAxisSeriesConfig; - - constructor( - axisName: string, - axisConfig: IYAxisConfig, - createSeriesConfig: (seriesName: string) => IYAxisSeriesConfig, - chartDef: IChartDef - ) { - super(axisName, axisConfig, chartDef); - - this.createSeriesConfig = createSeriesConfig; - } - - /** - * Add a series to a Y axis. - */ - addSeries(seriesName: string): IYAxisSeriesConfigAPI { - - return new YAxisSeriesConfigAPI( - seriesName, - this.createSeriesConfig(seriesName), - this.chartDef - ); - } - - /** - * Set the position for the label. - */ - labelPosition(position: VerticalLabelPosition): IYAxisConfigAPI { - if (!this.axisConfig.label) { - this.axisConfig.label = {}; - } - else if (typeof(this.axisConfig.label) === "string") { - this.axisConfig.label = { - text: this.axisConfig.label, - }; - } - - this.axisConfig.label.position = position; - return this; - } - - /** - * Sets the minimum value to render on the axis. - * @param value The minimum value to render. - */ - min(value: number): IYAxisConfigAPI { - // todo: - return this; - } - - /** - * Sets the maximum value to render on the axis. - * @param value The maximum value to render. - */ - max(value: number): IYAxisConfigAPI { - // todo: - return this; - } - -} diff --git a/src/test/apply-defaults.test.ts b/src/test/apply-defaults.test.ts deleted file mode 100644 index 7d66ca2..0000000 --- a/src/test/apply-defaults.test.ts +++ /dev/null @@ -1,518 +0,0 @@ -import "jest"; -import { applyDefaults } from "../apply-defaults"; -import { ChartType } from "@data-forge-plot/chart-def"; - -describe("apply defaults", () => { - - it("chart type defaults to line 1", () => { - const inputChartDef: any = { data: { columnOrder: [], }, plotConfig: {} }; - const expanded = applyDefaults(inputChartDef); - expect(expanded.plotConfig!.chartType!).toEqual(ChartType.Line); - }); - - it("chart type defaults to line 2", () => { - const inputChartDef: any = { data: { columnOrder: [], }, plotConfig: {} }; - const expanded = applyDefaults(inputChartDef); - expect(expanded.plotConfig!.chartType!).toEqual(ChartType.Line); - }); - - it("width defaults to 800", () => { - const inputChartDef: any = { data: { columnOrder: [], }, plotConfig: {} }; - const expanded = applyDefaults(inputChartDef); - expect(expanded.plotConfig!.width).toEqual(800); - }); - - it("height defaults to 600", () => { - const inputChartDef: any = { data: { columnOrder: [], }, plotConfig: {} }; - const expanded = applyDefaults(inputChartDef); - expect(expanded.plotConfig!.height).toEqual(600); - }); - - it("y axis defaults to all columns when no y axis series is specified 1", () => { - - const data: any = { columnOrder: ["a", "b", "c"] }; - const plotConfig: any = {}; - const axisMap: any = {}; - const inputChartDef: any = { data, plotConfig, axisMap }; - const expanded = applyDefaults(inputChartDef); - expect(expanded.axisMap.y).toEqual([ - { - series: "a", - }, - { - series: "b", - }, - { - series: "c", - }, - ]); - expect(expanded.axisMap.y2).toEqual([]); - }); - - it("y axis defaults to all columns when no y axis series is specified 2", () => { - - const data: any = { columnOrder: ["a", "b", "c"] }; - const plotConfig: any = {}; - const axisMap: any = { y: [], y2: [] }; - const inputChartDef: any = { data, plotConfig, axisMap }; - const expanded = applyDefaults(inputChartDef); - expect(expanded.axisMap.y).toEqual([ - { - series: "a", - }, - { - series: "b", - }, - { - series: "c", - }, - ]); - expect(expanded.axisMap.y2).toEqual([]); - }); - - it("can set plot defaults 1", () => { - const inputChartDef: any = { data: { columnOrder: [], } }; - const expanded = applyDefaults(inputChartDef, { chartType: ChartType.Bubble }); - expect(expanded.plotConfig!.chartType!).toEqual(ChartType.Bubble); - }); - - it("can set plot defaults 2", () => { - const inputChartDef: any = { data: { columnOrder: [], }, plotConfig: {} }; - const expanded = applyDefaults(inputChartDef, { chartType: ChartType.Bubble }); - expect(expanded.plotConfig!.chartType!).toEqual(ChartType.Bubble); - }); - - const testData = { - columnOrder: ["a", "b"], - columns: { - a: "number", - b: "number", - }, - index: { - type: "number", - values: [2, 3, 4], - }, - values: [ - { - a: 10, - b: 100, - }, - { - a: 20, - b: 200, - }, - { - a: 30, - b: 300, - }, - ], - }; - - const testDataWithBadValues = { - columnOrder: ["a", "b"], - columns: { - a: "number", - b: "number", - }, - index: { - type: "number", - values: [2, 3, 4, 5, 6], - }, - values: [ - { - a: 10, - b: 100, - }, - { - a: null, - b: undefined, - }, - { - a: 20, - b: 200, - }, - { - a: 5 / 0, - b: Math.sqrt(-2), - }, - { - a: 30, - b: 300, - }, - ], - }; - - it("y min can be passed through", () => { - - const inputChartDef: any = { - data: testData, - plotConfig: { - y: { - min: 15, - }, - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y!.min).toBe(15); - }); - - it("y min defaults to y series min", () => { - - const inputChartDef: any = { - data: testData, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y!.min).toBe(10); - }); - - it("y min defaults to y series min with bad values", () => { - - const inputChartDef: any = { - data: testDataWithBadValues, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y!.min).toBe(10); - }); - - it("y max can be passed through", () => { - - const inputChartDef: any = { - data: testData, - plotConfig: { - y: { - max: 25, - }, - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y!.max).toBe(25); - }); - - it("y max defaults to y series max", () => { - - const inputChartDef: any = { - data: testData, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y!.max).toBe(300); - }); - - it("y max defaults to y series max with bad values", () => { - - const inputChartDef: any = { - data: testDataWithBadValues, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y!.max).toBe(300); - }); - - it("y2 min can be passed through", () => { - - const inputChartDef: any = { - data: testData, - plotConfig: { - y2: { - min: 0, - }, - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y2!.min).toBe(0); - }); - - it("y2 min defaults to y2 series min", () => { - - const inputChartDef: any = { - data: testData, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y2: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y2!.min).toBe(10); - }); - - it("y2 min defaults to y2 series min with bad values", () => { - - const inputChartDef: any = { - data: testDataWithBadValues, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y2: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y2!.min).toBe(10); - }); - - it("y2 max can be passed through", () => { - - const inputChartDef: any = { - data: testData, - plotConfig: { - y2: { - max: 400, - }, - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y2!.max).toBe(400); - }); - - it("y2 max defaults to y2 series max", () => { - - const inputChartDef: any = { - data: testData, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y2: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y2!.max).toBe(300); - }); - - it("y2 max defaults to y2 series max with bad values", () => { - - const inputChartDef: any = { - data: testDataWithBadValues, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y2: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y2!.max).toBe(300); - }); - - it("min/max not computed for non number data", () => { - - const data = { - columnOrder: ["a", "b"], - columns: { - a: "string", - b: "string", - }, - index: { - type: "number", - values: [2, 3, 4], - }, - values: [ - { - a: "10", - b: "100", - }, - { - a: "20", - b: "200", - }, - { - a: "30", - b: "300", - }, - ], - }; - - const inputChartDef: any = { - data, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y!.min).toBeUndefined(); - expect(chartDef.plotConfig.y!.max).toBeUndefined(); - expect(chartDef.plotConfig.y2!.min).toBeUndefined(); - expect(chartDef.plotConfig.y2!.max).toBeUndefined(); - }); - - it("computed min and max are rounded", () => { - - const testData = { - columnOrder: [ "a" ], - columns: { - a: "number", - b: "number", - }, - index: { - type: "number", - values: [2, 3, 4], - }, - values: [ - { - a: 10.123456, - }, - { - a: 20, - }, - { - a: 30.01234567, - }, - ], - }; - - const inputChartDef: any = { - data: testData, - plotConfig: { - y: { - }, - y2: { - }, - }, - axisMap: { - y: [ - { - series: "a", - }, - { - series: "b", - }, - ], - }, - }; - - const chartDef = applyDefaults(inputChartDef); - expect(chartDef.plotConfig.y!.min).toBe(10.12); - expect(chartDef.plotConfig.y!.max).toBe(30.02); - }); - -}); diff --git a/src/test/dataframe-fluent.test.ts b/src/test/dataframe-fluent.test.ts index 6d61f52..8ab013e 100644 --- a/src/test/dataframe-fluent.test.ts +++ b/src/test/dataframe-fluent.test.ts @@ -5,56 +5,41 @@ import "../index"; describe("data-forge-plot - dataframe fluent", () => { it("can explicity set y axis", () => { - const df = new DataFrame({ index: [1, 2, 3], values: [{ A: 10, }, { A: 20 }, { A: 30 } ] }); const plotAPI = df.plot() .y() .addSeries("A"); - - expect(plotAPI.serialize()).toEqual({ - data: { - columnOrder: [ - "A", - ], - columns: { - A: "number", - }, - index: { - type: "number", - values: [ 1, 2, 3 ], - }, - values: [ - { - A: 10, - }, - { - A: 20, - }, - { - A: 30, - }, - ], + expect(plotAPI.serialize()).toEqual( { + "data": { + "series": { + "A": { + "type": "number", + "values": [ + 10, + 20, + 30 + ] + } + } }, - plotConfig: { - chartType: "line", - width: 800, - height: 600, - y: { - min: 10, - max: 30, - }, - y2: { + "plotConfig": { + "y": { + "min": 10, + "max": 30 }, + "chartType": "line", + "width": 800, + "height": 600, + "y2": {} }, - axisMap: { - y: [ + "axisMap": { + "y": [ { - series: "A", - }, + "series": "A" + } ], - y2: [], - }, + "y2": [] + } }); }); - }); diff --git a/src/test/dataframe.test.ts b/src/test/dataframe.test.ts index f2943b2..31c560a 100644 --- a/src/test/dataframe.test.ts +++ b/src/test/dataframe.test.ts @@ -1,7 +1,6 @@ import "jest"; import { DataFrame } from "data-forge"; import "../index"; -import { ChartType } from "@data-forge-plot/chart-def"; describe("data-forge-plot - dataframe configuration", () => { @@ -10,59 +9,39 @@ describe("data-forge-plot - dataframe configuration", () => { const df = new DataFrame({ index: [1, 2, 3], values: [{ A: 10 }, { A: 20 }, { A: 30 } ] }); const plotAPI = df.plot(); expect(plotAPI.serialize()).toEqual({ - data: { - columnOrder: [ - "A", - ], - columns: { - A: "number", - }, - index: { - type: "number", - values: [ 1, 2, 3 ], - }, - values: [ - { - A: 10, - }, - { - A: 20, - }, - { - A: 30, - }, - ], + "data": { + "series": { + "A": { + "type": "number", + "values": [ + 10, + 20, + 30 + ] + } + } }, - plotConfig: { - chartType: "line", - width: 800, - height: 600, - y: { - min: 10, - max: 30, + "plotConfig": { + "legend": { + "show": true }, - y2: { - }, - legend: { - show: true, + "chartType": "line", + "width": 800, + "height": 600, + "y": { + "min": 10, + "max": 30 }, + "y2": {} }, - axisMap: { - y: [ + "axisMap": { + "y": [ { - series: "A", - }, + "series": "A" + } ], - y2: [], - }, + "y2": [] + } }); }); - - it("legend is enabled by default for dataframe", () => { - - const df = new DataFrame(); - const plotAPI = df.plot(); - const serialized = plotAPI.serialize(); - expect(serialized.plotConfig.legend!.show).toEqual(true); - }); }); diff --git a/src/test/expand-chart-def.test.ts b/src/test/expand-chart-def.test.ts deleted file mode 100644 index d02e547..0000000 --- a/src/test/expand-chart-def.test.ts +++ /dev/null @@ -1,202 +0,0 @@ -import "jest"; -import { expandChartDef, expandAxisConfig, expandAxisMap, expandSeriesConfig, expandYSeriesConfig, expandYSeriesConfigArray } from "../expand-chart-def"; -import { ChartType, AxisType } from "@data-forge-plot/chart-def"; - -describe("expand chart def", () => { - - it("axis label string is expended to an object", () => { - const expanded = expandAxisConfig({ label: "My label" }); - expect(expanded.label!.text).toBe("My label"); - }); - - it("can expand string series config to object", () => { - const expanded = expandSeriesConfig("my series"); - expect(expanded.series).toBe("my series"); - }); - - it("can expand series config", () => { - const seriesConfig = { series: "my series" }; - const expanded = expandSeriesConfig(seriesConfig); - expect(expanded).not.toBe(seriesConfig); - expect(expanded).toEqual(seriesConfig); - }); - - it("can expand series config with string label", () => { - const seriesConfig = { series: "my series", label: "a great series" }; - const expanded = expandSeriesConfig(seriesConfig); - expect(expanded.label).toBe("a great series"); - }); - - it("can expand series config with format", () => { - const seriesConfig = { series: "my series", format: "the format!" }; - const expanded = expandSeriesConfig(seriesConfig); - expect(expanded.format).toBe("the format!"); - }); - - it("can expand series config with color", () => { - const seriesConfig = { series: "my series", format: "red" }; - const expanded = expandSeriesConfig(seriesConfig); - expect(expanded.format).toBe("red"); - }); - - it("can expand y series config with specific x series as string", () => { - const seriesConfig = { series: "my y series", x: "my x series" }; - const expanded = expandYSeriesConfig(seriesConfig); - expect(expanded.x!.series).toBe("my x series"); - }); - - it("can expand undefined y series to empty array", () => { - const expanded = expandYSeriesConfigArray(); - expect(expanded).toEqual([]); - }); - - it("can expand empty y series to empty array", () => { - const expanded = expandYSeriesConfigArray([]); - expect(expanded).toEqual([]); - }); - - it("can expand string y series to array", () => { - const expanded = expandYSeriesConfigArray("my series"); - expect(expanded).toEqual([ - { - series: "my series", - }, - ]); - }); - - it("can expand object y series to array", () => { - const expanded = expandYSeriesConfigArray({ series: "my series" }); - expect(expanded).toEqual([ - { - series: "my series", - }, - ]); - }); - - it("can expand string array y series to array", () => { - const expanded = expandYSeriesConfigArray(["s1", "s2"]); - expect(expanded).toEqual([ - { - series: "s1", - }, - { - series: "s2", - }, - ]); - }); - - it("can expand object array y series to array", () => { - const expanded = expandYSeriesConfigArray([{ series: "s1" }, { series: "s2" }]); - expect(expanded).toEqual([ - { - series: "s1", - }, - { - series: "s2", - }, - ]); - }); - - it("can expand empty axis map", () => { - const expanded = expandAxisMap({}, []); - expect(expanded).toEqual({ - y: [], - y2: [], - }); - }); - - it("can expand empty axis map 2", () => { - const expanded = expandAxisMap({ y: [], y2: [] }, []); - expect(expanded).toEqual({ - y: [], - y2: [], - }); - }); - - it("can expand axis map with strings", () => { - const expanded = expandAxisMap({ x: "my x", y: "my y1", y2: "my y2" }, []); - expect(expanded).toEqual({ - x: { - series: "my x", - }, - y: [ - { - series: "my y1", - }, - ], - y2: [ - { - series: "my y2", - }, - ], - }); - }); - - it("y does not default when y is specified", () => { - - const data: any = { columnOrder: ["a", "b", "c"] }; - const plotConfig: any = {}; - const axisMap: any = { y: "b" }; - const chartDef = expandChartDef(data, plotConfig, axisMap); - expect(chartDef.axisMap.y).toEqual([ - { - series: "b", - }, - ]); - expect(chartDef.axisMap.y2).toEqual([]); - }); - - it("y does not default when y2 is specified", () => { - - const data: any = { columnOrder: ["a", "b", "c"] }; - const plotConfig: any = {}; - const axisMap: any = { y2: "b" }; - const chartDef = expandChartDef(data, plotConfig, axisMap); - expect(chartDef.axisMap.y).toEqual([]); - expect(chartDef.axisMap.y2).toEqual([ - { - series: "b", - }, - ]); - }); - - it("can set chart type", () => { - const data: any = {}; - const plotConfig: any = { chartType: ChartType.Donut }; - const axisMap: any = {}; - const chartDef = expandChartDef(data, plotConfig, axisMap); - expect(chartDef.plotConfig.chartType).toBe(ChartType.Donut); - }); - - it("can set width and height", () => { - - const data: any = {}; - const plotConfig: any = { width: 5555, height: 6666 }; - const axisMap: any = {}; - const chartDef = expandChartDef(data, plotConfig, axisMap); - expect(chartDef.plotConfig.width).toBe(5555); - expect(chartDef.plotConfig.height).toBe(6666); - }); - - it("can expand axis config", () => { - - const xConfig = { axisType: AxisType.Category }; - const yConfig = {}; - const y2Config = {}; - const expanded = expandChartDef({} as any, { x: xConfig, y: yConfig, y2: y2Config }, {}); - expect(expanded.plotConfig.x).not.toBe(xConfig); - expect(expanded.plotConfig.x).toEqual(xConfig); - expect(expanded.plotConfig.y).not.toBe(yConfig); - expect(expanded.plotConfig.y).toEqual(yConfig); - expect(expanded.plotConfig.y2).not.toBe(y2Config); - expect(expanded.plotConfig.y2).toEqual(y2Config); - }); - - it("can expand axis map", () => { - - const expanded = expandChartDef({} as any, {}, { x: "my x", y: "my y", y2: "my y2" }); - expect(expanded.axisMap.x).toEqual({ series: "my x" }); - expect(expanded.axisMap.y).toEqual([{ series: "my y" }]); - expect(expanded.axisMap.y2).toEqual([{ series: "my y2" }]); - }); -}); diff --git a/src/test/plot-api.test.ts b/src/test/plot-api.test.ts deleted file mode 100644 index 718bb2c..0000000 --- a/src/test/plot-api.test.ts +++ /dev/null @@ -1,428 +0,0 @@ -import "jest"; -jest.mock("inflate-template"); -import { exportTemplate } from "inflate-template"; -import { PlotAPI } from "../plot-api"; -import { ChartType, HorizontalLabelPosition, VerticalLabelPosition, AxisType } from "@data-forge-plot/chart-def"; -import { IAxisMap, IPlotConfig } from "../chart-def"; - -describe("plot-api", () => { - - it("chart type defaults to line when not specified", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - expect(plot.serialize().plotConfig.chartType).toBe(ChartType.Line); - }); - - it("can set chart type from def", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { chartType: ChartType.Bubble }; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - expect(plot.serialize().plotConfig.chartType).toBe(ChartType.Bubble); - }); - - it("can set chart type from fluent API", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - plot.chartType(ChartType.Bubble); - expect(plot.serialize().plotConfig.chartType).toBe(ChartType.Bubble); - }); - - it("can override chart type from fluent API", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { chartType: ChartType.Pie }; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - plot.chartType(ChartType.Radar); - expect(plot.serialize().plotConfig.chartType).toBe(ChartType.Radar); - }); - - it("can set width and height from def", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { width: 333, height: 444 }; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot.serialize(); - expect(serialized.plotConfig.width).toBe(333); - expect(serialized.plotConfig.height).toBe(444); - }); - - it("can set width and height from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { width: 333, height: 444 }; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .width(222) - .height(555); - const serialized = plot.serialize(); - expect(serialized.plotConfig.width).toBe(222); - expect(serialized.plotConfig.height).toBe(555); - }); - - it("can override width and height from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { width: 333, height: 444 }; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .width(99) - .height(88); - const serialized = plot.serialize(); - expect(serialized.plotConfig.width).toBe(99); - expect(serialized.plotConfig.height).toBe(88); - }); - - it("can serialize and deserialize", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { width: 333, height: 444 }; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized1 = plot.serialize(); - const serialized2 = PlotAPI.deserialize(serialized1).serialize(); - expect(serialized1).toEqual(serialized2); - }); - - it("can configure x axis", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .x() - .label("my label") - .serialize(); - expect(serialized.plotConfig.x!.label!.text).toBe("my label"); - }); - - it("can configure y axis", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y() - .label("my label") - .serialize(); - expect(serialized.plotConfig.y!.label!.text).toBe("my label"); - }); - - it("can configure y2 axis", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y2() - .label("my label") - .serialize(); - expect(serialized.plotConfig.y2!.label!.text).toBe("my label"); - }); - - it("can set x axis series", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .x() - .setSeries("my series") - .serialize(); - expect(serialized.axisMap.x!.series).toBe("my series"); - }); - - it("can add y axis series", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y() - .addSeries("my series") - .serialize(); - expect(serialized.axisMap.y[0].series).toBe("my series"); - }); - - it("can add y2 axis series", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y2() - .addSeries("my series") - .serialize(); - expect(serialized.axisMap.y2[0].series).toBe("my series"); - }); - - /*todo: - nothing to configure yet! - it("can config x axis series", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .x() - .setSeries("my series") - . - .serialize(); - expect(serialized.axisMap.x!.series).toBe("my series"); - }); - */ - - it("can configure y axis series", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y() - .addSeries("my series") - .label("a great series") - .serialize(); - expect(serialized.axisMap.y[0].label).toBe("a great series"); - }); - - it("can set specific x series for y axis series", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y() - .addSeries("my series") - .setX("my x") - .serialize(); - expect(serialized.axisMap.y[0].x!.series).toBe("my x"); - }); - - it("can configure y axis series", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y2() - .addSeries("my series") - .label("a great series") - .serialize(); - expect(serialized.axisMap.y2[0].label).toBe("a great series"); - }); - - it("can set specific x series for y2 axis series", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y2() - .addSeries("my series") - .setX("my x") - .serialize(); - expect(serialized.axisMap.y2[0].x!.series).toBe("my x"); - }); - - it("can set x axis label", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { x: { label: { text: "A label!" }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.label!.text).toBe("A label!"); - }); - - it("can set x axis label from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .x() - .label("My label!"); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.label!.text).toBe("My label!"); - }); - - it("can override x axis label from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { x: { label: { text: "A label!" }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .x() - .label("My label!"); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.label!.text).toBe("My label!"); - }); - - it("can set x axis label position", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { x: { label: { position: HorizontalLabelPosition.OuterRight }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.label!.position).toBe(HorizontalLabelPosition.OuterRight); - }); - - it("can set x axis type", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .x() - .type(AxisType.Timeseries); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.axisType).toBe(AxisType.Timeseries); - }); - - it("can set x axis label", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { x: { label: { text: "A label!" }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.label!.text).toBe("A label!"); - }); - - it("can set x axis label from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .x() - .label("My label!"); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.label!.text).toBe("My label!"); - }); - - it("can override x axis label from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { x: { label: { text: "A label!" }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .x() - .label("My label!"); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.label!.text).toBe("My label!"); - }); - - it("can set x axis label position", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .x() - .labelPosition(HorizontalLabelPosition.OuterLeft) - .serialize(); - expect(serialized.plotConfig.x!.label!.position).toBe(HorizontalLabelPosition.OuterLeft); - }); - - it("can set x axis type", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .x() - .type(AxisType.Timeseries); - const serialized = plot.serialize(); - expect(serialized.plotConfig.x!.axisType).toBe(AxisType.Timeseries); - }); - - it("can set y axis label", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { y: { label: { text: "A label!" }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot.serialize(); - expect(serialized.plotConfig.y!.label!.text).toBe("A label!"); - }); - - it("can set y axis label from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .y() - .label("My label!"); - const serialized = plot.serialize(); - expect(serialized.plotConfig.y!.label!.text).toBe("My label!"); - }); - - it("can override y axis label from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { y: { label: { text: "A label!" }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .y() - .label("My label!"); - const serialized = plot.serialize(); - expect(serialized.plotConfig.y!.label!.text).toBe("My label!"); - }); - - it("can set y axis label position", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y() - .labelPosition(VerticalLabelPosition.OuterMiddle) - .serialize(); - expect(serialized.plotConfig.y!.label!.position).toBe(VerticalLabelPosition.OuterMiddle); - }); - - it("can set y2 axis label", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { y2: { label: { text: "A label!" }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot.serialize(); - expect(serialized.plotConfig.y2!.label!.text).toBe("A label!"); - }); - - it("can set y2 axis label from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .y2() - .label("My label!"); - const serialized = plot.serialize(); - expect(serialized.plotConfig.y2!.label!.text).toBe("My label!"); - }); - - it("can override y2 axis label from fluent api", () => { - const data: any = {}; - const plotConfig: IPlotConfig = { y2: { label: { text: "A label!" }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap) - .y2() - .label("My label!"); - const serialized = plot.serialize(); - expect(serialized.plotConfig.y2!.label!.text).toBe("My label!"); - }); - - it("can set y2 axis label position", () => { - const data: any = {}; - const plotConfig: IPlotConfig = {}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const serialized = plot - .y2() - .labelPosition(VerticalLabelPosition.OuterMiddle) - .serialize(); - expect(serialized.plotConfig.y2!.label!.position).toBe(VerticalLabelPosition.OuterMiddle); - }); - - it("can export web", async () => { - const data: any = {}; - const plotConfig: IPlotConfig = { x: { label: { position: HorizontalLabelPosition.OuterRight }}}; - const axisMap: IAxisMap = {}; - const plot = new PlotAPI(data, plotConfig, axisMap); - const outputPath = "./output/test"; - await plot.exportWeb(outputPath); - expect(exportTemplate).toHaveBeenCalled(); - }); -}); diff --git a/src/test/series.test.ts b/src/test/series.test.ts index b781038..04b344b 100644 --- a/src/test/series.test.ts +++ b/src/test/series.test.ts @@ -5,63 +5,42 @@ import "../index"; describe("data-forge-plot - series", () => { it("plot series with no configuration", () => { - const series = new Series({ index: [1, 2, 3], values: [10, 20, 30] }); const plotAPI = series.plot(); expect(plotAPI.serialize()).toEqual({ - data: { - columnOrder: [ - "__value__", - ], - columns: { - __value__: "number", - }, - index: { - type: "number", - values: [ 1, 2, 3 ], - }, - values: [ - { - __value__: 10, - }, - { - __value__: 20, - }, - { - __value__: 30, + "data": { + "series": { + "y": { + "type": "number", + "values": [ + 10, + 20, + 30 + ] } - ] + } }, - plotConfig: { - chartType: "line", - width: 800, - height: 600, - y: { - min: 10, - max: 30, - }, - y2: { + "plotConfig": { + "legend": { + "show": false }, - legend: { - show: false, + "chartType": "line", + "width": 800, + "height": 600, + "y": { + "min": 10, + "max": 30 }, + "y2": {} }, - axisMap: { - y: [ + "axisMap": { + "y": [ { - series: "__value__" + "series": "y" } ], - y2: [] + "y2": [] } }); }); - - it("legend is disabled by default for series", () => { - - const series = new Series(); - const plotAPI = series.plot(); - const serialized = plotAPI.serialize(); - expect(serialized.plotConfig.legend!.show).toEqual(false); - }); }); From bc742197447ad277802c5b24297d051e2cf41861 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 11 Feb 2021 08:26:31 +1000 Subject: [PATCH 25/28] Fixed exported types. --- package.json | 2 +- src/index.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 98b46e0..465b6b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "1.0.0", + "version": "1.0.1", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", diff --git a/src/index.ts b/src/index.ts index e67cc2f..d9b97d6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,8 @@ -import { IAxisMap, IPlotConfig } from "@plotex/chart-def"; import { ISeries, Series } from "data-forge"; import { IDataFrame, DataFrame } from "data-forge"; -import { IPlotAPI, plot } from "plot"; -export { IPlotAPI } from "plot"; +import { IAxisMap, IPlotAPI, IPlotConfig, plot } from "plot"; export * from "@plotex/chart-def"; +export { IPlotAPI, IAxisConfig, IXAxisConfig, IYAxisConfig, IPlotConfig, IYAxisSeriesConfig, IAxisMap } from "plot"; // // Augment ISeries and Series with plot function. From a900e9f0aae2ee85d50237c747b9f4b712975d57 Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 18 Feb 2021 19:51:56 +1000 Subject: [PATCH 26/28] Updated plot library. --- package-lock.json | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 709c3e8..92dc67e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 465b6b4..ec28210 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "1.0.1", + "version": "1.0.2", "description": "Plotting API for use with Data-Forge.", "main": "build/index.js", "types": "build/index.d.ts", @@ -37,7 +37,7 @@ "dependencies": { "@plotex/chart-def": "^1.0.15", "opn": "^5.5.0", - "plot": "^1.0.15", + "plot": "^1.0.17", "resolve-cwd": "^3.0.0", "typy": "^3.0.1" }, From c7ce34e79d0120d6e9ede306f5d05ab6bf9b5dde Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Thu, 18 Feb 2021 19:55:58 +1000 Subject: [PATCH 27/28] Updated package lock. --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 92dc67e..beabd51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "data-forge-plot", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -4175,9 +4175,9 @@ } }, "plot": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/plot/-/plot-1.0.15.tgz", - "integrity": "sha512-3OFvinV15qm1JxOP1pSSTD/s/UMUL4vxk3sZufAsUDT7pB+zRN2XMa34ccmausdihIrnLNlUI/RYGxf8iHEc5Q==", + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/plot/-/plot-1.0.17.tgz", + "integrity": "sha512-idSHM9PqvgyNQMPxX/ig2yuasZ6lzuD1AsNyM36IZpTKU42JtupAnXu/fM+lEaViVwULuD4SzsX6Kiru+ccMVw==", "requires": { "@plotex/chart-def": "^1.0.15", "@plotex/serialization": "^1.0.11", From 6e992c3b8c043ec3bcb0ec56358788936458d08b Mon Sep 17 00:00:00 2001 From: Ashley Davis Date: Sat, 2 Oct 2021 10:49:05 +1000 Subject: [PATCH 28/28] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 59b5922..f86baae 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ Do your prototyping and exploratory data analysis in JavaScript with [Data-Forge Please join the conversation on [Gitter](https://gitter.im/data-forge) +[Click here to support my work](https://www.codecapers.com.au/about#support-my-work) + ## Breaking changes As of version 1.0.0 Data-Forge Plot has been gutted and reimplimented in terms of the [Plot library](https://www.npmjs.com/package/plot) (which is very similar). DFP is now just a wrapper for Plot to ease my maintence burden.