Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStyling / Attributing #1338
Styling / Attributing #1338
Comments
|
Wouldn't the inclusion, and wide usage, of both style and attribute params actually increase the ambiguity instead of resolving it. If we have two ways of accomplishing the same thing, then we would need to come up with a priority order, which may not be immediately obvious to the caller. I guess it just falls back to the inherit precedence in the svg elements themselves.
The reasoning that the post arrives at is that the choice to use attributes or styles comes down to whether it represents 'content' or 'style' Looking at the
|
|
I think the other thing that we may want to consider, is how similar we want our svg and canvas apis? |
A number of the series have a somewhat inconsistent notion of style. In particular some series use style as a way to apply attributes to rows of series (such as the LabelSeries), while others apply them as inline styles. If there is a major versioning happening soon it might be a good opportunity to clear up that part of the api.
In particular I suggest that all (SVG) series should feature both a style param as well as an attributes param. This will hopefully resolve some ambiguity found across these two (equal valid!) usages.