From 84b295a5bf7ab394541b14011c939c8149a63fb8 Mon Sep 17 00:00:00 2001 From: Ian Wright Date: Thu, 13 Jul 2023 13:18:22 +0100 Subject: [PATCH 1/3] Renamed chart-it to chart-io --- CanvasScatter.md | 12 ----- README.md | 21 +++++---- demos/react-demo/CHANGELOG.md | 6 +-- demos/react-demo/jest.config.js | 2 +- demos/react-demo/package.json | 2 +- demos/react-demo/src/App.jsx | 2 +- .../src/__snapshots__/App.unit.jsx.snap | 6 +-- package.json | 10 ++--- packages/d3/CHANGELOG.md | 2 +- packages/d3/package.json | 4 +- packages/detection/CHANGELOG.md | 22 +++++----- packages/detection/jest.config.js | 2 +- packages/detection/package.json | 10 ++--- .../detection/src/getInfos/getColumnInfos.ts | 2 +- .../src/getInfos/getTypeSpecificColumnInfo.ts | 2 +- packages/react/CHANGELOG.md | 16 +++---- packages/react/jest.config.js | 2 +- packages/react/package.json | 14 +++--- packages/react/src/data/example_dataset.js | 2 +- .../src/lib/components/Axis/Axis/Axis.tsx | 8 ++-- .../lib/components/Axis/Axis/Axis.unit.tsx | 2 +- .../Axis/Axis/AxisCustomisations.stories.tsx | 4 +- .../Axis/Axis/Gridlines/Gridlines.tsx | 6 +-- .../Axis/Axis/Gridlines/Gridlines.unit.tsx | 2 +- .../Axis/Axis/Gridlines/getTickSize.ts | 2 +- .../lib/components/Axis/Axis/Title/Title.tsx | 4 +- .../Title/__snapshots__/Title.unit.tsx.snap | 4 +- .../Axis/Axis/Title/getTransform.ts | 2 +- .../Axis/__snapshots__/Axis.unit.tsx.snap | 16 +++---- .../src/lib/components/Axis/Axis/getD3Axis.ts | 6 +-- .../lib/components/Axis/Axis/getTransform.ts | 2 +- .../src/lib/components/Axis/XAxis/XAxis.tsx | 2 +- .../lib/components/Axis/XAxis/XAxis.unit.tsx | 2 +- .../XAxis/__snapshots__/XAxis.unit.tsx.snap | 2 +- .../src/lib/components/Axis/YAxis/YAxis.tsx | 2 +- .../lib/components/Axis/YAxis/YAxis.unit.tsx | 2 +- .../YAxis/__snapshots__/YAxis.unit.tsx.snap | 2 +- .../react/src/lib/components/Chart/Chart.tsx | 4 +- .../components/Chart/getChildrenWithProps.ts | 2 +- .../src/lib/components/Chart/getTheme.ts | 2 +- .../src/lib/components/Chart/getTheme.unit.ts | 2 +- .../lib/components/Droplines/Droplines.tsx | 6 +-- .../__snapshots__/Droplines.unit.tsx.snap | 8 ++-- .../EventReceiver/EventReceiver.tsx | 4 +- .../__snapshots__/EventReceiver.unit.tsx.snap | 2 +- .../HorizontalBand/HorizontalBand.stories.tsx | 2 +- .../Bands/HorizontalBand/HorizontalBand.tsx | 2 +- .../HorizontalBand/HorizontalBand.unit.tsx | 2 +- .../VerticalBand/VerticalBand.stories.tsx | 2 +- .../Bands/VerticalBand/VerticalBand.tsx | 2 +- .../Bands/VerticalBand/VerticalBand.unit.tsx | 2 +- .../HorizontalLine/HorizontalLine.stories.tsx | 2 +- .../Lines/HorizontalLine/HorizontalLine.tsx | 2 +- .../HorizontalLine/HorizontalLine.unit.tsx | 2 +- .../VerticalLine/VerticalLine.stories.tsx | 2 +- .../Lines/VerticalLine/VerticalLine.tsx | 2 +- .../Lines/VerticalLine/VerticalLine.unit.tsx | 2 +- .../components/Furniture/Polygon/Polygon.tsx | 2 +- .../LegendOverlay/Legend/Legend.tsx | 4 +- .../LegendOverlay/Legend/Legend.unit.tsx | 2 +- .../Legend/LegendItem/LegendItem.tsx | 8 ++-- .../__snapshots__/LegendItem.unit.tsx.snap | 8 ++-- .../Legend/__snapshots__/Legend.unit.tsx.snap | 26 +++++------ .../LegendOverlay/LegendOverlay.tsx | 2 +- .../__snapshots__/LegendOverlay.unit.tsx.snap | 36 +++++++-------- .../src/lib/components/Markers/Markers.tsx | 6 +-- .../__snapshots__/Markers.unit.tsx.snap | 2 +- .../components/Plots/Area/Area/Area.unit.tsx | 2 +- .../components/Plots/Area/Area/AreaBase.tsx | 4 +- .../Plots/Area/Area/useDatumFocus.ts | 4 +- .../Plots/Area/Area/usePathCreator.ts | 4 +- .../components/Plots/Area/Area/useTooltip.ts | 4 +- .../src/lib/components/Plots/Area/Areas.tsx | 2 +- .../lib/components/Plots/Area/Areas.unit.tsx | 2 +- .../Area/StackedArea/StackedArea.unit.tsx | 2 +- .../Area/StackedArea/StackedAreaBase.tsx | 4 +- .../Plots/Area/StackedArea/useDatumFocus.ts | 4 +- .../Area/StackedArea/useMultiPathCreator.ts | 4 +- .../Plots/Area/StackedArea/useTooltip.ts | 4 +- .../lib/components/Plots/Bar/Bar/Bar.unit.tsx | 2 +- .../lib/components/Plots/Bar/Bar/BarBase.tsx | 6 +-- .../src/lib/components/Plots/Bar/Bars.tsx | 2 +- .../lib/components/Plots/Bar/Bars.unit.tsx | 2 +- .../Plots/Bar/GroupedBar/GroupedBar.unit.tsx | 2 +- .../Plots/Bar/GroupedBar/GroupedBarBase.tsx | 6 +-- .../Plots/Bar/StackedBar/StackedBar.unit.tsx | 2 +- .../Plots/Bar/StackedBar/StackedBarBase.tsx | 6 +-- .../lib/components/Plots/Bar/getDropline.ts | 6 +-- .../lib/components/Plots/Bar/useTooltip.ts | 2 +- .../Plots/Column/Column/Column.unit.tsx | 2 +- .../Plots/Column/Column/ColumnBase.tsx | 6 +-- .../lib/components/Plots/Column/Columns.tsx | 2 +- .../components/Plots/Column/Columns.unit.tsx | 2 +- .../GroupedColumn/GroupedColumn.unit.tsx | 2 +- .../GroupedColumn/GroupedColumnBase.tsx | 6 +-- .../StackedColumn/StackedColumn.unit.tsx | 2 +- .../StackedColumn/StackedColumnBase.tsx | 6 +-- .../components/Plots/Column/getDropline.ts | 4 +- .../lib/components/Plots/Column/useTooltip.ts | 2 +- .../Plots/Line/Line/CanvasLine/CanvasLine.tsx | 4 +- .../lib/components/Plots/Line/Line/Line.tsx | 2 +- .../components/Plots/Line/Line/Line.unit.tsx | 2 +- .../Plots/Line/Line/SVGLine/SVGLine.tsx | 4 +- .../Plots/Line/Line/SVGLine/usePathCreator.ts | 4 +- .../Plots/Line/Line/useDatumFocus.ts | 4 +- .../components/Plots/Line/Line/useTooltip.ts | 4 +- .../src/lib/components/Plots/Line/Lines.tsx | 2 +- .../lib/components/Plots/Line/Lines.unit.tsx | 2 +- .../src/lib/components/Plots/MixedPlots.mdx | 4 +- .../Plots/Scatter/Scatter/Scatter.unit.tsx | 2 +- .../Plots/Scatter/Scatter/ScatterBase.tsx | 6 +-- .../Plots/Scatter/Scatter/useFocused.ts | 4 +- .../Plots/Scatter/Scatter/useTooltip.ts | 2 +- .../lib/components/Plots/Scatter/Scatters.tsx | 2 +- .../Plots/Scatter/Scatters.unit.tsx | 2 +- .../src/lib/components/Plots/renderCanvas.ts | 2 +- .../src/lib/components/Scale/AutoScale.tsx | 2 +- .../react/src/lib/components/Scale/Scale.tsx | 2 +- .../lib/components/Scale/calculateScale.ts | 8 ++-- .../lib/components/Shapes/Circle/Circle.tsx | 4 +- .../Circle/__snapshots__/Circle.unit.tsx.snap | 2 +- .../src/lib/components/Shapes/Line/Line.tsx | 4 +- .../Line/__snapshots__/Line.unit.tsx.snap | 2 +- .../lib/components/Shapes/Square/Square.tsx | 4 +- .../Square/__snapshots__/Square.unit.tsx.snap | 2 +- .../src/lib/components/Shapes/getShape.ts | 2 +- .../TooltipOverlay/Tooltip/Tooltip.tsx | 4 +- .../TooltipOverlay/Tooltip/Tooltip.unit.tsx | 2 +- .../Tooltip/TooltipItem/TooltipItem.tsx | 10 ++--- .../__snapshots__/TooltipItem.unit.tsx.snap | 10 ++--- .../__snapshots__/Tooltip.unit.tsx.snap | 32 +++++++------- .../TooltipOverlay/TooltipOverlay.tsx | 2 +- .../TooltipOverlay.unit.tsx.snap | 44 +++++++++---------- .../TooltipOverlay/getTooltipPosition.ts | 2 +- .../VirtualCanvas/getChildrenWithProps.ts | 4 +- .../src/lib/components/XYChart/XYChart.tsx | 2 +- .../__snapshots__/XYChart.unit.tsx.snap | 2 +- .../HorizontalZoomBrush.stories.tsx | 2 +- .../HorizontalZoomBrush.tsx | 4 +- .../HorizontalZoomBrush.unit.tsx | 2 +- .../lib/components/ZoomBrush/ZoomBrush.tsx | 2 +- packages/react/src/lib/constants.ts | 4 +- .../lib/hoc/__snapshots__/hoc.unit.ts.snap | 4 +- .../src/lib/hoc/canvas/canvasRenderLoop.ts | 4 +- .../hoc/canvas/progressiveCanvasRenderLoop.ts | 4 +- .../react/src/lib/hoc/canvas/renderCircle.ts | 4 +- .../src/lib/hoc/canvas/renderElements.ts | 4 +- .../react/src/lib/hoc/canvas/renderRect.ts | 4 +- .../hoc/canvas/virtual/addEventHandlers.ts | 2 +- .../hoc/canvas/virtual/renderVirtualCanvas.ts | 2 +- .../canvas/virtual/renderVirtualElements.ts | 4 +- .../react/src/lib/hoc/canvas/virtual/types.ts | 2 +- packages/react/src/lib/hoc/withXYPlot.tsx | 2 +- packages/react/src/lib/hooks/useLegendItem.ts | 2 +- .../react/src/lib/hooks/useLegendItems.ts | 2 +- .../react/src/lib/store/chart/chartActions.ts | 2 +- .../src/lib/store/chart/chartSelectors.ts | 2 +- .../__snapshots__/chartActions.unit.ts.snap | 4 +- .../store/chart/tests/chartActions.unit.ts | 2 +- .../store/chart/tests/chartReducer.unit.ts | 2 +- .../store/chart/tests/chartSelectors.unit.ts | 2 +- packages/react/src/lib/store/chart/types.ts | 2 +- .../react/src/lib/store/event/eventActions.ts | 2 +- .../src/lib/store/event/eventSelectors.ts | 2 +- .../store/event/tests/eventActions.unit.ts | 2 +- .../store/event/tests/eventReducer.unit.ts | 2 +- .../store/event/tests/eventSelectors.unit.ts | 2 +- packages/react/src/lib/store/event/types.ts | 2 +- .../react/src/lib/store/types/IChartState.ts | 2 +- .../react/src/lib/store/types/IEventState.ts | 2 +- .../src/lib/stories/Dashboards/Dashboards.mdx | 2 +- .../react/src/lib/stories/GettingStarted.mdx | 8 ++-- .../react/src/lib/stories/Introduction.mdx | 4 +- .../react/src/lib/stories/Theming/Theme.mdx | 2 +- .../react/src/lib/testUtils/renderChart.tsx | 2 +- packages/react/src/lib/themes.ts | 2 +- .../react/src/lib/utils/areValuesUnique.ts | 2 +- .../checks/__snapshots__/checks.unit.ts.snap | 6 +-- .../react/src/lib/utils/checks/checks.unit.ts | 2 +- .../lib/utils/checks/ensureNoScaleOverflow.ts | 4 +- .../lib/utils/checks/ensureValuesAreUnique.ts | 2 +- .../src/lib/utils/formatters/formatDate.ts | 2 +- .../src/lib/utils/formatters/formatNumber.ts | 2 +- .../src/lib/utils/formatters/formatValue.ts | 2 +- .../src/lib/utils/getBandwidthAndOffset.ts | 2 +- .../react/src/lib/utils/getXYFromTransform.ts | 2 +- packages/react/src/lib/utils/utils.unit.ts | 12 ++--- .../storybook/Architecture/Introduction.mdx | 2 +- packages/react/src/storybook/Errors/E003.mdx | 2 +- .../src/storybook/Errors/Introduction.mdx | 4 +- .../react/src/storybook/Warnings/W003.mdx | 2 +- .../react/src/storybook/Warnings/W006.mdx | 2 +- packages/types/CHANGELOG.md | 12 ++--- packages/types/package.json | 8 ++-- pnpm-lock.yaml | 14 +++--- 195 files changed, 422 insertions(+), 435 deletions(-) delete mode 100644 CanvasScatter.md diff --git a/CanvasScatter.md b/CanvasScatter.md deleted file mode 100644 index c2ad1a3a..00000000 --- a/CanvasScatter.md +++ /dev/null @@ -1,12 +0,0 @@ -title CanvasScatter Example - -VirtualCanvas->VirtualCanvas: Added to DOM -VirtualCanvas->ScatterBase: renderVirtualCanvas prop injected -ScatterBase->withXYPlot: wrapped in -withXYPlot->withCanvas: wrapped in -withCanvas->withCanvas: Render canvas within svg:foreignObject -withCanvas->withCanvas: Create fake DOM node -withCanvas->ScatterBase: pass { canvas: ref, layer: fakeDomNode } -ScatterBase->ScatterBase: Data Join & Render within useEffect -ScatterBase->renderCanvas: (canvas, renderVirtual, events) -renderCanvas->VirtualCanvas: renderVirtual(d3.selection, events) diff --git a/README.md b/README.md index 5ecc39ef..303b4d3f 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,24 @@ -# @chart-it/react-d3 +# @chart-io/react-d3 -@chart-it/react-d3 provides a set of reusable chart components to make data visualization easy. All the components are built using a combination of [React](https://reactjs.org/) and [D3](https://d3js.org/). +@chart-io/react-d3 provides a set of reusable chart components to make data visualization easy. All the components are built using a combination of [React](https://reactjs.org/) and [D3](https://d3js.org/). It aims to provide high-level components that require minial configuration to provide great looking charts, while also providing access to the low level components giving you the flexibility to customize them as you see fit. -> :warning: @chart-it/react-d3 is currently in pre-release. While you're welcome to give it a try some interfaces may change. +> :warning: @chart-io/react-d3 is currently in pre-release. While you're welcome to give it a try some interfaces may change. # Install #### npm -`npm install --save @chart-it/react-d3` +`npm install --save @chart-io/react-d3` #### yarn -`yarn add @chart-it/react-d3` +`yarn add @chart-io/react-d3` # Getting Started -The best way to get started is to take a look at some of the examples in this Storybook https://ipwright83.github.io/chart-it/?path=/docs/getting-started--docs. - +The best way to get started is to take a look at some of the examples in this Storybook https://ipwright83.github.io/chart-io/?path=/docs/getting-started--docs. Here is an example of a very basic Scatter chart @@ -36,13 +35,13 @@ Here is an example of a very basic Scatter chart Clone the project ```bash - git clone https://github.com/IPWright83/chart-it + git clone https://github.com/IPWright83/chart-io ``` Go to the project directory ```bash - cd chart-it + cd chart-io ``` Install dependencies @@ -59,6 +58,6 @@ Start the storybook server ## FAQ -#### Is @chart-it/react-d3 free to use? +#### Is @chart-io/react-d3 free to use? -@chart-it/react-d3 is free to use and the aim is that it will always be free in open source/non-commercial projects. There may be costs for commercial use in the future, purely to help support the development and improvement of @chart-it/react-d3. +@chart-io/react-d3 is free to use and the aim is that it will always be free in open source/non-commercial projects. There may be costs for commercial use in the future, purely to help support the development and improvement of @chart-io/react-d3. diff --git a/demos/react-demo/CHANGELOG.md b/demos/react-demo/CHANGELOG.md index ee4ec380..0ae8ee90 100644 --- a/demos/react-demo/CHANGELOG.md +++ b/demos/react-demo/CHANGELOG.md @@ -5,18 +5,18 @@ ### Patch Changes - Updated dependencies [aa0b805] - - @chart-it/react-d3@0.11.0 + - @chart-io/react-d3@0.11.0 ## 0.1.2 ### Patch Changes - Updated dependencies [29b2703] - - @chart-it/react-d3@0.10.0 + - @chart-io/react-d3@0.10.0 ## 0.1.1 ### Patch Changes - Updated dependencies [3254c1e] - - @chart-it/react-d3@0.9.0 + - @chart-io/react-d3@0.9.0 diff --git a/demos/react-demo/jest.config.js b/demos/react-demo/jest.config.js index 09f9472b..3cd9d53f 100644 --- a/demos/react-demo/jest.config.js +++ b/demos/react-demo/jest.config.js @@ -8,7 +8,7 @@ module.exports = { roots: ["/src"], testEnvironment: "jsdom", testMatch: ["**/*.unit.jsx", "**/*.unit.tsx"], - transformIgnorePatterns: ["/node_modules/(?!@chart-it/d3/.*)"], + transformIgnorePatterns: ["/node_modules/(?!@chart-io/d3/.*)"], transform: { "^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": ["@swc/jest"], }, diff --git a/demos/react-demo/package.json b/demos/react-demo/package.json index 1ad64f50..8520986f 100644 --- a/demos/react-demo/package.json +++ b/demos/react-demo/package.json @@ -3,7 +3,7 @@ "version": "0.1.3", "private": true, "dependencies": { - "@chart-it/react": "workspace:*", + "@chart-io/react": "workspace:*", "@swc/core": "^1.3.36", "@swc/jest": "^0.2.24", "@testing-library/jest-dom": "^5.16.5", diff --git a/demos/react-demo/src/App.jsx b/demos/react-demo/src/App.jsx index a60113cd..d765fd17 100644 --- a/demos/react-demo/src/App.jsx +++ b/demos/react-demo/src/App.jsx @@ -1,5 +1,5 @@ import React from "react"; -import { XYChart, XAxis, YAxis, Scatter } from "@chart-it/react"; +import { XYChart, XAxis, YAxis, Scatter } from "@chart-io/react"; import "./App.css"; diff --git a/demos/react-demo/src/__snapshots__/App.unit.jsx.snap b/demos/react-demo/src/__snapshots__/App.unit.jsx.snap index 1e01fefc..20baa24a 100644 --- a/demos/react-demo/src/__snapshots__/App.unit.jsx.snap +++ b/demos/react-demo/src/__snapshots__/App.unit.jsx.snap @@ -18,7 +18,7 @@ exports[`renders learn react link 1`] = ` class="g-event-receiver" > /node_modules/(?!@chart-it/d3/.*)"], + transformIgnorePatterns: ["/node_modules/(?!@chart-io/d3/.*)"], transform: { "^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": ["@swc/jest"], }, diff --git a/packages/detection/package.json b/packages/detection/package.json index 21ec8e3e..e5ecf5c6 100644 --- a/packages/detection/package.json +++ b/packages/detection/package.json @@ -1,10 +1,10 @@ { - "name": "@chart-it/detection", + "name": "@chart-io/detection", "version": "0.7.0", "private": true, "packageManager": "pnpm@7.26.2", - "description": "Provides data type detection utilities for @chart-it", - "repository": "git@github.com:IPWright83/chart-it.git", + "description": "Provides data type detection utilities for @chart-io", + "repository": "git@github.com:IPWright83/chart-io.git", "author": "\"Ian Wright\" <\"ipwright83+dev@gmail.com\">", "main": "src/index.ts", "module": "src/index.ts", @@ -30,8 +30,8 @@ ], "dependencies": {}, "devDependencies": { - "@chart-it/d3": "workspace:*", - "@chart-it/types": "workspace:*", + "@chart-io/d3": "workspace:*", + "@chart-io/types": "workspace:*", "@swc/core": "^1.3.36", "@swc/jest": "^0.2.24", "@testing-library/jest-dom": "^5.16.4", diff --git a/packages/detection/src/getInfos/getColumnInfos.ts b/packages/detection/src/getInfos/getColumnInfos.ts index 17690d76..2e8635c1 100644 --- a/packages/detection/src/getInfos/getColumnInfos.ts +++ b/packages/detection/src/getInfos/getColumnInfos.ts @@ -1,4 +1,4 @@ -import type { IData } from "@chart-it/types"; +import type { IData } from "@chart-io/types"; import { getDataCardinality } from "./getDataCardinality"; import { getDataPointCount } from "./getDataPointCount"; diff --git a/packages/detection/src/getInfos/getTypeSpecificColumnInfo.ts b/packages/detection/src/getInfos/getTypeSpecificColumnInfo.ts index b578ceb3..90717d9a 100644 --- a/packages/detection/src/getInfos/getTypeSpecificColumnInfo.ts +++ b/packages/detection/src/getInfos/getTypeSpecificColumnInfo.ts @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import { getMaxStringLength } from "./getMaxStringLength"; import type { IColumnInfo } from "../types"; diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index f52f5fd1..6b4c7284 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,4 +1,4 @@ -# @chart-it/react-d3 +# @chart-io/react-d3 ## 0.30.0 @@ -94,9 +94,9 @@ ### Patch Changes - Updated dependencies [feddec9] - - @chart-it/d3@0.2.0 - - @chart-it/detection@0.5.0 - - @chart-it/types@0.5.0 + - @chart-io/d3@0.2.0 + - @chart-io/detection@0.5.0 + - @chart-io/types@0.5.0 ## 0.15.0 @@ -131,7 +131,7 @@ ### Patch Changes - Updated dependencies [a6cc33a] - - @chart-it/detection@0.4.0 + - @chart-io/detection@0.4.0 ## 0.11.0 @@ -142,7 +142,7 @@ ### Patch Changes - Updated dependencies [aa0b805] - - @chart-it/detection@0.3.0 + - @chart-io/detection@0.3.0 ## 0.10.0 @@ -165,7 +165,7 @@ ### Patch Changes - Updated dependencies [bc7e7f3] - - @chart-it/detection@0.2.0 + - @chart-io/detection@0.2.0 ## 0.7.0 @@ -210,4 +210,4 @@ - c2ccdd1: Test - Updated dependencies [c2ccdd1] - - @chart-it/detection@0.1.33 + - @chart-io/detection@0.1.33 diff --git a/packages/react/jest.config.js b/packages/react/jest.config.js index 82ff2ebc..9a186c12 100644 --- a/packages/react/jest.config.js +++ b/packages/react/jest.config.js @@ -23,7 +23,7 @@ module.exports = { setupFilesAfterEnv: ["/src/jest/setupTests.js"], testEnvironment: "jsdom", testMatch: ["**/*.unit.js", "**/*.unit.jsx", "**/*.unit.ts", "**/*.unit.tsx"], - transformIgnorePatterns: ["/node_modules/.pnpm/(?!(@chart-it)@)"], + transformIgnorePatterns: ["/node_modules/.pnpm/(?!(@chart-io)@)"], transform: { "^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": ["@swc/jest"], "^.+\\.css$": "/src/jest/cssTransform.js", diff --git a/packages/react/package.json b/packages/react/package.json index 4266aa1b..4464bcd3 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,15 +1,15 @@ { - "name": "@chart-it/react", + "name": "@chart-io/react", "private": false, "version": "0.30.0", "packageManager": "pnpm@7.26.2", - "description": "@chart-it is a react-d3 charting library", - "repository": "git@github.com:IPWright83/chart-it.git", + "description": "@chart-io is a react-d3 charting library", + "repository": "git@github.com:IPWright83/chart-io.git", "author": "\"Ian Wright\" <\"ipwright83+dev@gmail.com\">", "main": "dist/index.umd.js", "module": "dist/index.es.js", "types": "dist/index.d.ts", - "homepage": "https://github.com/IPWright83/chart-it", + "homepage": "https://github.com/IPWright83/chart-io", "scripts": { "test": "jest --config jest.config.js", "test:coverage": "jest --config jest.config.js --coverage", @@ -43,9 +43,9 @@ "@babel/plugin-transform-react-jsx": "^7.18.6", "@babel/preset-env": "^7.18.9", "@babel/preset-react": "^7.18.6", - "@chart-it/d3": "workspace:*", - "@chart-it/detection": "workspace:*", - "@chart-it/types": "workspace:*", + "@chart-io/d3": "workspace:*", + "@chart-io/detection": "workspace:*", + "@chart-io/types": "workspace:*", "@storybook/addon-actions": "^7.0.0-beta.54", "@storybook/addon-docs": "^7.0.0-beta.54", "@storybook/addon-essentials": "^7.0.0-beta.54", diff --git a/packages/react/src/data/example_dataset.js b/packages/react/src/data/example_dataset.js index f74f6720..e21b5c79 100644 --- a/packages/react/src/data/example_dataset.js +++ b/packages/react/src/data/example_dataset.js @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; const example = [ { diff --git a/packages/react/src/lib/components/Axis/Axis/Axis.tsx b/packages/react/src/lib/components/Axis/Axis/Axis.tsx index 6596ac42..7c1b0008 100644 --- a/packages/react/src/lib/components/Axis/Axis/Axis.tsx +++ b/packages/react/src/lib/components/Axis/Axis/Axis.tsx @@ -1,6 +1,6 @@ -import * as d3 from "@chart-it/d3"; -import type { AxisDomain, AxisScale } from "@chart-it/d3"; -import type { IPosition } from "@chart-it/types"; +import * as d3 from "@chart-io/d3"; +import type { AxisDomain, AxisScale } from "@chart-io/d3"; +import type { IPosition } from "@chart-io/types"; import React, { useEffect, useRef } from "react"; import { useSelector } from "react-redux"; @@ -131,7 +131,7 @@ export function Axis({ {showGridlines ? ( ) : null} - + ); diff --git a/packages/react/src/lib/components/Axis/Axis/Axis.unit.tsx b/packages/react/src/lib/components/Axis/Axis/Axis.unit.tsx index fe1ee0eb..1e6685a3 100644 --- a/packages/react/src/lib/components/Axis/Axis/Axis.unit.tsx +++ b/packages/react/src/lib/components/Axis/Axis/Axis.unit.tsx @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import { Provider } from "react-redux"; import React from "react"; import { render } from "@testing-library/react"; diff --git a/packages/react/src/lib/components/Axis/Axis/AxisCustomisations.stories.tsx b/packages/react/src/lib/components/Axis/Axis/AxisCustomisations.stories.tsx index 11e1e11e..583dfb0f 100644 --- a/packages/react/src/lib/components/Axis/Axis/AxisCustomisations.stories.tsx +++ b/packages/react/src/lib/components/Axis/Axis/AxisCustomisations.stories.tsx @@ -1,5 +1,5 @@ -import * as d3 from "@chart-it/d3"; -import type { AxisScale, AxisDomain } from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; +import type { AxisScale, AxisDomain } from "@chart-io/d3"; import React, { useRef, useEffect } from "react"; import { useSelector } from "react-redux"; diff --git a/packages/react/src/lib/components/Axis/Axis/Gridlines/Gridlines.tsx b/packages/react/src/lib/components/Axis/Axis/Gridlines/Gridlines.tsx index 3d34eb92..e844a163 100644 --- a/packages/react/src/lib/components/Axis/Axis/Gridlines/Gridlines.tsx +++ b/packages/react/src/lib/components/Axis/Axis/Gridlines/Gridlines.tsx @@ -1,6 +1,6 @@ -import * as d3 from "@chart-it/d3"; -import type { AxisDomain, AxisScale } from "@chart-it/d3"; -import type { IPosition, IScale } from "@chart-it/types"; +import * as d3 from "@chart-io/d3"; +import type { AxisDomain, AxisScale } from "@chart-io/d3"; +import type { IPosition, IScale } from "@chart-io/types"; import { useEffect } from "react"; import { useSelector } from "react-redux"; diff --git a/packages/react/src/lib/components/Axis/Axis/Gridlines/Gridlines.unit.tsx b/packages/react/src/lib/components/Axis/Axis/Gridlines/Gridlines.unit.tsx index 9be757fd..3c8bf943 100644 --- a/packages/react/src/lib/components/Axis/Axis/Gridlines/Gridlines.unit.tsx +++ b/packages/react/src/lib/components/Axis/Axis/Gridlines/Gridlines.unit.tsx @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import { Provider } from "react-redux"; import React from "react"; import { render } from "@testing-library/react"; diff --git a/packages/react/src/lib/components/Axis/Axis/Gridlines/getTickSize.ts b/packages/react/src/lib/components/Axis/Axis/Gridlines/getTickSize.ts index 08c2a51e..f9c0b881 100644 --- a/packages/react/src/lib/components/Axis/Axis/Gridlines/getTickSize.ts +++ b/packages/react/src/lib/components/Axis/Axis/Gridlines/getTickSize.ts @@ -1,4 +1,4 @@ -import type { IPosition } from "@chart-it/types"; +import type { IPosition } from "@chart-io/types"; import { logAndThrowError } from "../../../../utils"; diff --git a/packages/react/src/lib/components/Axis/Axis/Title/Title.tsx b/packages/react/src/lib/components/Axis/Axis/Title/Title.tsx index 01a0f6c2..e00bde12 100644 --- a/packages/react/src/lib/components/Axis/Axis/Title/Title.tsx +++ b/packages/react/src/lib/components/Axis/Axis/Title/Title.tsx @@ -1,4 +1,4 @@ -import type { IPosition } from "@chart-it/types"; +import type { IPosition } from "@chart-io/types"; import React from "react"; import { useSelector } from "react-redux"; @@ -35,7 +35,7 @@ export function Title({ position, title }: ITitleProps) { }; return ( - + {title} ); diff --git a/packages/react/src/lib/components/Axis/Axis/Title/__snapshots__/Title.unit.tsx.snap b/packages/react/src/lib/components/Axis/Axis/Title/__snapshots__/Title.unit.tsx.snap index df72ea71..f95b2a55 100644 --- a/packages/react/src/lib/components/Axis/Axis/Title/__snapshots__/Title.unit.tsx.snap +++ b/packages/react/src/lib/components/Axis/Axis/Title/__snapshots__/Title.unit.tsx.snap @@ -10,7 +10,7 @@ exports[`Title component with title set renders horizontal title 1`] = ` @@ -24,7 +24,7 @@ exports[`Title component with title set renders vertical title 1`] = ` diff --git a/packages/react/src/lib/components/Axis/Axis/Title/getTransform.ts b/packages/react/src/lib/components/Axis/Axis/Title/getTransform.ts index 0357a9b9..3d54f2a1 100644 --- a/packages/react/src/lib/components/Axis/Axis/Title/getTransform.ts +++ b/packages/react/src/lib/components/Axis/Axis/Title/getTransform.ts @@ -1,4 +1,4 @@ -import type { IMargin, IPosition } from "@chart-it/types"; +import type { IMargin, IPosition } from "@chart-io/types"; import { logAndThrowError } from "../../../../utils"; diff --git a/packages/react/src/lib/components/Axis/Axis/__snapshots__/Axis.unit.tsx.snap b/packages/react/src/lib/components/Axis/Axis/__snapshots__/Axis.unit.tsx.snap index b71d819d..e70567f5 100644 --- a/packages/react/src/lib/components/Axis/Axis/__snapshots__/Axis.unit.tsx.snap +++ b/packages/react/src/lib/components/Axis/Axis/__snapshots__/Axis.unit.tsx.snap @@ -7,7 +7,7 @@ exports[`Axis component renders a bottom axis 1`] = ` class="g-axis" > @@ -17,7 +17,7 @@ exports[`Axis component renders a bottom axis 1`] = ` transform="translate(10, 0)" > @@ -217,7 +217,7 @@ exports[`Axis component renders a left axis 1`] = ` transform="translate(10, 0)" > @@ -417,7 +417,7 @@ exports[`Axis component renders a right axis 1`] = ` transform="translate(980, 0)" > @@ -617,7 +617,7 @@ exports[`Axis component renders a top axis 1`] = ` transform="translate(0, 30)" > ; + return ; } diff --git a/packages/react/src/lib/components/EventReceiver/__snapshots__/EventReceiver.unit.tsx.snap b/packages/react/src/lib/components/EventReceiver/__snapshots__/EventReceiver.unit.tsx.snap index 2aad601b..7bec8d56 100644 --- a/packages/react/src/lib/components/EventReceiver/__snapshots__/EventReceiver.unit.tsx.snap +++ b/packages/react/src/lib/components/EventReceiver/__snapshots__/EventReceiver.unit.tsx.snap @@ -7,7 +7,7 @@ exports[`EventReceiver should render correctly 1`] = ` class="g-event-receiver" > +
{items.map((item, index) => { /** * A format is of the shape: diff --git a/packages/react/src/lib/components/LegendOverlay/Legend/Legend.unit.tsx b/packages/react/src/lib/components/LegendOverlay/Legend/Legend.unit.tsx index bad6d841..a94aba47 100644 --- a/packages/react/src/lib/components/LegendOverlay/Legend/Legend.unit.tsx +++ b/packages/react/src/lib/components/LegendOverlay/Legend/Legend.unit.tsx @@ -1,4 +1,4 @@ -import type { IColor } from "@chart-it/types"; +import type { IColor } from "@chart-io/types"; import { Provider } from "react-redux"; import React from "react"; import { render } from "@testing-library/react"; diff --git a/packages/react/src/lib/components/LegendOverlay/Legend/LegendItem/LegendItem.tsx b/packages/react/src/lib/components/LegendOverlay/Legend/LegendItem/LegendItem.tsx index a8bc61d2..98f2a25c 100644 --- a/packages/react/src/lib/components/LegendOverlay/Legend/LegendItem/LegendItem.tsx +++ b/packages/react/src/lib/components/LegendOverlay/Legend/LegendItem/LegendItem.tsx @@ -1,4 +1,4 @@ -import type { ILegendFormatter, ILegendItem } from "@chart-it/types"; +import type { ILegendFormatter, ILegendItem } from "@chart-io/types"; import React from "react"; import { useSelector } from "react-redux"; @@ -50,10 +50,10 @@ export function LegendItem({ name, icon, color, format = (name) => name }: ILege }; return ( -
+
{Shape && } -
- +
+ {format(name)}
diff --git a/packages/react/src/lib/components/LegendOverlay/Legend/LegendItem/__snapshots__/LegendItem.unit.tsx.snap b/packages/react/src/lib/components/LegendOverlay/Legend/LegendItem/__snapshots__/LegendItem.unit.tsx.snap index 66dcb515..8f98d5b8 100644 --- a/packages/react/src/lib/components/LegendOverlay/Legend/LegendItem/__snapshots__/LegendItem.unit.tsx.snap +++ b/packages/react/src/lib/components/LegendOverlay/Legend/LegendItem/__snapshots__/LegendItem.unit.tsx.snap @@ -3,19 +3,19 @@ exports[`LegendItem should render correctly 1`] = `
Series1 diff --git a/packages/react/src/lib/components/LegendOverlay/Legend/__snapshots__/Legend.unit.tsx.snap b/packages/react/src/lib/components/LegendOverlay/Legend/__snapshots__/Legend.unit.tsx.snap index 7cb2e9d6..8b4d7c56 100644 --- a/packages/react/src/lib/components/LegendOverlay/Legend/__snapshots__/Legend.unit.tsx.snap +++ b/packages/react/src/lib/components/LegendOverlay/Legend/__snapshots__/Legend.unit.tsx.snap @@ -3,23 +3,23 @@ exports[`Legend should render correctly 1`] = `
a @@ -27,19 +27,19 @@ exports[`Legend should render correctly 1`] = `
b @@ -47,19 +47,19 @@ exports[`Legend should render correctly 1`] = `
c diff --git a/packages/react/src/lib/components/LegendOverlay/LegendOverlay.tsx b/packages/react/src/lib/components/LegendOverlay/LegendOverlay.tsx index 3fce3b42..62fb6552 100644 --- a/packages/react/src/lib/components/LegendOverlay/LegendOverlay.tsx +++ b/packages/react/src/lib/components/LegendOverlay/LegendOverlay.tsx @@ -1,4 +1,4 @@ -import type { ILegendFormatter } from "@chart-it/types"; +import type { ILegendFormatter } from "@chart-io/types"; import React from "react"; import { useSelector } from "react-redux"; diff --git a/packages/react/src/lib/components/LegendOverlay/__snapshots__/LegendOverlay.unit.tsx.snap b/packages/react/src/lib/components/LegendOverlay/__snapshots__/LegendOverlay.unit.tsx.snap index c48d1d38..6e6b990e 100644 --- a/packages/react/src/lib/components/LegendOverlay/__snapshots__/LegendOverlay.unit.tsx.snap +++ b/packages/react/src/lib/components/LegendOverlay/__snapshots__/LegendOverlay.unit.tsx.snap @@ -12,23 +12,23 @@ exports[`LegendOverlay should render a horizontal alignment correctly 1`] = ` width="0" >
a @@ -36,19 +36,19 @@ exports[`LegendOverlay should render a horizontal alignment correctly 1`] = `
b @@ -74,23 +74,23 @@ exports[`LegendOverlay should render a vertical alignment correctly 1`] = ` width="0" >
a @@ -98,19 +98,19 @@ exports[`LegendOverlay should render a vertical alignment correctly 1`] = `
b diff --git a/packages/react/src/lib/components/Markers/Markers.tsx b/packages/react/src/lib/components/Markers/Markers.tsx index fde1e9ac..715203d0 100644 --- a/packages/react/src/lib/components/Markers/Markers.tsx +++ b/packages/react/src/lib/components/Markers/Markers.tsx @@ -1,5 +1,5 @@ -import * as d3 from "@chart-it/d3"; -import type { IMarker } from "@chart-it/types"; +import * as d3 from "@chart-io/d3"; +import type { IMarker } from "@chart-io/types"; import { useEffect } from "react"; import { useSelector } from "react-redux"; @@ -37,7 +37,7 @@ export function Markers({ layer }: IMarkersBaseProps) { const enter = join .enter() .append("circle") - .attr("class", "chart-it marker") + .attr("class", "chart-io marker") .attr("pointer-events", "none") .style("stroke", (d) => `${d.stroke ?? theme.markers.stroke}`) .style("stroke-width", theme.markers.strokeWidth) diff --git a/packages/react/src/lib/components/Markers/__snapshots__/Markers.unit.tsx.snap b/packages/react/src/lib/components/Markers/__snapshots__/Markers.unit.tsx.snap index 9b1be18d..c6f41aa6 100644 --- a/packages/react/src/lib/components/Markers/__snapshots__/Markers.unit.tsx.snap +++ b/packages/react/src/lib/components/Markers/__snapshots__/Markers.unit.tsx.snap @@ -7,7 +7,7 @@ exports[`Markers should render correctly 1`] = ` class="g-markers" > The reason for the manual calculation is Bar & Column plots typically need to use a [scaleBand](https://github.com/d3/d3-scale#band-scales). These scales aren't as powerful for plotting continuous data such as time, but they do provide the nice functions for padding/width of bars. So instead these are manually derived from the data. diff --git a/packages/react/src/lib/components/Plots/Scatter/Scatter/Scatter.unit.tsx b/packages/react/src/lib/components/Plots/Scatter/Scatter/Scatter.unit.tsx index eb4c5733..e1240231 100644 --- a/packages/react/src/lib/components/Plots/Scatter/Scatter/Scatter.unit.tsx +++ b/packages/react/src/lib/components/Plots/Scatter/Scatter/Scatter.unit.tsx @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import React from "react"; import { toMatchImageSnapshot } from "jest-image-snapshot"; diff --git a/packages/react/src/lib/components/Plots/Scatter/Scatter/ScatterBase.tsx b/packages/react/src/lib/components/Plots/Scatter/Scatter/ScatterBase.tsx index f0edb275..ecb89ee5 100644 --- a/packages/react/src/lib/components/Plots/Scatter/Scatter/ScatterBase.tsx +++ b/packages/react/src/lib/components/Plots/Scatter/Scatter/ScatterBase.tsx @@ -1,6 +1,6 @@ -import * as d3 from "@chart-it/d3"; -import { IColor, IDatum, IEventPlotProps, INumericValue } from "@chart-it/types"; -import type { Selection, Transition } from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; +import { IColor, IDatum, IEventPlotProps, INumericValue } from "@chart-io/types"; +import type { Selection, Transition } from "@chart-io/d3"; import { useSelector, useStore } from "react-redux"; import { useFocused } from "./useFocused"; diff --git a/packages/react/src/lib/components/Plots/Scatter/Scatter/useFocused.ts b/packages/react/src/lib/components/Plots/Scatter/Scatter/useFocused.ts index 3321cea0..98e77195 100644 --- a/packages/react/src/lib/components/Plots/Scatter/Scatter/useFocused.ts +++ b/packages/react/src/lib/components/Plots/Scatter/Scatter/useFocused.ts @@ -1,5 +1,5 @@ -import * as d3 from "@chart-it/d3"; -import { IColor, IScale } from "@chart-it/types"; +import * as d3 from "@chart-io/d3"; +import { IColor, IScale } from "@chart-io/types"; import { useEffect, useState } from "react"; import { eventActions, IDispatch } from "../../../../store"; diff --git a/packages/react/src/lib/components/Plots/Scatter/Scatter/useTooltip.ts b/packages/react/src/lib/components/Plots/Scatter/Scatter/useTooltip.ts index ea6ed81d..0031e377 100644 --- a/packages/react/src/lib/components/Plots/Scatter/Scatter/useTooltip.ts +++ b/packages/react/src/lib/components/Plots/Scatter/Scatter/useTooltip.ts @@ -1,4 +1,4 @@ -import { IColor, IDatum, IMouseEvent } from "@chart-it/types"; +import { IColor, IDatum, IMouseEvent } from "@chart-io/types"; import { useEffect, useState } from "react"; import { eventActions, IDispatch } from "../../../../store"; diff --git a/packages/react/src/lib/components/Plots/Scatter/Scatters.tsx b/packages/react/src/lib/components/Plots/Scatter/Scatters.tsx index 1664399c..426fdbab 100644 --- a/packages/react/src/lib/components/Plots/Scatter/Scatters.tsx +++ b/packages/react/src/lib/components/Plots/Scatter/Scatters.tsx @@ -1,4 +1,4 @@ -import type { IPlotsProps } from "@chart-it/types"; +import type { IPlotsProps } from "@chart-io/types"; import React from "react"; import { useSelector } from "react-redux"; diff --git a/packages/react/src/lib/components/Plots/Scatter/Scatters.unit.tsx b/packages/react/src/lib/components/Plots/Scatter/Scatters.unit.tsx index 32452a02..5f0fa0eb 100644 --- a/packages/react/src/lib/components/Plots/Scatter/Scatters.unit.tsx +++ b/packages/react/src/lib/components/Plots/Scatter/Scatters.unit.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { scaleLinear } from "@chart-it/d3"; +import { scaleLinear } from "@chart-io/d3"; import { toMatchImageSnapshot } from "jest-image-snapshot"; import { VIRTUAL_CANVAS_DEBOUNCE, VirtualCanvas } from "../../VirtualCanvas"; diff --git a/packages/react/src/lib/components/Plots/renderCanvas.ts b/packages/react/src/lib/components/Plots/renderCanvas.ts index 59c81eb4..0af7165f 100644 --- a/packages/react/src/lib/components/Plots/renderCanvas.ts +++ b/packages/react/src/lib/components/Plots/renderCanvas.ts @@ -1,4 +1,4 @@ -import type { Transition } from "@chart-it/d3"; +import type { Transition } from "@chart-io/d3"; import { canvasRenderLoop, progressiveCanvasRenderLoop } from "../../hoc/canvas"; import { PROGRESSIVE_RENDER_THRESHOLD } from "../../constants"; diff --git a/packages/react/src/lib/components/Scale/AutoScale.tsx b/packages/react/src/lib/components/Scale/AutoScale.tsx index 33532a10..582b5a60 100644 --- a/packages/react/src/lib/components/Scale/AutoScale.tsx +++ b/packages/react/src/lib/components/Scale/AutoScale.tsx @@ -1,4 +1,4 @@ -import type { IScaleType, IValue } from "@chart-it/types"; +import type { IScaleType, IValue } from "@chart-io/types"; import React, { useMemo } from "react"; import { useSelector, useStore } from "react-redux"; diff --git a/packages/react/src/lib/components/Scale/Scale.tsx b/packages/react/src/lib/components/Scale/Scale.tsx index 0cda32c3..ddb818d8 100644 --- a/packages/react/src/lib/components/Scale/Scale.tsx +++ b/packages/react/src/lib/components/Scale/Scale.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import type { IScale } from "@chart-it/types"; +import type { IScale } from "@chart-io/types"; import { useStore } from "react-redux"; import { chartActions } from "../../store"; diff --git a/packages/react/src/lib/components/Scale/calculateScale.ts b/packages/react/src/lib/components/Scale/calculateScale.ts index f384650c..a87d83c0 100644 --- a/packages/react/src/lib/components/Scale/calculateScale.ts +++ b/packages/react/src/lib/components/Scale/calculateScale.ts @@ -1,8 +1,8 @@ -import * as d3 from "@chart-it/d3"; -import type { IData, IScale, IScaleType, IValue } from "@chart-it/types"; -import type { NumberValue } from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; +import type { IData, IScale, IScaleType, IValue } from "@chart-io/types"; +import type { NumberValue } from "@chart-io/d3"; -import { getDataType, Type, typeEnumToName } from "@chart-it/detection"; +import { getDataType, Type, typeEnumToName } from "@chart-io/detection"; import { logAndThrowError, logDebug } from "../../utils"; /** diff --git a/packages/react/src/lib/components/Shapes/Circle/Circle.tsx b/packages/react/src/lib/components/Shapes/Circle/Circle.tsx index ab1245d8..4b2b5a15 100644 --- a/packages/react/src/lib/components/Shapes/Circle/Circle.tsx +++ b/packages/react/src/lib/components/Shapes/Circle/Circle.tsx @@ -1,4 +1,4 @@ -import type { IColor } from "@chart-it/types"; +import type { IColor } from "@chart-io/types"; import React from "react"; export interface ICircleProps { @@ -20,5 +20,5 @@ export function Circle({ fill }: ICircleProps) { flexShrink: 0, }; - return
; + return
; } diff --git a/packages/react/src/lib/components/Shapes/Circle/__snapshots__/Circle.unit.tsx.snap b/packages/react/src/lib/components/Shapes/Circle/__snapshots__/Circle.unit.tsx.snap index f044961f..06dd350f 100644 --- a/packages/react/src/lib/components/Shapes/Circle/__snapshots__/Circle.unit.tsx.snap +++ b/packages/react/src/lib/components/Shapes/Circle/__snapshots__/Circle.unit.tsx.snap @@ -3,7 +3,7 @@ exports[`Circle renders correctly 1`] = `
diff --git a/packages/react/src/lib/components/Shapes/Line/Line.tsx b/packages/react/src/lib/components/Shapes/Line/Line.tsx index 5fbe34ad..d25e5e80 100644 --- a/packages/react/src/lib/components/Shapes/Line/Line.tsx +++ b/packages/react/src/lib/components/Shapes/Line/Line.tsx @@ -1,4 +1,4 @@ -import type { IColor } from "@chart-it/types"; +import type { IColor } from "@chart-io/types"; import React from "react"; export interface ILineProps { @@ -19,5 +19,5 @@ export function Line({ fill }: ILineProps) { flexShrink: 0, }; - return
; + return
; } diff --git a/packages/react/src/lib/components/Shapes/Line/__snapshots__/Line.unit.tsx.snap b/packages/react/src/lib/components/Shapes/Line/__snapshots__/Line.unit.tsx.snap index e7b60b58..e396ceb1 100644 --- a/packages/react/src/lib/components/Shapes/Line/__snapshots__/Line.unit.tsx.snap +++ b/packages/react/src/lib/components/Shapes/Line/__snapshots__/Line.unit.tsx.snap @@ -3,7 +3,7 @@ exports[`Line renders correctly 1`] = `
diff --git a/packages/react/src/lib/components/Shapes/Square/Square.tsx b/packages/react/src/lib/components/Shapes/Square/Square.tsx index 6c593509..f0febb36 100644 --- a/packages/react/src/lib/components/Shapes/Square/Square.tsx +++ b/packages/react/src/lib/components/Shapes/Square/Square.tsx @@ -1,4 +1,4 @@ -import type { IColor } from "@chart-it/types"; +import type { IColor } from "@chart-io/types"; import React from "react"; export interface ISquareProps { @@ -19,5 +19,5 @@ export function Square({ fill }: ISquareProps) { flexShrink: 0, }; - return
; + return
; } diff --git a/packages/react/src/lib/components/Shapes/Square/__snapshots__/Square.unit.tsx.snap b/packages/react/src/lib/components/Shapes/Square/__snapshots__/Square.unit.tsx.snap index ef50b677..f7df33fa 100644 --- a/packages/react/src/lib/components/Shapes/Square/__snapshots__/Square.unit.tsx.snap +++ b/packages/react/src/lib/components/Shapes/Square/__snapshots__/Square.unit.tsx.snap @@ -3,7 +3,7 @@ exports[`Square renders correctly 1`] = `
diff --git a/packages/react/src/lib/components/Shapes/getShape.ts b/packages/react/src/lib/components/Shapes/getShape.ts index c13a5a25..43503623 100644 --- a/packages/react/src/lib/components/Shapes/getShape.ts +++ b/packages/react/src/lib/components/Shapes/getShape.ts @@ -1,4 +1,4 @@ -import type { IShape } from "@chart-it/types"; +import type { IShape } from "@chart-io/types"; import { Circle } from "./Circle"; import { Line } from "./Line"; diff --git a/packages/react/src/lib/components/TooltipOverlay/Tooltip/Tooltip.tsx b/packages/react/src/lib/components/TooltipOverlay/Tooltip/Tooltip.tsx index b838f45c..f95c8a6a 100644 --- a/packages/react/src/lib/components/TooltipOverlay/Tooltip/Tooltip.tsx +++ b/packages/react/src/lib/components/TooltipOverlay/Tooltip/Tooltip.tsx @@ -1,4 +1,4 @@ -import type { ITooltipFormatter, ITooltipItem } from "@chart-it/types"; +import type { ITooltipFormatter, ITooltipItem } from "@chart-io/types"; import React from "react"; import { useSelector } from "react-redux"; @@ -48,7 +48,7 @@ export function Tooltip({ borderColor, items, positionStyle, formatters = {} }: } return ( -
+
{items.map((item) => { /** * A format is of the shape: diff --git a/packages/react/src/lib/components/TooltipOverlay/Tooltip/Tooltip.unit.tsx b/packages/react/src/lib/components/TooltipOverlay/Tooltip/Tooltip.unit.tsx index 64910217..c402bd3e 100644 --- a/packages/react/src/lib/components/TooltipOverlay/Tooltip/Tooltip.unit.tsx +++ b/packages/react/src/lib/components/TooltipOverlay/Tooltip/Tooltip.unit.tsx @@ -1,4 +1,4 @@ -import type { IColor } from "@chart-it/types"; +import type { IColor } from "@chart-io/types"; import { Provider } from "react-redux"; import React from "react"; import { render } from "@testing-library/react"; diff --git a/packages/react/src/lib/components/TooltipOverlay/Tooltip/TooltipItem/TooltipItem.tsx b/packages/react/src/lib/components/TooltipOverlay/Tooltip/TooltipItem/TooltipItem.tsx index 616b4b5f..33a4bd1c 100644 --- a/packages/react/src/lib/components/TooltipOverlay/Tooltip/TooltipItem/TooltipItem.tsx +++ b/packages/react/src/lib/components/TooltipOverlay/Tooltip/TooltipItem/TooltipItem.tsx @@ -1,4 +1,4 @@ -import type { ITooltipFormatter, ITooltipItem } from "@chart-it/types"; +import type { ITooltipFormatter, ITooltipItem } from "@chart-io/types"; import React from "react"; import { useSelector } from "react-redux"; @@ -49,13 +49,13 @@ export function TooltipItem({ name, value, icon, fill, prefix, suffix, format = }; return ( -
+
{Shape && } -
- +
+ {name}: - {formattedValue} + {formattedValue}
); diff --git a/packages/react/src/lib/components/TooltipOverlay/Tooltip/TooltipItem/__snapshots__/TooltipItem.unit.tsx.snap b/packages/react/src/lib/components/TooltipOverlay/Tooltip/TooltipItem/__snapshots__/TooltipItem.unit.tsx.snap index bce4c5fe..2d6735c6 100644 --- a/packages/react/src/lib/components/TooltipOverlay/Tooltip/TooltipItem/__snapshots__/TooltipItem.unit.tsx.snap +++ b/packages/react/src/lib/components/TooltipOverlay/Tooltip/TooltipItem/__snapshots__/TooltipItem.unit.tsx.snap @@ -3,25 +3,25 @@ exports[`TooltipItem should render correctly 1`] = `
Series1: 5 diff --git a/packages/react/src/lib/components/TooltipOverlay/Tooltip/__snapshots__/Tooltip.unit.tsx.snap b/packages/react/src/lib/components/TooltipOverlay/Tooltip/__snapshots__/Tooltip.unit.tsx.snap index dd025fe3..6a7e5887 100644 --- a/packages/react/src/lib/components/TooltipOverlay/Tooltip/__snapshots__/Tooltip.unit.tsx.snap +++ b/packages/react/src/lib/components/TooltipOverlay/Tooltip/__snapshots__/Tooltip.unit.tsx.snap @@ -3,79 +3,79 @@ exports[`Tooltip should render correctly 1`] = `
a: 3
b: 8
c: 15 diff --git a/packages/react/src/lib/components/TooltipOverlay/TooltipOverlay.tsx b/packages/react/src/lib/components/TooltipOverlay/TooltipOverlay.tsx index 62e202a3..1af8da4f 100644 --- a/packages/react/src/lib/components/TooltipOverlay/TooltipOverlay.tsx +++ b/packages/react/src/lib/components/TooltipOverlay/TooltipOverlay.tsx @@ -1,4 +1,4 @@ -import type { ITooltipFormatter } from "@chart-it/types"; +import type { ITooltipFormatter } from "@chart-io/types"; import React from "react"; import { useSelector } from "react-redux"; diff --git a/packages/react/src/lib/components/TooltipOverlay/__snapshots__/TooltipOverlay.unit.tsx.snap b/packages/react/src/lib/components/TooltipOverlay/__snapshots__/TooltipOverlay.unit.tsx.snap index 79c70efc..bccb06fc 100644 --- a/packages/react/src/lib/components/TooltipOverlay/__snapshots__/TooltipOverlay.unit.tsx.snap +++ b/packages/react/src/lib/components/TooltipOverlay/__snapshots__/TooltipOverlay.unit.tsx.snap @@ -10,54 +10,54 @@ exports[`TooltipOverlay should apply a custom offset correctly 1`] = ` style="width: 100%; height: 100%; pointer-events: none;" >
a: 3
b: 8 @@ -80,54 +80,54 @@ exports[`TooltipOverlay should render correctly 1`] = ` style="width: 100%; height: 100%; pointer-events: none;" >
a: 3
b: 8 diff --git a/packages/react/src/lib/components/TooltipOverlay/getTooltipPosition.ts b/packages/react/src/lib/components/TooltipOverlay/getTooltipPosition.ts index 4b5e0b46..ad097d54 100644 --- a/packages/react/src/lib/components/TooltipOverlay/getTooltipPosition.ts +++ b/packages/react/src/lib/components/TooltipOverlay/getTooltipPosition.ts @@ -1,4 +1,4 @@ -import type { ICoordinate } from "@chart-it/types"; +import type { ICoordinate } from "@chart-io/types"; /** * Returns a position for the tooltip from the moust event diff --git a/packages/react/src/lib/components/VirtualCanvas/getChildrenWithProps.ts b/packages/react/src/lib/components/VirtualCanvas/getChildrenWithProps.ts index 6ccee1fc..dcf56660 100644 --- a/packages/react/src/lib/components/VirtualCanvas/getChildrenWithProps.ts +++ b/packages/react/src/lib/components/VirtualCanvas/getChildrenWithProps.ts @@ -1,5 +1,5 @@ -import type { IOnClick, IOnMouseOut, IOnMouseOver } from "@chart-it/types"; -import type { Transition } from "@chart-it/d3"; +import type { IOnClick, IOnMouseOut, IOnMouseOver } from "@chart-io/types"; +import type { Transition } from "@chart-io/d3"; import { extendChildrenProps } from "../../utils"; diff --git a/packages/react/src/lib/components/XYChart/XYChart.tsx b/packages/react/src/lib/components/XYChart/XYChart.tsx index afea5e51..d9c06f61 100644 --- a/packages/react/src/lib/components/XYChart/XYChart.tsx +++ b/packages/react/src/lib/components/XYChart/XYChart.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { IMargin } from "@chart-it/types"; +import { IMargin } from "@chart-io/types"; import { Chart, IChartProps } from "../Chart"; import { Crosshair } from "../Crosshair"; diff --git a/packages/react/src/lib/components/XYChart/__snapshots__/XYChart.unit.tsx.snap b/packages/react/src/lib/components/XYChart/__snapshots__/XYChart.unit.tsx.snap index b42f1792..b64b2cd1 100644 --- a/packages/react/src/lib/components/XYChart/__snapshots__/XYChart.unit.tsx.snap +++ b/packages/react/src/lib/components/XYChart/__snapshots__/XYChart.unit.tsx.snap @@ -12,7 +12,7 @@ exports[`XYChart should create empty template correctly 1`] = ` class="g-event-receiver" > ; diff --git a/packages/react/src/lib/hoc/withXYPlot.tsx b/packages/react/src/lib/hoc/withXYPlot.tsx index d678de40..449510e1 100644 --- a/packages/react/src/lib/hoc/withXYPlot.tsx +++ b/packages/react/src/lib/hoc/withXYPlot.tsx @@ -1,5 +1,5 @@ /* eslint-disable react/prop-types */ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import React, { useEffect, useState } from "react"; import { useSelector } from "react-redux"; diff --git a/packages/react/src/lib/hooks/useLegendItem.ts b/packages/react/src/lib/hooks/useLegendItem.ts index 3b959bee..fbe0d7ab 100644 --- a/packages/react/src/lib/hooks/useLegendItem.ts +++ b/packages/react/src/lib/hooks/useLegendItem.ts @@ -1,4 +1,4 @@ -import type { IColor, IShape } from "@chart-it/types"; +import type { IColor, IShape } from "@chart-io/types"; import { useDispatch } from "react-redux"; import { useEffect } from "react"; diff --git a/packages/react/src/lib/hooks/useLegendItems.ts b/packages/react/src/lib/hooks/useLegendItems.ts index b4852d7a..7b6ef8e1 100644 --- a/packages/react/src/lib/hooks/useLegendItems.ts +++ b/packages/react/src/lib/hooks/useLegendItems.ts @@ -1,4 +1,4 @@ -import type { IColor, IShape } from "@chart-it/types"; +import type { IColor, IShape } from "@chart-io/types"; import { useEffect, useMemo } from "react"; import { useDispatch } from "react-redux"; diff --git a/packages/react/src/lib/store/chart/chartActions.ts b/packages/react/src/lib/store/chart/chartActions.ts index 2c0db071..1caafd8b 100644 --- a/packages/react/src/lib/store/chart/chartActions.ts +++ b/packages/react/src/lib/store/chart/chartActions.ts @@ -1,4 +1,4 @@ -import type { IData, ILegendItem, IMargin, IScale, ITheme } from "@chart-it/types"; +import type { IData, ILegendItem, IMargin, IScale, ITheme } from "@chart-io/types"; import type { AddLegendItemAction, diff --git a/packages/react/src/lib/store/chart/chartSelectors.ts b/packages/react/src/lib/store/chart/chartSelectors.ts index 54a68af1..21438066 100644 --- a/packages/react/src/lib/store/chart/chartSelectors.ts +++ b/packages/react/src/lib/store/chart/chartSelectors.ts @@ -1,4 +1,4 @@ -import type { IData, ILegendItem, IMargin, IScale, IScaleMode, ITheme } from "@chart-it/types"; +import type { IData, ILegendItem, IMargin, IScale, IScaleMode, ITheme } from "@chart-io/types"; import { memoize, memoizeWithArgs } from "proxy-memoize"; import type { diff --git a/packages/react/src/lib/store/chart/tests/__snapshots__/chartActions.unit.ts.snap b/packages/react/src/lib/store/chart/tests/__snapshots__/chartActions.unit.ts.snap index a93bf290..99ca4086 100644 --- a/packages/react/src/lib/store/chart/tests/__snapshots__/chartActions.unit.ts.snap +++ b/packages/react/src/lib/store/chart/tests/__snapshots__/chartActions.unit.ts.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`chartActions setDimensions warns with invalid margin 1`] = `"@chart-it/react encountered an warning. W005: The top of the margin was not specified and is required. You can read more about this https://ipwright83.github.io/chart-it/?path=/docs/errors-warnings-warnings-W005."`; +exports[`chartActions setDimensions warns with invalid margin 1`] = `"@chart-io/react encountered an warning. W005: The top of the margin was not specified and is required. You can read more about this https://ipwright83.github.io/chart-io/?path=/docs/errors-warnings-warnings-W005."`; -exports[`chartActions setDimensions warns with no margin 1`] = `"@chart-it/react encountered an warning. W004: A margin was not provided but is required. You can read more about this https://ipwright83.github.io/chart-it/?path=/docs/errors-warnings-warnings-W004."`; +exports[`chartActions setDimensions warns with no margin 1`] = `"@chart-io/react encountered an warning. W004: A margin was not provided but is required. You can read more about this https://ipwright83.github.io/chart-io/?path=/docs/errors-warnings-warnings-W004."`; diff --git a/packages/react/src/lib/store/chart/tests/chartActions.unit.ts b/packages/react/src/lib/store/chart/tests/chartActions.unit.ts index 30046268..03683e21 100644 --- a/packages/react/src/lib/store/chart/tests/chartActions.unit.ts +++ b/packages/react/src/lib/store/chart/tests/chartActions.unit.ts @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import { chartActions } from "../chartActions"; import { themes } from "../../../themes"; diff --git a/packages/react/src/lib/store/chart/tests/chartReducer.unit.ts b/packages/react/src/lib/store/chart/tests/chartReducer.unit.ts index bb664f74..ba6a8d27 100644 --- a/packages/react/src/lib/store/chart/tests/chartReducer.unit.ts +++ b/packages/react/src/lib/store/chart/tests/chartReducer.unit.ts @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import { themes } from "../../../themes"; diff --git a/packages/react/src/lib/store/chart/tests/chartSelectors.unit.ts b/packages/react/src/lib/store/chart/tests/chartSelectors.unit.ts index ff4a54a4..7131ed03 100644 --- a/packages/react/src/lib/store/chart/tests/chartSelectors.unit.ts +++ b/packages/react/src/lib/store/chart/tests/chartSelectors.unit.ts @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import { PROGRESSIVE_RENDER_THRESHOLD } from "../../../constants"; import { themes } from "../../../themes"; diff --git a/packages/react/src/lib/store/chart/types.ts b/packages/react/src/lib/store/chart/types.ts index b3561965..36f05804 100644 --- a/packages/react/src/lib/store/chart/types.ts +++ b/packages/react/src/lib/store/chart/types.ts @@ -1,4 +1,4 @@ -import type { IData, ILegendItem, IMargin, IScale, ITheme } from "@chart-it/types"; +import type { IData, ILegendItem, IMargin, IScale, ITheme } from "@chart-io/types"; export interface SetDimensionAction { type: "CHART.SET_DIMENSIONS"; diff --git a/packages/react/src/lib/store/event/eventActions.ts b/packages/react/src/lib/store/event/eventActions.ts index de998685..71487a19 100644 --- a/packages/react/src/lib/store/event/eventActions.ts +++ b/packages/react/src/lib/store/event/eventActions.ts @@ -1,4 +1,4 @@ -import type { IColor, IDropline, IMarker, IMouseEvent, ITooltipItem } from "@chart-it/types"; +import type { IColor, IDropline, IMarker, IMouseEvent, ITooltipItem } from "@chart-io/types"; import type { AddDroplineAction, diff --git a/packages/react/src/lib/store/event/eventSelectors.ts b/packages/react/src/lib/store/event/eventSelectors.ts index d5539dcd..7beac3a0 100644 --- a/packages/react/src/lib/store/event/eventSelectors.ts +++ b/packages/react/src/lib/store/event/eventSelectors.ts @@ -1,4 +1,4 @@ -import type { IColor, ICoordinate, IDropline, IMarker, IMouseEventType, ITooltipItem } from "@chart-it/types"; +import type { IColor, ICoordinate, IDropline, IMarker, IMouseEventType, ITooltipItem } from "@chart-io/types"; import type { IEventState, IEventStateTooltip, IState } from "../types"; diff --git a/packages/react/src/lib/store/event/tests/eventActions.unit.ts b/packages/react/src/lib/store/event/tests/eventActions.unit.ts index 3b54fa74..01bd4db5 100644 --- a/packages/react/src/lib/store/event/tests/eventActions.unit.ts +++ b/packages/react/src/lib/store/event/tests/eventActions.unit.ts @@ -1,4 +1,4 @@ -import type { IDropline, IMarker, IMouseEvent } from "@chart-it/types"; +import type { IDropline, IMarker, IMouseEvent } from "@chart-io/types"; import { eventActions } from "../eventActions"; diff --git a/packages/react/src/lib/store/event/tests/eventReducer.unit.ts b/packages/react/src/lib/store/event/tests/eventReducer.unit.ts index 690aecf7..b37d6a74 100644 --- a/packages/react/src/lib/store/event/tests/eventReducer.unit.ts +++ b/packages/react/src/lib/store/event/tests/eventReducer.unit.ts @@ -1,4 +1,4 @@ -import type { IMouseEventType } from "@chart-it/types"; +import type { IMouseEventType } from "@chart-io/types"; import type { AddDroplineAction, diff --git a/packages/react/src/lib/store/event/tests/eventSelectors.unit.ts b/packages/react/src/lib/store/event/tests/eventSelectors.unit.ts index 9e0a93ba..889564bd 100644 --- a/packages/react/src/lib/store/event/tests/eventSelectors.unit.ts +++ b/packages/react/src/lib/store/event/tests/eventSelectors.unit.ts @@ -1,4 +1,4 @@ -import type { IColor, IDropline, IMarker, IMouseEventType } from "@chart-it/types"; +import type { IColor, IDropline, IMarker, IMouseEventType } from "@chart-io/types"; import { defaultChartState } from "../../chart/chartReducer"; import { defaultEventState } from "../eventReducer"; diff --git a/packages/react/src/lib/store/event/types.ts b/packages/react/src/lib/store/event/types.ts index 40b887c4..1923e8da 100644 --- a/packages/react/src/lib/store/event/types.ts +++ b/packages/react/src/lib/store/event/types.ts @@ -1,4 +1,4 @@ -import type { IColor, ICoordinate, IDropline, IMarker, IMouseEvent, ITooltipItem } from "@chart-it/types"; +import type { IColor, ICoordinate, IDropline, IMarker, IMouseEvent, ITooltipItem } from "@chart-io/types"; export interface MouseMoveAction { type: "EVENT.MOUSE_MOVE"; diff --git a/packages/react/src/lib/store/types/IChartState.ts b/packages/react/src/lib/store/types/IChartState.ts index 730bb65b..88799698 100644 --- a/packages/react/src/lib/store/types/IChartState.ts +++ b/packages/react/src/lib/store/types/IChartState.ts @@ -1,4 +1,4 @@ -import type { IData, ILegendItem, IMargin, IScale, ITheme } from "@chart-it/types"; +import type { IData, ILegendItem, IMargin, IScale, ITheme } from "@chart-io/types"; //export type IChartStoreScales = Record>; diff --git a/packages/react/src/lib/store/types/IEventState.ts b/packages/react/src/lib/store/types/IEventState.ts index 867433dd..54065c1b 100644 --- a/packages/react/src/lib/store/types/IEventState.ts +++ b/packages/react/src/lib/store/types/IEventState.ts @@ -1,4 +1,4 @@ -import type { IColor, ICoordinate, IDropline, IMarker, IMouseEventType, ITooltipItem } from "@chart-it/types"; +import type { IColor, ICoordinate, IDropline, IMarker, IMouseEventType, ITooltipItem } from "@chart-io/types"; export interface IEventStateMouse { x: number; diff --git a/packages/react/src/lib/stories/Dashboards/Dashboards.mdx b/packages/react/src/lib/stories/Dashboards/Dashboards.mdx index 8e7d4120..5b7a7c41 100644 --- a/packages/react/src/lib/stories/Dashboards/Dashboards.mdx +++ b/packages/react/src/lib/stories/Dashboards/Dashboards.mdx @@ -4,7 +4,7 @@ import { Story, Canvas, Meta } from "@storybook/blocks"; # Dashboards -One of the benefits of `@chart-it`'s extensibility is that it is simple to customize behaviour, including linking multiple charts together. +One of the benefits of `@chart-io`'s extensibility is that it is simple to customize behaviour, including linking multiple charts together. The example below shows a number of different charts, that all have linked tooltips and markers. To link these together we "link" the redux stores together using a helper function provided. diff --git a/packages/react/src/lib/stories/GettingStarted.mdx b/packages/react/src/lib/stories/GettingStarted.mdx index 47e34191..4444ee85 100644 --- a/packages/react/src/lib/stories/GettingStarted.mdx +++ b/packages/react/src/lib/stories/GettingStarted.mdx @@ -4,12 +4,12 @@ import { Story, Canvas, Meta } from "@storybook/blocks"; # Getting Started -To get started with `@chart-it` first ensure that you've installed the package using one of the following commands: +To get started with `@chart-io` first ensure that you've installed the package using one of the following commands: ``` -npm install @chart-it/react //npm -yarn add @chart-it/react // yarn -pnpm add @chart-it/react // pnpm +npm install @chart-io/react //npm +yarn add @chart-io/react // yarn +pnpm add @chart-io/react // pnpm ``` ## Deciding on your chart type diff --git a/packages/react/src/lib/stories/Introduction.mdx b/packages/react/src/lib/stories/Introduction.mdx index c96b81a5..856b4ae3 100644 --- a/packages/react/src/lib/stories/Introduction.mdx +++ b/packages/react/src/lib/stories/Introduction.mdx @@ -2,11 +2,11 @@ import { Meta } from "@storybook/addon-docs/blocks"; -# Welcome to @chart-it +# Welcome to @chart-io Chart-it provides a set of reusable chart components to make data visualization easy. It aims to provide high-level components that require minial configuration to provide great looking charts, while also providing an escape hatch to access the low level components giving you the flexibility to customize them as you see fit. All of this is built using D3.js to reduce the learning curve in tweaking the behaviours. -Here are some of the key features of @chart-it at a glance: +Here are some of the key features of @chart-io at a glance: - Minimal configuration - Built with extensibility in mind. Easy escape hatches to allow customization with D3.js diff --git a/packages/react/src/lib/stories/Theming/Theme.mdx b/packages/react/src/lib/stories/Theming/Theme.mdx index 704019df..21bdbe9e 100644 --- a/packages/react/src/lib/stories/Theming/Theme.mdx +++ b/packages/react/src/lib/stories/Theming/Theme.mdx @@ -11,7 +11,7 @@ Chart-it provides a theme object which allows you to consistenly style your char You can simply pass a `theme` object into your chart `` to customize the theme. There are 2 built in themes that you can extend if required: ``` -import { themes } from "@chart-it/react"; +import { themes } from "@chart-io/react"; console.log(themes.dark); console.log(themes.light); diff --git a/packages/react/src/lib/testUtils/renderChart.tsx b/packages/react/src/lib/testUtils/renderChart.tsx index 6d8bbfec..c22751fb 100644 --- a/packages/react/src/lib/testUtils/renderChart.tsx +++ b/packages/react/src/lib/testUtils/renderChart.tsx @@ -1,4 +1,4 @@ -import type { IData, IScale } from "@chart-it/types"; +import type { IData, IScale } from "@chart-io/types"; import { Provider } from "react-redux"; import React from "react"; import { render } from "@testing-library/react"; diff --git a/packages/react/src/lib/themes.ts b/packages/react/src/lib/themes.ts index 116235f9..160772bc 100644 --- a/packages/react/src/lib/themes.ts +++ b/packages/react/src/lib/themes.ts @@ -1,4 +1,4 @@ -import type { IColor, ITheme } from "@chart-it/types"; +import type { IColor, ITheme } from "@chart-io/types"; const light: ITheme = { axis: { diff --git a/packages/react/src/lib/utils/areValuesUnique.ts b/packages/react/src/lib/utils/areValuesUnique.ts index 28e99f64..72917c4e 100644 --- a/packages/react/src/lib/utils/areValuesUnique.ts +++ b/packages/react/src/lib/utils/areValuesUnique.ts @@ -1,4 +1,4 @@ -import type { IValue } from "@chart-it/types"; +import type { IValue } from "@chart-io/types"; /** * Determines if all the values are unique diff --git a/packages/react/src/lib/utils/checks/__snapshots__/checks.unit.ts.snap b/packages/react/src/lib/utils/checks/__snapshots__/checks.unit.ts.snap index 99ec37da..fe9b4093 100644 --- a/packages/react/src/lib/utils/checks/__snapshots__/checks.unit.ts.snap +++ b/packages/react/src/lib/utils/checks/__snapshots__/checks.unit.ts.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`/utils/checks ensureBandScale should return false if a zero bandwidth is found 1`] = `"@chart-it/react encountered an error. E001: Incompatible scale for a . Are you missing the \`scaleType="band"\` in your or component?. You can read more about this https://ipwright83.github.io/chart-it/?path=/docs/errors-warnings-errors-E001."`; +exports[`/utils/checks ensureBandScale should return false if a zero bandwidth is found 1`] = `"@chart-io/react encountered an error. E001: Incompatible scale for a . Are you missing the \`scaleType="band"\` in your or component?. You can read more about this https://ipwright83.github.io/chart-io/?path=/docs/errors-warnings-errors-E001."`; -exports[`/utils/checks ensureNoScaleOverflow for aggregated data should return true if the data is larger than the scale 1`] = `"@chart-it/react encountered an warning. W001: The scale for unit_test appears too small for the dataset. Are you missing the \`aggregate={true}\` in your or component?. You can read more about this https://ipwright83.github.io/chart-it/?path=/docs/errors-warnings-warnings-W001."`; +exports[`/utils/checks ensureNoScaleOverflow for aggregated data should return true if the data is larger than the scale 1`] = `"@chart-io/react encountered an warning. W001: The scale for unit_test appears too small for the dataset. Are you missing the \`aggregate={true}\` in your or component?. You can read more about this https://ipwright83.github.io/chart-io/?path=/docs/errors-warnings-warnings-W001."`; -exports[`/utils/checks ensureValuesAreUnique should return false if not all the values are unique 1`] = `"@chart-it/react encountered an warning. W002: There are duplicate values in the x field. This may cause rendering artifacts with a .. You can read more about this https://ipwright83.github.io/chart-it/?path=/docs/errors-warnings-warnings-W002."`; +exports[`/utils/checks ensureValuesAreUnique should return false if not all the values are unique 1`] = `"@chart-io/react encountered an warning. W002: There are duplicate values in the x field. This may cause rendering artifacts with a .. You can read more about this https://ipwright83.github.io/chart-io/?path=/docs/errors-warnings-warnings-W002."`; diff --git a/packages/react/src/lib/utils/checks/checks.unit.ts b/packages/react/src/lib/utils/checks/checks.unit.ts index e2c3c712..f090f0dd 100644 --- a/packages/react/src/lib/utils/checks/checks.unit.ts +++ b/packages/react/src/lib/utils/checks/checks.unit.ts @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import { ensureBandwidth } from "./ensureBandwidth"; import { ensureNoScaleOverflow } from "./ensureNoScaleOverflow"; import { ensureValuesAreUnique } from "./ensureValuesAreUnique"; diff --git a/packages/react/src/lib/utils/checks/ensureNoScaleOverflow.ts b/packages/react/src/lib/utils/checks/ensureNoScaleOverflow.ts index 7e6af98f..5b5c9090 100644 --- a/packages/react/src/lib/utils/checks/ensureNoScaleOverflow.ts +++ b/packages/react/src/lib/utils/checks/ensureNoScaleOverflow.ts @@ -1,5 +1,5 @@ -import * as d3 from "@chart-it/d3"; -import type { IData, IScale } from "@chart-it/types"; +import * as d3 from "@chart-io/d3"; +import type { IData, IScale } from "@chart-io/types"; import { logWarning } from "../logger"; diff --git a/packages/react/src/lib/utils/checks/ensureValuesAreUnique.ts b/packages/react/src/lib/utils/checks/ensureValuesAreUnique.ts index 832942fa..41121e95 100644 --- a/packages/react/src/lib/utils/checks/ensureValuesAreUnique.ts +++ b/packages/react/src/lib/utils/checks/ensureValuesAreUnique.ts @@ -1,4 +1,4 @@ -import type { IData } from "@chart-it/types"; +import type { IData } from "@chart-io/types"; import { areValuesUnique } from "../areValuesUnique"; import { logWarning } from "../logger"; diff --git a/packages/react/src/lib/utils/formatters/formatDate.ts b/packages/react/src/lib/utils/formatters/formatDate.ts index 8cda84d6..394c8b3a 100644 --- a/packages/react/src/lib/utils/formatters/formatDate.ts +++ b/packages/react/src/lib/utils/formatters/formatDate.ts @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; /** * Formats a Date, defaulting the resolution to the first non-zero part diff --git a/packages/react/src/lib/utils/formatters/formatNumber.ts b/packages/react/src/lib/utils/formatters/formatNumber.ts index d5b491c2..f9082189 100644 --- a/packages/react/src/lib/utils/formatters/formatNumber.ts +++ b/packages/react/src/lib/utils/formatters/formatNumber.ts @@ -1,4 +1,4 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; const SIGNIFICANT_FIGURES = 4; const REGEX_REPLACE_ZEROS_AFTER_DECIMAL = /(.*)(\.0+)([^\d]*)$/; diff --git a/packages/react/src/lib/utils/formatters/formatValue.ts b/packages/react/src/lib/utils/formatters/formatValue.ts index f4adceba..8a59fc13 100644 --- a/packages/react/src/lib/utils/formatters/formatValue.ts +++ b/packages/react/src/lib/utils/formatters/formatValue.ts @@ -1,4 +1,4 @@ -import { IValue } from "@chart-it/types"; +import { IValue } from "@chart-io/types"; import { formatDate } from "./formatDate"; import { formatNumber } from "./formatNumber"; diff --git a/packages/react/src/lib/utils/getBandwidthAndOffset.ts b/packages/react/src/lib/utils/getBandwidthAndOffset.ts index 4cfdc32c..c54a0999 100644 --- a/packages/react/src/lib/utils/getBandwidthAndOffset.ts +++ b/packages/react/src/lib/utils/getBandwidthAndOffset.ts @@ -1,4 +1,4 @@ -import { IScale } from "@chart-it/types"; +import { IScale } from "@chart-io/types"; import { BAND_PADDING } from "../constants"; diff --git a/packages/react/src/lib/utils/getXYFromTransform.ts b/packages/react/src/lib/utils/getXYFromTransform.ts index 609eb16c..b398b639 100644 --- a/packages/react/src/lib/utils/getXYFromTransform.ts +++ b/packages/react/src/lib/utils/getXYFromTransform.ts @@ -1,4 +1,4 @@ -import type { ICoordinate } from "@chart-it/types"; +import type { ICoordinate } from "@chart-io/types"; /** * Obtain the x, y offsets from a transform string diff --git a/packages/react/src/lib/utils/utils.unit.ts b/packages/react/src/lib/utils/utils.unit.ts index baf5c0bf..e5d4353a 100644 --- a/packages/react/src/lib/utils/utils.unit.ts +++ b/packages/react/src/lib/utils/utils.unit.ts @@ -1,6 +1,6 @@ -import * as d3 from "@chart-it/d3"; +import * as d3 from "@chart-io/d3"; import type { AnyAction, Store } from "redux"; -import { IScale } from "@chart-it/types"; +import { IScale } from "@chart-io/types"; import { logAndThrowError, logDebug, logError, logWarning } from "./logger"; import { areValuesUnique } from "./areValuesUnique"; @@ -169,7 +169,7 @@ describe("utils", () => { logWarning("W100", "Foobar"); expect(spy).toHaveBeenCalledWith( - "@chart-it/react encountered an warning. W100: Foobar. You can read more about this https://ipwright83.github.io/chart-it/?path=/docs/errors-warnings-warnings-W100." + "@chart-io/react encountered an warning. W100: Foobar. You can read more about this https://ipwright83.github.io/chart-io/?path=/docs/errors-warnings-warnings-W100." ); }); @@ -178,7 +178,7 @@ describe("utils", () => { logDebug("Foobar"); - expect(spy).toHaveBeenCalledWith("@chart-it/react", "Foobar", []); + expect(spy).toHaveBeenCalledWith("@chart-io/react", "Foobar", []); }); it("logError outputs correctly to the console", () => { @@ -187,7 +187,7 @@ describe("utils", () => { logError("E100", "Foobar"); expect(spy).toHaveBeenCalledWith( - "@chart-it/react encountered an error. E100: Foobar. You can read more about this https://ipwright83.github.io/chart-it/?path=/docs/errors-warnings-errors-E100." + "@chart-io/react encountered an error. E100: Foobar. You can read more about this https://ipwright83.github.io/chart-io/?path=/docs/errors-warnings-errors-E100." ); }); @@ -199,7 +199,7 @@ describe("utils", () => { }).toThrow("Foobar"); expect(spy).toHaveBeenCalledWith( - "@chart-it/react encountered an error. E100: Foobar. You can read more about this https://ipwright83.github.io/chart-it/?path=/docs/errors-warnings-errors-E100." + "@chart-io/react encountered an error. E100: Foobar. You can read more about this https://ipwright83.github.io/chart-io/?path=/docs/errors-warnings-errors-E100." ); }); }); diff --git a/packages/react/src/storybook/Architecture/Introduction.mdx b/packages/react/src/storybook/Architecture/Introduction.mdx index b72a4a6f..c3160994 100644 --- a/packages/react/src/storybook/Architecture/Introduction.mdx +++ b/packages/react/src/storybook/Architecture/Introduction.mdx @@ -2,4 +2,4 @@ import { Meta } from "@storybook/blocks"; -These pages under this section contain information that is useful in understanding the internal workings of @chart-it and modifying or extending it's architecture. Understanding these is not neccessary for regular use of @chart-it, however may be beneficial for advanced use cases. +These pages under this section contain information that is useful in understanding the internal workings of @chart-io and modifying or extending it's architecture. Understanding these is not neccessary for regular use of @chart-io, however may be beneficial for advanced use cases. diff --git a/packages/react/src/storybook/Errors/E003.mdx b/packages/react/src/storybook/Errors/E003.mdx index d5fec98d..56b6b871 100644 --- a/packages/react/src/storybook/Errors/E003.mdx +++ b/packages/react/src/storybook/Errors/E003.mdx @@ -9,7 +9,7 @@ import { Meta } from "@storybook/blocks"; ## Cause -When multiple plots are created for a bar on column chart they can be either stacked or grouped. @chart-it does not support both of these options being set at the same time. +When multiple plots are created for a bar on column chart they can be either stacked or grouped. @chart-io does not support both of these options being set at the same time. ## Fix diff --git a/packages/react/src/storybook/Errors/Introduction.mdx b/packages/react/src/storybook/Errors/Introduction.mdx index 24158512..685bfd69 100644 --- a/packages/react/src/storybook/Errors/Introduction.mdx +++ b/packages/react/src/storybook/Errors/Introduction.mdx @@ -6,8 +6,8 @@ With both Errors and Warnings that appear on the console, further information ca # Errors -Ocasionally when using @chart-it you might encounter an error. If this has been logged to the console with a prefix such as `E001` then this means it's something @chart-it due to bad configuration and it will attempt to prompt you on how to fix it. +Ocasionally when using @chart-io you might encounter an error. If this has been logged to the console with a prefix such as `E001` then this means it's something @chart-io due to bad configuration and it will attempt to prompt you on how to fix it. # Warnings -You may also encounter warnings when using @chart-it. Again if prefixed these usually indicate a configuration error, often in these cases you will have a partially rendered chart. +You may also encounter warnings when using @chart-io. Again if prefixed these usually indicate a configuration error, often in these cases you will have a partially rendered chart. diff --git a/packages/react/src/storybook/Warnings/W003.mdx b/packages/react/src/storybook/Warnings/W003.mdx index 5c88d804..b4aa13b4 100644 --- a/packages/react/src/storybook/Warnings/W003.mdx +++ b/packages/react/src/storybook/Warnings/W003.mdx @@ -4,7 +4,7 @@ import { Meta } from "@storybook/blocks"; # W003 Missing Class Name -Class names in @chart-it are generally used to help identify elements within the DOM, but can also be used for CSS styling if neccessary. As we assume they are set, the lack of a value causes `g-undefined` to appear in the DOM. This warning is trying to prevent this from happening. +Class names in @chart-io are generally used to help identify elements within the DOM, but can also be used for CSS styling if neccessary. As we assume they are set, the lack of a value causes `g-undefined` to appear in the DOM. This warning is trying to prevent this from happening. > `className is required when using the withCanvas higher order component` > `className is required when using the withSVG higher order component` diff --git a/packages/react/src/storybook/Warnings/W006.mdx b/packages/react/src/storybook/Warnings/W006.mdx index c84fe4f7..23f41993 100644 --- a/packages/react/src/storybook/Warnings/W006.mdx +++ b/packages/react/src/storybook/Warnings/W006.mdx @@ -8,7 +8,7 @@ import { Meta } from "@storybook/blocks"; ## Cause -When using a Canvas instead of SVG only certain node types can be converted to canvas. In this case a node was encountered that @chart-it does not know how to automatically convert to the canvas equivalent +When using a Canvas instead of SVG only certain node types can be converted to canvas. In this case a node was encountered that @chart-io does not know how to automatically convert to the canvas equivalent ## Fix diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 1eb8905f..8c225526 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,4 +1,4 @@ -# @chart-it/types +# @chart-io/types ## 0.11.0 @@ -35,21 +35,21 @@ ### Patch Changes - Updated dependencies [f0231e1] - - @chart-it/d3@0.6.0 + - @chart-io/d3@0.6.0 ## 0.6.2 ### Patch Changes - Updated dependencies [ce6284f] - - @chart-it/d3@0.5.0 + - @chart-io/d3@0.5.0 ## 0.6.1 ### Patch Changes - Updated dependencies [6f8b2af] - - @chart-it/d3@0.4.0 + - @chart-io/d3@0.4.0 ## 0.6.0 @@ -62,7 +62,7 @@ - Updated dependencies [494a204] - Updated dependencies [5c9ca11] - - @chart-it/d3@0.3.0 + - @chart-io/d3@0.3.0 ## 0.5.0 @@ -73,4 +73,4 @@ ### Patch Changes - Updated dependencies [feddec9] - - @chart-it/d3@0.2.0 + - @chart-io/d3@0.2.0 diff --git a/packages/types/package.json b/packages/types/package.json index f25958cd..7ec9894d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,10 +1,10 @@ { - "name": "@chart-it/types", + "name": "@chart-io/types", "version": "0.11.0", "private": true, "packageManager": "pnpm@7.26.2", - "description": "Provides core type definitions for chart-it packages", - "repository": "git@github.com:IPWright83/chart-it.git", + "description": "Provides core type definitions for chart-io packages", + "repository": "git@github.com:IPWright83/chart-io.git", "author": "Ian Wright - IPWright83", "main": "src/index.ts", "module": "src/index.ts", @@ -26,7 +26,7 @@ "chart" ], "devDependencies": { - "@chart-it/d3": "workspace:*", + "@chart-io/d3": "workspace:*", "@typescript-eslint/eslint-plugin": "^5.51.0", "@typescript-eslint/parser": "^5.51.0", "eslint": "^8.33.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index be54084d..74a14f5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,7 +22,7 @@ importers: demos/react-demo: dependencies: - '@chart-it/react': + '@chart-io/react': specifier: workspace:* version: link:../../packages/react '@swc/core': @@ -162,10 +162,10 @@ importers: packages/detection: devDependencies: - '@chart-it/d3': + '@chart-io/d3': specifier: workspace:* version: link:../d3 - '@chart-it/types': + '@chart-io/types': specifier: workspace:* version: link:../types '@swc/core': @@ -226,13 +226,13 @@ importers: '@babel/preset-react': specifier: ^7.18.6 version: 7.18.6(@babel/core@7.21.0) - '@chart-it/d3': + '@chart-io/d3': specifier: workspace:* version: link:../d3 - '@chart-it/detection': + '@chart-io/detection': specifier: workspace:* version: link:../detection - '@chart-it/types': + '@chart-io/types': specifier: workspace:* version: link:../types '@storybook/addon-actions': @@ -395,7 +395,7 @@ importers: specifier: ^18.0.28 version: 18.0.28 devDependencies: - '@chart-it/d3': + '@chart-io/d3': specifier: workspace:* version: link:../d3 '@typescript-eslint/eslint-plugin': From dec1fd3d07389d76f191df58c290d88e76ac59cc Mon Sep 17 00:00:00 2001 From: Ian Wright Date: Thu, 13 Jul 2023 13:22:41 +0100 Subject: [PATCH 2/3] Linting --- packages/react/src/lib/components/XYChart/XYChart.tsx | 2 +- packages/react/src/lib/components/ZoomBrush/ZoomBrush.tsx | 2 +- packages/react/src/lib/store/chart/chartActions.ts | 2 +- packages/react/src/lib/store/chart/chartSelectors.ts | 2 +- packages/react/src/lib/store/chart/tests/chartReducer.unit.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react/src/lib/components/XYChart/XYChart.tsx b/packages/react/src/lib/components/XYChart/XYChart.tsx index d9c06f61..ee41ad6b 100644 --- a/packages/react/src/lib/components/XYChart/XYChart.tsx +++ b/packages/react/src/lib/components/XYChart/XYChart.tsx @@ -1,5 +1,5 @@ -import React from "react"; import { IMargin } from "@chart-io/types"; +import React from "react"; import { Chart, IChartProps } from "../Chart"; import { Crosshair } from "../Crosshair"; diff --git a/packages/react/src/lib/components/ZoomBrush/ZoomBrush.tsx b/packages/react/src/lib/components/ZoomBrush/ZoomBrush.tsx index 3e837771..28013a1c 100644 --- a/packages/react/src/lib/components/ZoomBrush/ZoomBrush.tsx +++ b/packages/react/src/lib/components/ZoomBrush/ZoomBrush.tsx @@ -1,7 +1,7 @@ import { IMargin } from "@chart-io/types"; import React from "react"; -import { DEFAULT_BRUSH_MARGIN } from "./constants"; +import { DEFAULT_BRUSH_MARGIN } from "./constants"; import { getBrushPlots } from "./getBrushPlots"; import { HorizontalZoomBrush } from "./HorizontalZoomBrush"; diff --git a/packages/react/src/lib/store/chart/chartActions.ts b/packages/react/src/lib/store/chart/chartActions.ts index 1caafd8b..0e26ec32 100644 --- a/packages/react/src/lib/store/chart/chartActions.ts +++ b/packages/react/src/lib/store/chart/chartActions.ts @@ -4,8 +4,8 @@ import type { AddLegendItemAction, RemoveLegendItemAction, SetAnimationDurationAction, - SetBrushRangeAction, SetBrushDimensionsAction, + SetBrushRangeAction, SetChartIDAction, SetDataAction, SetDimensionAction, diff --git a/packages/react/src/lib/store/chart/chartSelectors.ts b/packages/react/src/lib/store/chart/chartSelectors.ts index 21438066..747abf90 100644 --- a/packages/react/src/lib/store/chart/chartSelectors.ts +++ b/packages/react/src/lib/store/chart/chartSelectors.ts @@ -1,5 +1,5 @@ import type { IData, ILegendItem, IMargin, IScale, IScaleMode, ITheme } from "@chart-io/types"; -import { memoize, memoizeWithArgs } from "proxy-memoize"; +import { memoizeWithArgs } from "proxy-memoize"; import type { IChartScaleInfo, diff --git a/packages/react/src/lib/store/chart/tests/chartReducer.unit.ts b/packages/react/src/lib/store/chart/tests/chartReducer.unit.ts index ba6a8d27..f45a0929 100644 --- a/packages/react/src/lib/store/chart/tests/chartReducer.unit.ts +++ b/packages/react/src/lib/store/chart/tests/chartReducer.unit.ts @@ -8,8 +8,8 @@ import type { AddLegendItemAction, RemoveLegendItemAction, SetAnimationDurationAction, - SetBrushRangeAction, SetBrushDimensionsAction, + SetBrushRangeAction, SetChartIDAction, SetDataAction, SetDimensionAction, From 0a02aadb1b53d8fa33b3c6356eff3d2c38b04c7b Mon Sep 17 00:00:00 2001 From: Ian Wright Date: Thu, 13 Jul 2023 13:23:03 +0100 Subject: [PATCH 3/3] Changeset --- .changeset/yellow-carrots-try.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .changeset/yellow-carrots-try.md diff --git a/.changeset/yellow-carrots-try.md b/.changeset/yellow-carrots-try.md new file mode 100644 index 00000000..bb5497bc --- /dev/null +++ b/.changeset/yellow-carrots-try.md @@ -0,0 +1,8 @@ +--- +"@chart-io/d3": minor +"@chart-io/detection": minor +"@chart-io/react": minor +"@chart-io/types": minor +--- + +Updated name