Using other shapes than "circles" for line points #question
See original GitHub issueDescription
This is more a question rather than an issue.
I’d like to be able to use other shapes than svg circle
for the “line points” used in Line and Spline charts.
Since circle
seems to be hardcoded in many places, I thought using the onafterinit
callback to do the following:
- Select chart lines
- Get circle positions (is this possible through the API?)
- Append the “desired shape” (in my case an svg
rect
) and set it’s attributes - Remove the circles (or hide them via API)
What do you think of the idea?
Would this be an interesting feature for the library?
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
10.5 Circles 5. Intersection of a Line and a Circle (Discriminant)
Here is Higher Maths Chapter 10 - Circles. Lesson 5 of 6: Intersection of a Line and a CircleI am using a mix...
Read more >Finding the maximum number of pieces created when 6 lines ...
The question being answered is: What is the maximum number of pieces formed when a circle is divided by six lines ?
Read more >Circles on SAT Math: Formulas, Review, and Practice
For SAT Math, you'll need to master circles - radius, area, circumference, and radians. Learn all about circles here and practice on real ......
Read more >Circles – Explanation & Examples - The Story of Mathematics
One of the important shapes in geometry is the circle. A geometry-based exam will have most of the questions consist of rectangles, triangles,...
Read more >Shapes that can be cut in half by any line/plane going through ...
Clearly, if it is point-symmetric, then every line through the origin will split the shape in half. On the other hand, assume that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@netil, thanks for the feedback.
I think we could “prioritize” which way of drawing things is used when several options are provided.
I’ll try to illustrate this with “pseudo code”.
I also the number of arguments passed the
point_create
andpoint_update
functions could be reduced, and I am updating my example, which I’ll give you an update on shortly.Thanks @netil,
I understand you have some concerns about this suggestion, and also agree that in order to implement this feature, the developer should have some idea on how to implement it. Documenting and providing examples, would make things easier.
I also agree that billboard is popular because of it’s simplicity, but I also think that allowing the developer to customize the “look and feel” of the charts is a bonus.
One example of customizing billboard is the possibility to change the “default colors” that are provided by billboard by specifying the
color_pattern
option.Having the same flexibility for “custom shapes” would be great, so I guess we have several options:
Allow developers to provide code that renders their “custom shapes”. In this case, if no options are specified, billboard provides some defaults to make sure things are rendered correctly, on the other hand if those options are provided, it would be the developer’s responsibility.
Support a set of custom shapes, for example
circle
andrectangle
and render the corresponding shape accordingly.Tell me if you think one of these options is a viable solution and thanks again for your time.