Closed idahogurl closed 7 years ago
Subject to the little qualifier in the next paragraph, I suspect your question should be addressed as follows:
Use scaleQuantile<string>().domain(...).range(...)
to create a scale with string range. scaleQuantile()
and the corresponding interface ScaleQuantile
both accept one generic referring to the data type of the range. The domain is numeric by design. Hope this addresses your question. Otherwise please see below
In general, since this repo is deprecated in favor of the completely migrated and more current definitions now housed under DefinitelyTyped (DT), it is better to post questions/how-tos on StackOverflow. If it is a genuine suspected issue with a particular definition file, please open an issue on DT and ping me there so I can look at it. 😄
I am working on a heat map project where the domain is the min and max temperature. All the examples I've found use a quantile scale with a range set to a list of HEX RGB colors. The typing for scaleQuantile will not let me use numbers for the domain and strings for the range. I get a type error.
Does the typing have a bug? Could you advise of the correct scaling to use?