Socket
Socket
Sign inDemoInstall

@fishawack/lab-d3

Package Overview
Dependencies
4
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.1 to 2.4.0

2

package.json
{
"name": "@fishawack/lab-d3",
"version": "2.3.1",
"version": "2.4.0",
"description": "Abstract layer built on top of d3",

@@ -5,0 +5,0 @@ "vars": {

@@ -233,6 +233,11 @@ ## Background

### v2.3.1
### 2.4.0
* Can now pass lat/long as a start position to maps
* Can set the projection type for World map
* Can set the clip angle for map charts
### 2.3.1
* New prepend option to pushes new levels onto the top rather than appending to bottom
### v2.3.0
### 2.3.0
* BarStacked now handles labels differently, the lowest level label sits on the bar instead of underneath

@@ -242,9 +247,9 @@ * Added padding to BarStacked width on labels so they don't go right to bounds

### v2.2.4
### 2.2.4
* Harvey ball reset bug fix
### v2.2.3
### 2.2.3
* Fixed bug in callback reset where it doesn't check if there actually is an active state before resetting
### v2.2.2
### 2.2.2
* `callback.reset` on the maps now correctly resets the active state

@@ -255,18 +260,18 @@ * Can now specific min/max zoom level on maps

### v2.2.1
### 2.2.1
* structure can now be a function which will be passed in directly as the d3 tickFormat function would usually be called
### v2.2.0
### 2.2.0
* tickFormat and tickFormatCustom changed to match value.format implementation
### v2.1.9
### 2.1.9
* Table update fix where classes weren't updated on rows
### v2.1.8
### 2.1.8
* Brush now has clickRecenter attribute
### v2.1.7
### 2.1.7
* Added index.js into package.json files array so it gets published
### v2.1.6
### 2.1.6
* Transpile library to /src folder before publish

@@ -278,20 +283,20 @@ * Map data moved to more logical location

### v2.1.5
### 2.1.5
* Moved from UMD modules to ES6 exports
### v2.1.4
### 2.1.4
* Shared localVariables bug fix
### v2.1.3
### 2.1.3
* Axis animation fix
### v2.1.2
### 2.1.2
* BarStacked chart type
* calculateAxis call optimized
### v2.1.1
### 2.1.1
* Inject at levels/shared now works similar to render/init
* Internally rewritten localVariables to make it better for injected vars
### v2.1.0
### 2.1.0
* Seeded random number to Shared

@@ -309,3 +314,3 @@ * Scatter has a random number element that can spread the scatter points

### v2.0.7
### 2.0.7
* Key chart updates

@@ -315,26 +320,26 @@ * att.plot.label can now be changed

### v2.0.6
### 2.0.6
* Key chart
* Coords in maps are now sized based on width
### v2.0.5
### 2.0.5
* Scatter can now override symbolsSize on value
* Maps now have coords attribute
### v2.0.4
### 2.0.4
* Fixed wrapping of bar labels
### v2.0.3
### 2.0.3
* valueFormat now doesn't try to call d3.format on non numbers
### v2.0.2
### 2.0.2
* Reset method now available on all charts
### v2.0.1
### 2.0.1
* World map now uses globe projection
### v2.0.0
### 2.0.0
* Npm release under @fishawack/lab-d3
### v1.13.1
### 1.13.1
* Chart without a width set now automatically sets its width based on parents offsetWidth

@@ -345,14 +350,14 @@ * New Area chart

### v1.13.0
### 1.13.0
* Chart map now groups circle/path/text all in same g tag
* Statemap data now no longer in alpha order, in the order that stops lines going underneath paths
### v1.12.2
### 1.12.2
* Chart map now correctly sets translateExtent, stops jumping and makes margin work after zooming in and out
### v1.12.1
### 1.12.1
* Chart map now has zoom in/out prototype functions
* Chart map now has select specific function
### v1.12.0
### 1.12.0
* Default values for format for some charts

@@ -363,3 +368,3 @@ * Charts now remove their own class name on destroy

### v1.11.0
### 1.11.0
* valueFormat changed to value.structure

@@ -369,3 +374,3 @@ * Can now have value.format and can be overridden at data level

### v1.10.1
### 1.10.1
* Text chart can now have formatValue

@@ -375,3 +380,3 @@ * Map no longer resizes font-size to 16 pixels, uses em

### v1.10.0
### 1.10.0
* Fixed percentage calculation on all charts for valueFormat

@@ -381,22 +386,22 @@ * Renamed textFormat to valueFormat for text chart

### v1.9.12
### 1.9.12
* Dial chart slice now works of min/max values
### v1.9.11
### 1.9.11
* Dial chart arc now accurate
* Dial chart atts now not hard coded
### v1.9.10
### 1.9.10
* More relative path fixes
### v1.9.9
### 1.9.9
* Requires now use relative paths
### v1.9.8
### 1.9.8
* Updated prototype dial
### v1.9.7
### 1.9.7
* Added prototype dial
### v1.9.6
### 1.9.6
* Ring now animates in and then to position

@@ -406,14 +411,14 @@ * d3 update pattern "old" now passed into buildElements for all charts

### v1.9.5
### 1.9.5
* Ring can have size modifier passed in
* Ring offset can work off alpha index if color set in data value
### v1.9.4
### 1.9.4
* Ring chart now can have offset att and overridden at level 1
### v1.9.3
### 1.9.3
* Ring chart can now have minmax setting for miximum stroke width
* Ring chart can now have 0 size property
### v1.9.2
### 1.9.2
* Ring chart level 1

@@ -423,6 +428,6 @@ * Can pass in positions to Ring chart

### v1.9.1
### 1.9.1
* Ring chart
### v1.9.0
### 1.9.0
* colorsKey will fallback to using index if no key found

@@ -440,3 +445,3 @@ * Shared now has init function that is only called when the first init called on any chart

### v1.8.0
### 1.8.0
* Scatter/Line symbols now above the min/max

@@ -453,3 +458,3 @@ * Harvey ball fade circle is now path that can have innerRadius

### v1.7.0
### 1.7.0
* Fixed bug when min/max was 0 not rendering

@@ -463,11 +468,11 @@ * Line graphs can now have min max

### v1.6.0
### 1.6.0
* Prefixed classes added via lab-d3 with a labD3__ keyword. The applies to tablet / text / tumbler
* Fixed table chart when added updated class wasn't added space afterwards
### v1.5.1
### 1.5.1
* tickValues can now be set on charts
* line chart now uses correct index
### v1.5.0
### 1.5.0
* Config grunt bumped to v3.1.11

@@ -477,31 +482,31 @@ * Fixed bug where the call to _additionalSetup for chart_group wasn't getting called when invoked via bar charts as bar chart wasn't calling super function

### v1.4.7
### 1.4.7
* Scale animation back out, not currently possible with scale setup
* Gannt missing a required selection module
### v1.4.6
### 1.4.6
* Scale is now animated again, seems to have been fixed in a d3 update
* tickFormat can now take an object with a suffix and a prefix
### v1.4.5
### 1.4.5
* showBaseline attribute for bar chart
* barChart group axis fake tick -> fake domain
### v1.4.4
### 1.4.4
* chockData fix for bar chart min max
### v1.4.3
### 1.4.3
* chockData now available for Box chart
### v1.4.2
### 1.4.2
* Box chart
### v1.4.1
### 1.4.1
* Babelify now incorporated, moduled out even further
* Base class now added at root, text only chart types no longer get guff
### v1.4.0
### 1.4.0
* Fixed polyfill import
### v1.3.9
### 1.3.9
* Bumpbed d3 to version 5

@@ -511,7 +516,7 @@ * Moduled out all charts, only pulling in whats needed

### v1.3.8
### 1.3.8
* Fixed y position of bar value label for values with 0
* chockData attribute now added to render a chart with 0 values
### v1.3.7
### 1.3.7
* Fixed space padding on auto rotated y axis

@@ -521,3 +526,3 @@ * Can have auto axis null on group scale

### v1.3.6
### 1.3.6
* Bar chart / Box chart grouped scale now available for all charts

@@ -530,30 +535,30 @@ * Grouped scale can now be flipped correctly

### v1.3.5
### 1.3.5
* Fixed text positioning on bar charts for negative values
* Added bundled package as a way to use lab D3
### v1.3.4
### 1.3.4
* Puerto Rico projection moved
### v1.3.3
### 1.3.3
* Puerto Rico built into statemap
### v1.3.2
### 1.3.2
* Table no longer builds from scratch each render, uses d3 data binding
### v1.3.1
### 1.3.1
* Lib for geoAlbersUsaPr moved to more suitable location
### v1.3.0
### 1.3.0
* State map now include Puerto Rico
### v1.2.1
### 1.2.1
* Re-deployed
* Fixes for map reset attribute callback calls.
### v1.1.0
### 1.1.0
* Lower now has a threshhold instead of being everything after middle.
* Any map feature thats missing its data when data is piped in now has missing class applied
### v1.0.0
### 1.0.0
* Initial release

@@ -108,3 +108,3 @@ "use strict";

if (att.zoom.click) {
if (local.temptemp) {
if (att.spherical) {
var country = local.geometry.selectAll(".feature path");

@@ -161,3 +161,3 @@ var point = d3.geoCentroid(d);

if (local.temptemp) {
if (att.spherical) {
var rotate = d3.interpolate(hold, [-point[0], -point[1]]);

@@ -206,3 +206,3 @@ d3.transition().duration(att.transitionSpeed).tween("rotate", function () {

if (local.temptemp) {
if (att.spherical) {
var country = local.geometry.selectAll(".feature path");

@@ -251,3 +251,3 @@ var rotate = d3.interpolate(local.projection.rotate(), [0, 0]);

if (local.temptemp) {
if (att.spherical) {
/*local.geometry.attr("transform", {

@@ -299,3 +299,5 @@ k: currentEvent.transform.k,

min: 1,
max: 8
max: 8,
long: 0,
lat: 0
},

@@ -349,3 +351,16 @@ anchorRadius: 15,

local.zoom.translateExtent([[local.margin.left, att.margin.top], [local.width + att.margin.right, local.height + local.margin.top + att.margin.bottom]]);
local.projection.fitSize([local.width, local.height], local.geoJson);
local.projection.fitSize([local.width, local.height], local.geoJson); // Default start position of the map
var startPosition = [local.width * 0.5, local.height * 0.5];
if (att.zoom.lat || att.zoom.long) {
startPosition = local.projection([att.zoom.long, att.zoom.lat]);
}
var x = startPosition[0];
var y = startPosition[1];
var scale = att.zoom.min,
translate = [local.width / 2 - scale * x, local.height / 2 - scale * y];
local.chart.call(local.zoom.transform, d3.zoomIdentity.translate(translate[0], translate[1]).scale(att.zoom.min)); // Setup features
var selection = local.geometry.selectAll(".feature").data(local.geoJson.features);

@@ -352,0 +367,0 @@ var group = selection.enter().append('g').attr('class', function (d) {

@@ -24,7 +24,9 @@ "use strict";

Shared.extend(this.store, {
projection: d3.geoOrthographic().clipAngle(90),
geoJson: Data_World,
temptemp: true
projection: null,
geoJson: Data_World
});
this.att({
projection: 'Orthographic',
clipAngle: 90,
spherical: true,
hide: {

@@ -37,2 +39,17 @@ labels: true

Worldmap.prototype = Object.create(Chart_Map.prototype);
Worldmap.prototype.init = function () {
var local = this.store,
att = local.att,
chart = local.chart;
if (local.inited) {
return this;
}
local.projection = d3["geo".concat(att.projection)]().clipAngle(att.clipAngle);
Chart_Map.prototype.init.call(this);
return this;
};
export default Worldmap;
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc