Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@density/chart-count-graph

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@density/chart-count-graph - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

dist/index.js

@@ -165,3 +165,3 @@ 'use strict';

var yAxis = d3.axisLeft(yScale).ticks(3).tickSizeOuter(0).tickSize(graphWidth);
var yAxis = d3.axisLeft(yScale).ticks(largestCount - smallestCount < 5 ? 1 : 3).tickSizeOuter(0).tickFormat(d3.format('.0f')).tickSize(graphWidth);

@@ -168,0 +168,0 @@ // Remove all axes that are already drawn

@@ -266,4 +266,6 @@ 'use strict';

var currentCount = 0;
this.interval = setInterval(function () {
_this2.setState({ data: [].concat(_toConsumableArray(_this2.state.data), [{ count: Math.floor(Math.random() * 20), timestamp: (0, _moment2.default)().toISOString() }]) });
currentCount += Math.random() > 0.5 ? 1 : -1;
_this2.setState({ data: [].concat(_toConsumableArray(_this2.state.data), [{ count: currentCount, timestamp: (0, _moment2.default)().toISOString() }]) });
}, 1000);

@@ -270,0 +272,0 @@ }

@@ -174,4 +174,5 @@ import './styles.scss';

const yAxis = d3.axisLeft(yScale)
.ticks(3)
.ticks(largestCount - smallestCount < 5 ? 1 : 3)
.tickSizeOuter(0)
.tickFormat(d3.format('.0f'))
.tickSize(graphWidth);

@@ -178,0 +179,0 @@

{
"name": "@density/chart-count-graph",
"version": "1.0.6",
"version": "1.0.7",
"description": "Count Graph chart",

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

@@ -271,6 +271,8 @@ import * as React from 'react';

componentDidMount() {
let currentCount = 0;
this.interval = setInterval(() => {
currentCount += Math.random() > 0.5 ? 1 : -1;
this.setState({data: [
...this.state.data,
{ count: Math.floor(Math.random() * 20), timestamp: moment().toISOString() }
{ count: currentCount, timestamp: moment().toISOString() }
]});

@@ -277,0 +279,0 @@ }, 1000);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc