Comments (8)
Thank you @martynasma,
I was able to find an alternate for the above mentioned.
Few things I couldn't get was for the line series which is using bullets for getting events, for sunburst and radar chart, we'll have a separate discussion since this gets more chart specific and cluttered over here.
I'll try proceeding with bullets for line series. We might close this issue for now.
Thanks!
from amcharts5.
Area & Line - No right click event. How do I get the value from that data point? even I couldn't get the tooltip content.
LineSerries does not have individual elements to add click events on.
You might need to consider adding bullets. They can be transparent if you don't want them displayed.
https://www.amcharts.com/docs/v5/concepts/common-elements/bullets/
Combo - I could get the data of column but I couldn't get value of line from a data point.
Stacked - I am able to get only the whole column value and not the split value.
Sunburst & Radar - I was not able to get the desired data.
Pie of pie & Pie of bar - I was not able to get the parent series of the sub series.
Please make sure you add events on a series item, e.g.:
columnSeries.columns.template.events.on("click", function(ev) {
console.log(ev.target.dataItem);
});
pieSeries.slices.template.events.on("click", function(ev) {
console.log(ev.target.dataItem);
});
from amcharts5.
I tried this approach already for pieSeries but the event isn't captured by the listener.
columnSeries.events.on("rightclick", function (event: any) {
console.log("Column event ->", event;
});
Only this is capturing my event. That too doesn't hold it's parent.
from amcharts5.
As per my previous reply, you need to add those events column templates, rather than series directly:
columnSeries.columns.template.events.on("rightclick", function (event: any) {
console.log("Column event ->", event);
});
from amcharts5.
It doesn't work. Following is the code:
columnSeries.columns.template.events.on("rightclick", function (event: any) {
console.log("Event =>", event);
});
Also not able to get the parent slice data.
PieSeries:
pieSeries.slices.template.events.on("rightclick", function (event: any) {
console.log("Event =>", event);
});
The event listener is not getting it.
from amcharts5.
The code is good. Make sure the events are created before data is set on series.
from amcharts5.
Checked. Not resolved yet.
from amcharts5.
Can you post your chart on CodePen?
from amcharts5.
Related Issues (20)
- Drawing is not getting extended on Lazy Loading in the new version [5.10.3] HOT 2
- Can we sync the multiple stockchart HOT 1
- Chart stock with large data HOT 5
- ValueAxis tooltip position HOT 1
- Unable to close indicators stockchart HOT 3
- Question: V5 JSON Config to hide PieChart slices label and use circles as legend marker HOT 13
- Responsive chart issue HOT 1
- Erase the rounded ends of the shapes after drawing. HOT 2
- Clustered columns chart Is very slow with large data HOT 1
- Drawing event "drawingunselected" execute first HOT 11
- Unable to create Axis range in stockchart HOT 10
- XY Chart with categories not showing all categories after upgrade from 5.9.13 to 5.10.x HOT 1
- Replicating a chord diagram HOT 2
- Rangechanged event not firing as expected HOT 3
- In Bar chart how to align Labels to Bar when few labels are shown on axis? HOT 1
- Possible to sync Orderflow chart with the stockChart HOT 3
- Add LICENCE file to the root of the folder for easier to find. HOT 1
- Bug Drawing Label don't appear letters HOT 1
- Prevent focus in Label Tool Drawings HOT 1
- How I can get the DateAxis label as HTML? HOT 5
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.