New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-chartkick

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-chartkick - npm Package Compare versions

Comparing version
0.5.0
to
0.5.1
+4
-0
CHANGELOG.md

@@ -0,1 +1,5 @@

## 0.5.1 (2021-04-06)
- Fixed `loading` option with empty string
## 0.5.0 (2021-04-05)

@@ -2,0 +6,0 @@

@@ -5,3 +5,3 @@ /*!

* https://github.com/ankane/react-chartkick
* v0.5.0
* v0.5.1
* MIT License

@@ -65,5 +65,15 @@ */

this.chartId = props.id || this.chartId || ("chart-" + chartId++);
// check if undefined so works with empty string
var loading = props.loading !== undefined ? props.loading : "Loading...";
// createElement accepts React children,
// but limit to string since it may be used by Chartkick.js
if (typeof loading !== "string") {
throw new Error("loading must be a string");
}
return (
React.createElement("div", {id: this.chartId, style: style, ref: function (element) { return this$1.element = element; }},
props.loading || "Loading..."
loading
)

@@ -70,0 +80,0 @@ )

@@ -5,3 +5,3 @@ /*!

* https://github.com/ankane/react-chartkick
* v0.5.0
* v0.5.1
* MIT License

@@ -71,5 +71,15 @@ */

this.chartId = props.id || this.chartId || ("chart-" + chartId++);
// check if undefined so works with empty string
var loading = props.loading !== undefined ? props.loading : "Loading...";
// createElement accepts React children,
// but limit to string since it may be used by Chartkick.js
if (typeof loading !== "string") {
throw new Error("loading must be a string");
}
return (
React.createElement("div", {id: this.chartId, style: style, ref: function (element) { return this$1.element = element; }},
props.loading || "Loading..."
loading
)

@@ -76,0 +86,0 @@ )

+2
-2

@@ -1,2 +0,2 @@

/*! React Chartkick v0.5.0 | MIT License */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("chartkick")):"function"==typeof define&&define.amd?define(["exports","react","chartkick"],e):e((t=t||self).ReactChartkick={},t.React,t.Chartkick)}(this,function(t,a,e){"use strict";a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a,e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var n=1,i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.newChartType=function(t){var e,r=t.data,a={};for(e in t)t.hasOwnProperty(e)&&"data"!==e&&"id"!==e&&"height"!==e&&"width"!==e&&(a[e]=t[e]);this.element&&(this.chart?this.chart.updateData(r,a):this.chart=new t.chartType(this.element,r,a))},e.prototype.componentDidMount=function(){this.newChartType(this.props)},e.prototype.componentDidUpdate=function(){this.newChartType(this.props)},e.prototype.render=function(){var e=this,t=this.props,r={height:t.height||"300px",lineHeight:t.height||"300px",width:t.width||"100%",textAlign:"center",color:"#999",fontSize:"14px",fontFamily:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif"};return this.chartId=t.id||this.chartId||"chart-"+n++,a.createElement("div",{id:this.chartId,style:r,ref:function(t){return e.element=t}},t.loading||"Loading...")},e}(a.Component),r=function(r){function t(t){var e=t.innerRef;return(t=function(t,e){var r,a={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===e.indexOf(r)&&(a[r]=t[r]);return a}(t,["innerRef"])).chartType=r,t.ref=e,a.createElement(i,t)}return t.displayName=r.name,t},o=r(e.LineChart),h=r(e.PieChart),c=r(e.ColumnChart),p=r(e.BarChart),d=r(e.AreaChart),u=r(e.ScatterChart),f=r(e.GeoChart),r=r(e.Timeline);t.AreaChart=d,t.BarChart=p,t.ColumnChart=c,t.GeoChart=f,t.LineChart=o,t.PieChart=h,t.ScatterChart=u,t.Timeline=r,t.default=e,Object.defineProperty(t,"__esModule",{value:!0})});
/*! React Chartkick v0.5.1 | MIT License */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("chartkick")):"function"==typeof define&&define.amd?define(["exports","react","chartkick"],e):e((t=t||self).ReactChartkick={},t.React,t.Chartkick)}(this,function(t,n,e){"use strict";n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n,e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var a=1,i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.newChartType=function(t){var e,r=t.data,n={};for(e in t)t.hasOwnProperty(e)&&"data"!==e&&"id"!==e&&"height"!==e&&"width"!==e&&(n[e]=t[e]);this.element&&(this.chart?this.chart.updateData(r,n):this.chart=new t.chartType(this.element,r,n))},e.prototype.componentDidMount=function(){this.newChartType(this.props)},e.prototype.componentDidUpdate=function(){this.newChartType(this.props)},e.prototype.render=function(){var e=this,t=this.props,r={height:t.height||"300px",lineHeight:t.height||"300px",width:t.width||"100%",textAlign:"center",color:"#999",fontSize:"14px",fontFamily:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif"};this.chartId=t.id||this.chartId||"chart-"+a++;t=void 0!==t.loading?t.loading:"Loading...";if("string"!=typeof t)throw new Error("loading must be a string");return n.createElement("div",{id:this.chartId,style:r,ref:function(t){return e.element=t}},t)},e}(n.Component),r=function(r){function t(t){var e=t.innerRef;return(t=function(t,e){var r,n={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&-1===e.indexOf(r)&&(n[r]=t[r]);return n}(t,["innerRef"])).chartType=r,t.ref=e,n.createElement(i,t)}return t.displayName=r.name,t},o=r(e.LineChart),h=r(e.PieChart),c=r(e.ColumnChart),p=r(e.BarChart),d=r(e.AreaChart),s=r(e.ScatterChart),f=r(e.GeoChart),r=r(e.Timeline);t.AreaChart=d,t.BarChart=p,t.ColumnChart=c,t.GeoChart=f,t.LineChart=o,t.PieChart=h,t.ScatterChart=s,t.Timeline=r,t.default=e,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "react-chartkick",
"version": "0.5.0",
"version": "0.5.1",
"description": "Create beautiful JavaScript charts with one line of React",

@@ -5,0 +5,0 @@ "main": "dist/react-chartkick.js",

+11
-11

@@ -31,3 +31,3 @@ # React Chartkick

```jsx
<LineChart data={{"2017-01-01": 11, "2017-01-02": 6}} />
<LineChart data={{"2021-01-01": 11, "2021-01-02": 6}} />
```

@@ -56,3 +56,3 @@

```jsx
<AreaChart data={{"2017-01-01": 11, "2017-01-02": 6}} />
<AreaChart data={{"2021-01-01": 11, "2021-01-02": 6}} />
```

@@ -82,4 +82,4 @@

data = [
{"name":"Workout", "data": {"2017-01-01": 3, "2017-01-02": 4}},
{"name":"Call parents", "data": {"2017-01-01": 5, "2017-01-02": 3}}
{"name":"Workout", "data": {"2021-01-01": 3, "2021-01-02": 4}},
{"name":"Call parents", "data": {"2021-01-01": 5, "2021-01-02": 3}}
];

@@ -118,3 +118,3 @@

```jsx
<LineChart xmin="2018-01-01" xmax="2019-01-01" />
<LineChart xmin="2021-01-01" xmax="2022-01-01" />
```

@@ -218,3 +218,3 @@

Friendly byte sizes - *Chart.js 2.8+*
Friendly byte sizes - *Chart.js*

@@ -227,3 +227,3 @@ ```jsx

```vue
```jsx
<LineChart loading="Loading..." />

@@ -234,3 +234,3 @@ ```

```vue
```jsx
<LineChart empty="No data" />

@@ -283,3 +283,3 @@ ```

```jsx
<LineChart data={[[new Date(), 5], ["2017-01-01 00:00:00 UTC", 7]]} />
<LineChart data={[[new Date(), 5], ["2021-01-01 00:00:00 UTC", 7]]} />
```

@@ -396,5 +396,5 @@

```html
<script src="https://unpkg.com/chart.js@3.0.2/dist/chart.js"></script>
<script src="https://unpkg.com/chart.js@3.0.2"></script>
<script src="https://unpkg.com/chartjs-adapter-date-fns@2.0.0/dist/chartjs-adapter-date-fns.bundle.js"></script>
<script src="https://unpkg.com/chartkick@4.0.0/dist/chartkick.js"></script>
<script src="https://unpkg.com/chartkick@4.0.0"></script>
<script src="https://unpkg.com/react-chartkick@0.5.0"></script>

@@ -401,0 +401,0 @@ ```