Comments (6)
@yj000018 the most difficult part of your idea is the ability to include images in the node arcs. This is related to http://github.com/vasturiano/sunburst-chart/issues/5 as you've already mentioned.
The difficulty is mostly due to the geometric calculation required to figure out how a image rectangle of arbitrary size/ratio can fit inside an arc.
from sunburst-chart.
from sunburst-chart.
@yj000018 you can customize the tooltip content in which ever way you'd like, including adding images or any HTML elements. Just use tooltipContent
, for example:
.tooltipContent(node => `<div>
<div>${node.label}</div>
<img src="${node.imgUrl}"></img>
</div>`)
from sunburst-chart.
from sunburst-chart.
from sunburst-chart.
@yj000018 the only elements currently supported as content are svg text DOM elements. No other HTML elements are supported, including links etc.
At some point I may add some functionality to allow inserting any custom type of (SVG valid) content in the arcs. That would probably address (all of?) your use cases. However, you'd still need to do some geometry calculations to figure out what can fit in each of the slices, to prevent overflows.
About the Excel question, the component simply takes in a piece of JSON data. If you have your data in another format like CSV for example, you can always convert it using some utility like d3-dsv.
from sunburst-chart.
Related Issues (20)
- Chart getting duplicated for every useEffect call in react app HOT 8
- M.svg.transition is not a function HOT 1
- Tooltips sometimes appear invisible when using browser zoom HOT 2
- Image or text in centre of chart
- focusOnNode is not a function HOT 3
- Labels not showing though it fits both angular or radial HOT 5
- Optionally truncate labels instead of hiding them entirely HOT 2
- Add Feature to Onclick HOT 3
- Tooltip is not showing HOT 5
- Event on click outer ring segment HOT 3
- Chart based on month, date, hour and minutes. HOT 10
- Posibility of change label style HOT 1
- Not able to change style in Angular.
- Support fully managed integration with React. Willing to contribute. HOT 1
- Rendering more charts HOT 2
- Sunburst folded until page refresh ( ERROR TypeError b.focusOnNode.__dataNode is undefined ) HOT 2
- How to stop onClick from overriding the default focusOnNode method? HOT 3
- Argument of type '(d: any, parent: any) => any' is not assignable to parameter of type 'Accessor<Node, string>'.
- Export svg
- Node size is not showing correctly according to the size value HOT 4
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 sunburst-chart.