Comments (2)
Well, circle
holds a template object, which is used to create actual bullets, but is not drawn on screen. So you would need to dig for actual bullet and display tooltip for it.
Furthermore, there's only a single Tooltip
object for the whole series, so if you want to show multiple tooltips, you will need to create an individual tooltip for each bullet.
var circle = am5.Circle.new(root, {
radius: 7,
tooltipText: "Drag me!",
cursorOverStyle: "pointer",
tooltipY: 0,
fill: am5.color(0xffba00),
stroke: root.interfaceColors.get("background"),
strokeWidth: 2,
draggable: true,
tooltip: am5.Tooltip.new(root, {})
});
showTooltipsButton.addEventListener('click', () => {
am5.array.each(pointSeries.dataItems, function(dataItem) {
am5.array.each(dataItem.bullets, function(bullet) {
console.log(bullet)
bullet.get("sprite").showTooltip();
})
})
});
One other thing, you should probably move out code that adds "click" handler to your custom button out of the bullet creation function.
Right now it will add multiple click events for each bullet created.
https://codepen.io/team/amcharts/pen/8e3ea83001aa919e036f5df3e3ae3111?editors=0010
from amcharts5.
Thanks, you help me, it works!
from amcharts5.
Related Issues (20)
- ValueAxis is not displaying full value HOT 1
- Infinite loop when attemp to clear series.data HOT 2
- How to use the series legend buttons HOT 6
- Series.getDataById() using name as id instead of using custom uid HOT 2
- Setting all data and keeping disposed data disposed or completely remove them post-cleanup HOT 1
- Set series tooltip in a fixed position and higher than others series tooltips HOT 3
- Adding tooltip to ZoomOut Button HOT 3
- Is it possible to avoid using the .setAll() method when adding data dynamically to a force directed chart? HOT 4
- Can we extend VolumeProfile indicator ( custom indicators interface)?
- Date Axis group data property HOT 4
- Number.MAX_SAFE_INTEGER as AxisRange's endValue HOT 1
- How to change the modal title & legend of indicators stockchart HOT 1
- Not able to measure the column actual width and label width HOT 1
- [XYChart] Possibiity to move series left or right with zoomX enabled HOT 3
- Not able to measure the column bar width and label width in amcharts5 HOT 7
- Line graph does not display correctly in Firefox HOT 2
- High memory usage when using the RSI indicator. HOT 1
- Documentation enhancement : Indicator & drawing Calculation info HOT 3
- How to colour the label fill with gradient (amcharts5) HOT 4
- when the pie chart slices are even like 50%, the pointer line got disappears.
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 amcharts5.