Giter Club home page Giter Club logo

d3plus-geomap's Issues

changing data and colorScale causes error

Expected Behavior

I should be able to change the data provided to .data( ) and the associated variable passed to .colorScale( ) to update the map.

Current Behavior

Currently, certain combinations will make the map empty.

Steps to Reproduce (for bugs)

http://jsfiddle.net/14L2qn89/17/

Your Environment

  • Browser Name: Chrome
  • Operating System and Version: macOS High Sierra

attribution for OpenStreetMap

Hi all,

I noticed that in many pages using this library, default CARTO tiles are used, which are based on OpenStreetMap data, without giving proper attribution. Is it possible to have an easy way to add attribution within this library?

Thanks,

Issue with d3plus-geomap.v0.4 and IE 11 (as well as others)

Hi,
I am having issues with Internet Explorer (e.g. IE11) and probably all others post IE 8 with the map not rendering and only "Loading Visualization Powered by D3plus" displaying. The debugged error is " Object doesn't support property or method 'includes' File: d3plus-geomap.v0.4.full.min.js, Line: 7, Column: 105644". Having a quick look through the JS, there are a significant number if includes that are involved rather than the odd one and IE doesn't understand includes

Expected Behavior

The map should display in IE like it does in Chrome, FF or any other real browser

Current Behavior

"Loading Visualization Powered by D3plus" and the map does not load

Steps to Reproduce (for bugs)

  1. Attempt this is Chorme/FF etc https://jsfiddle.net/ozn3s2f6/ and it should work
  2. Attempt the same in IE https://jsfiddle.net/ozn3s2f6/ and it fails to fully load

Your Environment

IE11 in a SOE environment as an example however it appears to affect all IE later environments

color scale does not work when there is only 1 value

Expected Behavior

When using the colorScale method, and there is only 1 data point available, the scale gets rendered with no values and the topojson is rendered as black.

Current Behavior

The color scale should not appear, and the topojson should be colored the max color in the scale.

Steps to Reproduce (for bugs)

https://jsfiddle.net/2zb6retc/9/

Your Environment

  • Browser Name: Chrome
  • Operating System and Version: macOS Sierra

map that has single place with data doesnt render properly

Expected Behavior

Map renders, but with only 1 place (colored as either the highest or lowest value in the scale)

Current Behavior

Map renders black and gets stuck saying "Loading visualization / powered by d3plus"

screen shot 2018-08-02 at 4 15 29 pm

Geomap.js:76 Uncaught TypeError: this$1._colorScaleClass._colorScale is not a function
    at Geomap.fill (Geomap.js:76)
    at eval (configPrep.js:23)
    at Function.styleLogic (Shape.js:208)
    at SVGPathElement.eval (attr.js:30)
    at Selection.__webpack_exports__.a [as each] (each.js:5)
    at Selection.__webpack_exports__.a [as attr] (attr.js:54)
    at Path._applyStyle (Shape.js:212)
    at Selection.__webpack_exports__.a [as call] (call.js:4)
    at Path.render (Path.js:61)
    at Geomap._draw (Geomap.js:364)

Steps to Reproduce (for bugs)

  1. https://jsfiddle.net/jonathan_dw/cedntuxj/1/
  2. Note error in javascript console

I tried both the uniform and jenks scales.

Your Environment

  • Browser Name: Chrome 67
  • Operating System and Version: OS X 10.13.6

labels for jenks breaks overlap with some narrow maps

The legend labels for some maps using jenks breaks overlap with each other which can make the legend hard to read.

Expected Behavior

To have labels avoid overlapping. Either,

  1. increased vertical spacing if insufficient horizontal space available or
  2. perhaps if too narrow, some labels could only appear on hover?

just some ideas

Current Behavior

screen shot 2017-10-10 at 3 56 04 pm

Steps to Reproduce (for bugs)

  1. https://jsfiddle.net/neuyy41a/

Your Environment

OSX / Chrome

include a shortcut for largestRect label placement

.shapeConfig({
    label: d => d.id,
    labelBounds: (d, i, s) => {

        const poly = d3plus.largestRect(s.points);

        return poly ? {
            x: poly.cx - poly.width / 2,
            y: poly.cy - poly.height / 2,
            width: poly.width,
            height: poly.height
        } : null;

    }
})

when a geomap is provided an empty array for data an error occurs

d3plus-legend.js:161 Uncaught TypeError: Cannot read property 'length' of undefined
    at fillMatrices (d3plus-legend.js:161)
    at ckmeans (d3plus-legend.js:237)
    at ColorScale.render (d3plus-legend.js:354)
    at Geomap.drawColorScale (d3plus-viz.js:150)
    at Geomap._draw (d3plus-viz.js:875)
    at Geomap._draw (d3plus-geomap.js:222)
    at Queue.eval [as _call] (d3plus-viz.js:995)
    at maybeNotify (queue.js:115)
    at Queue.awaitAll (queue.js:46)
    at Geomap.render (d3plus-viz.js:994)

hook up brush to zoom

Logic was implemented manually in Data USA, and the code exists in d3plus but is just commented out.

error in resetting colorScale

Seems to be a bug in resetting the colorScale back to nothing, here's my config:

    shapeConfig: {
      Path: {
        fill: d => colorScale(d[val])
      }
    },
    colorScale: false
  };

And here's the console error:

ckmeans.js:149 Uncaught TypeError: Cannot read property 'length' of undefined
    at fillMatrices (ckmeans.js:149)
    at __webpack_exports__.a (ckmeans.js:225)
    at ColorScale.render (ColorScale.js:118)
    at Geomap.__webpack_exports__.a (_drawColorScale.js:50)
    at Geomap._draw (Viz.js:336)
    at Geomap._draw (Geomap.js:159)
    at Queue.eval [as _call] (Viz.js:486)
    at maybeNotify (queue.js:115)
    at eval (queue.js:86)
    at eval (load.js:50)

add an option to only draw topojson paths for areas with data

Feature request: add an option to only draw boundaries for areas with data. This could be helpful when visualizing a map in conjunction with dynamic API calls for variables that may only cover certain tracts for example, and instead of showing many empty tracts it could be nice to simply hide those without data.

bug with using both topojson and points

I'm using the geomap to display a choropleth, and it's working great. Since the choropleth overlays the geography below, it's difficult to orient where you are on the map. I'd love to be able to put a marker on the map that represents a point of interest, and that marker should overlay the choropleth. I tried doing same w/ points on a map, but it seems that points and choropleth are mutually exclusive -- you can have one or the other.

Bonus: support arbitrary marker images.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.