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

@flourish/chart-layout

Package Overview
Dependencies
Maintainers
11
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flourish/chart-layout - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{
"name": "@flourish/chart-layout",
"version": "3.0.1",
"version": "3.0.2",
"description": "Create axes",

@@ -5,0 +5,0 @@ "main": "chart-layout.js",

@@ -0,1 +1,4 @@

# 3.0.2
* Improve fallback range for log scales
# 3.0.1

@@ -2,0 +5,0 @@ * Fix `defaultDatetimeParser` function

import { scaleLinear, scaleLog, scalePoint, scaleTime } from "d3-scale";
var LOG_SCALE_FACTOR = 1000;
function getPointScale(data) {

@@ -60,6 +62,6 @@ var scale = scalePoint().domain(data.unique()).padding(0.5);

if (extent[0] <= 0) {
if (extent[1] > 0) extent[0] = extent[1] / 10;
if (extent[1] > 0) extent[0] = Math.min(1, extent[1]/LOG_SCALE_FACTOR);
else extent[0] = 1;
}
if (extent[1] <= 0) extent = 10 * extent[0];
if (extent[1] <= extent[0]) extent[1] = LOG_SCALE_FACTOR * extent[0];
var scale = scaleLog().domain(extent).nice();

@@ -66,0 +68,0 @@ var domain = scale.domain();

Sorry, the diff of this file is too big to display

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