Skip to content

Commit

Permalink
New release with resetScales functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
skalinichev committed Nov 17, 2022
1 parent 50b2c9d commit 31ca82a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,4 @@ Vue.js 3:
| target |optional|Target html element or init function for uPlot. Passed as the third argument to uPlot constructor: `new uPlot(options, data, target)` A new div target element will be created automatically if none is passed in the props|
| onCreate |optional|Callback function, invoked upon uPlot instance creation or recreation|
| onDelete |optional|Callback function, invoked before uPlot instance gets destroyed, either because the props has changed so much it's impossible to update the chart or because the component is about to be unmounted|
| resetScales |optional|Flag controlling whether to reset the scales on data change. Defaults to true.
5 changes: 2 additions & 3 deletions common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uplot-wrappers-common",
"version": "1.1.1",
"version": "1.1.2",
"description": "Common code for React and Vue.js wrappers of uPlot",
"author": "Sergey Kalinichev <kalinichev.so.0@gmail.com>",
"license": "MIT",
Expand All @@ -21,8 +21,7 @@
"Wrapper"
],
"private": true,
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"uplot": "^1.6.7"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uplot-wrappers",
"version": "1.1.1",
"version": "1.1.2",
"description": "React and Vue.js wrappers for uPlot",
"author": "Sergey Kalinichev <kalinichev.so.0@gmail.com>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uplot-react",
"version": "1.1.1",
"version": "1.1.2",
"description": "React wrapper for uPlot that allows you to work with charts declaratively inside your favorite framework",
"author": "Sergey Kalinichev <kalinichev.so.0@gmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -38,6 +38,6 @@
"react": ">=16.8.6",
"react-dom": ">=16.8.6",
"uplot": "^1.6.7",
"uplot-wrappers-common": "1.1.1"
"uplot-wrappers-common": "1.1.2"
}
}
2 changes: 1 addition & 1 deletion react/uplot-react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function UplotReact({options, data, target, onDelete = () => {},
if (!chart) {
create();
} else if (!dataMatch(prevProps.data, data)) {
if(resetScales) {
if (resetScales) {
chart.setData(data, true);
} else {
chart.setData(data, false);
Expand Down
4 changes: 2 additions & 2 deletions vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uplot-vue",
"version": "1.1.1",
"version": "1.1.2",
"description": "Vue.js wrapper for uPlot that allows you to work with charts declaratively inside your favorite framework",
"author": "Sergey Kalinichev <kalinichev.so.0@gmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"uplot": "^1.6.7",
"uplot-wrappers-common": "1.1.1",
"uplot-wrappers-common": "1.1.2",
"vue": "^2.6.12",
"vue3": "npm:vue@^3.0.11"
}
Expand Down

0 comments on commit 31ca82a

Please sign in to comment.