Comments (5)
It's a really intriguing bug. If you set Object.prototype._hello = "x"; and try the first test plot (aaplBollinger), it draws 1 line on the y axis. If you set Object.prototype._hello = "xxxxx" it draws 5 lines!
It could happen on any of the many places in our code where we iterate on an object's keys with for (key in object)
.
I don't think there is anything to fix here, but I'm curious as to where this happens.
from plot.
That is in order to get most natural grammar by patch functions to prototype.
For example, the function pick in underscore use.
_.pick({name: 'moe', age: 50, userid: 'moe1'}, 'name', 'age');
And in ramda, it use
R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4});
I would argue that the most natural way shall be either
{a: 1, b: 2, c: 3, d: 4}.pick(['a', 'b'])
or
{a: 1, b: 2, c: 3, d: 4}.pick('a', 'b')
from plot.
You shouldn’t modify global prototypes such as Object.prototype. All bets are off when you do that!
from plot.
Thanks a lot @Fil and @mbostock for clarification. Does D3 has this prerequisite as well?
from plot.
Like I said, all bets are off. There’s no way of knowing how any library will behave if you start modifying global prototypes.
from plot.
Related Issues (20)
- the dodge layout should respect frameAnchor
- the dodge layout crashes if r is a non-positive constant
- Feature request - Support for shared zooming and tooltip in facet HOT 2
- x and y clip modes HOT 1
- differenceX and shiftY
- monotone X for lineY?
- Plot.auto - TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event' HOT 1
- Selection of plot data using sliders HOT 1
- Clamp option for tooltip?
- "element" transform to complement pointer transform
- The interval option for line and area perhaps should round down rather than center
- Save / export stand-alone SVG-file with legend
- Density reducer
- Disabling the stroke channel from the tooltip does not work for Plot.line() HOT 1
- tip: true is not working on vue3 ssr HOT 1
- Download option for embedded plot HOT 3
- Bug: areaY tip/pointer position wrong for stacked data
- remove the dark mode toggle?
- The group & bin transform sort option should support descending shorthand
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plot.