d3plus / d3plus-legend Goto Github PK
View Code? Open in Web Editor NEWAn easy to use javascript chart legend.
License: MIT License
An easy to use javascript chart legend.
License: MIT License
When Jenks breaks are too close together, it would be nice to show the scale as discrete buckets with range labels, as in this image:
This should be a mode that the user can toggle, and would only apply to "jenks"
and "buckets"
scales.
Currently, we get an illegible scale:
https://jsfiddle.net/5f639ph1/
Having trouble setting the text color for a color scale legend. Here's my config below:
colorScaleConfig: {
color: COLORS_GRADIENT,
scale: "jenks",
shapeConfig: {
fill: "#979797",
fontColor: "white",
labelConfig: {
fontColor: "white", // this doesn't work!
},
stroke: "#979797"
},
tickSize: 0,
titleConfig: {
textTransform: "uppercase"
}
}
And here is the rendered output:
Currently, on large screens, colorScale can get very wide when positioned horizontally. It would be great to be able to define a maxWidth
and center it horizontally in the available space.
(not sure if this belongs elsewhere but figured I would start here)
In reviewing some vizs for CNY I noticed an issue where certain vizs seems to have black/very dark areas that don't seem to match up with the legend colors?
The desired behavior is the following: depending on the data range being used to calculate the colorscale, I would like to conditionally set the scale type to linear or jenks. Something like the following:
colorScaleConfig {
scale: () => dataRange > 5 "jenks" : "linear"
}
label function appears to work different on the bars in the bar chart versus the legend below:
label: d => `${lookup[d["Living Arrangement"]]} in ${d.kind}`
I would have expected the labeling to work the same so that the same logic could be reused (maybe even the object to the legend should also contain a key in the object that is a values array that could be useful for adding summary stats in legend tooltips?)
Sometimes jenks breaks are very close together. In that case, a tooltip when hovering over a portion to show the break range would be fantastic.
Currently, we just get an illegible scale:
https://jsfiddle.net/5f639ph1/
Branch | Build failing π¨ |
---|---|
Dependency | d3-array |
Current Version | 1.0.2 |
Type | dependency |
This version is covered by your current version range and after updating it in your project the build failed.
As d3-array is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you itβs very likely also breaking them.
I recommend you give this issue a very high priority. Iβm sure you can resolve this πͺ
The new version differs by 6 commits .
94e197a
1.0.3
ee02e72
Update Rollup.
80ccbce
Merge branch 'patch-1' of https://github.com/dyst5422/d3-array
adb0901
Fix formatting.
035c3dd
Fix italics.
b4a9a9b
Update README.md
See the full diff.
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
Issue originally created by @cnavarreteliz in the d3plus-axis repo.
Hi, I was trying to use scale: jenks and the last tick in ColorScale doesn't appear
JSFiddle: https://jsfiddle.net/252k2gaa/2/
Legend box/labels should be positioned right to left.
They are currently positioned left to right, and the label padding is on the left hand side.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.