This shows what happens when using the us county data json from http://bl.ocks.org/mbostock/4122298 with Datamaps. Rendering does work properly with https://raw.githubusercontent.com/jgoodall/us-maps/master/topojson/county.json, but it takes upwards of 10 seconds to draw.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transmitting file data .......................................svn: E165001: Commit failed (details follow): | |
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output: | |
[ERROR] 3672:15:invalid property id | |
[ERROR] 3672:16:syntax error | |
[ERROR] 3673:19:syntax error | |
[ERROR] 3674:15:syntax error |
Demo of a bug that happens when you trigger updateChoropleth
from a geography click. Fill is updated properly, but per the mouseout functions found at https://github.com/markmarkoh/datamaps/blob/master/src/js/datamaps.js#L523 & https://github.com/markmarkoh/datamaps/blob/master/src/js/datamaps.js#L252, when you mouseout from the just-selected geography, the fill reverts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const template = ` | |
<ul> | |
<li ng-repeat=”item in controller.state”> | |
{{ item.label }} - {{ item.value }} | |
</li> | |
</ul>`; | |
export default function renderController($scope, $ngRedux) { | |
const disconnect = $ngRedux.connect((state) => { | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// initial app state can be supplied (or bootstrapped) here | |
const defaultState = { | |
items: [], | |
}; | |
/** | |
* @params | |
* state {object} - this is the current state of this branch of the store (store.data) | |
* action {object} - the instructions from the component, commonly { type, data } | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import addData from 'addData'; | |
export default function inputController($scope, $ngRedux) { | |
// 'connect' returns an unsubscribe function, that we use when the directive is destroyed. | |
// values from the Redux store are bound to 'this' (or, the directive's scope), | |
// and updates on store updates | |
const disconnect = $ngRedux.connect((state) => { | |
return { | |
state: state.data, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function(data) { | |
return { | |
type: 'ADD_DATA', | |
data, | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const ADD_DATA = ‘ADD_DATA’; | |
export const REMOVE_DATA = ‘REMOVE_DATA’; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ParentComponent extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
data; // data lives here | |
}; | |
this.setStore = this.setStore.bind(this); | |
} | |
// this gets called when the promise resolves in DataComponentOne |
OlderNewer