Comments (2)
@githubdd7 you can keep track of when the chart changes focus, by attaching a listener to the .onClick(node => ...)
event. You can also extract the current node in focus simply by calling .focusOnNode()
without any arguments.
If you know the node that is currently in focus, you know that the node in the center is its parent, which you can access by doing node.__dataNode.parent.data
(if node.__dataNode.parent
is null
you're at the top level).
Once you know which node is at the center, you can style it selectively whichever way you wish by calling the usual accessor methods like .color(node => ...)
or .label(node => ...)
.
from sunburst-chart.
Thank You @vasturiano
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
- Styling colors
- 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.