mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-13 05:48:36 +03:00
wip: categoryGroups -> categories
This commit is contained in:
@@ -195,7 +195,7 @@ Stop and start the development process in terminal after you have added your tok
|
||||
unmarkPoint();
|
||||
app.selected.forEach(eventPoint => {
|
||||
if (isNotNullNorUndefined(eventPoint) && isNotNullNorUndefined(eventPoint.location)) {
|
||||
if (eventPoint.latitude && eventPoint.longitude) {
|
||||
if (eventPoint.latitude && eventPoint.latitude !== "" && eventPoint.longitude && eventPoint.longitude !== "") {
|
||||
const location = new L.LatLng(eventPoint.latitude, eventPoint.longitude);
|
||||
eventCircleMarkers[eventPoint.id] = L.circleMarker(location, {
|
||||
radius: 32,
|
||||
|
||||
@@ -597,20 +597,21 @@ export default function(app, ui) {
|
||||
* @param {Object} app: Redux state app subtree
|
||||
*/
|
||||
function updateAxis(domain) {
|
||||
categoryGroups = domain.categoryGroups
|
||||
const groupStep = (106 - 30) / categoryGroups.length;
|
||||
let groupYs = Array.apply(null, Array(categoryGroups.length));
|
||||
console.log(domain)
|
||||
const categories = domain.categories
|
||||
const groupStep = (106 - 30) / categories.length;
|
||||
let groupYs = Array.apply(null, Array(categories.length));
|
||||
groupYs = groupYs.map((g, i) => {
|
||||
return 30 + i * groupStep;
|
||||
});
|
||||
|
||||
scale.y = d3.scaleOrdinal()
|
||||
.domain(categoryGroups)
|
||||
.domain(categories)
|
||||
.range(groupYs);
|
||||
|
||||
axis.y =
|
||||
d3.axisLeft(scale.y)
|
||||
.tickValues(categoryGroups);
|
||||
.tickValues(categories);
|
||||
}
|
||||
|
||||
function update(domain, app) {
|
||||
|
||||
Reference in New Issue
Block a user