You are not logged in.
Hello everyone!
I'm new with amcharts, and I couldn't figure out how to click an item then do an action. The clicked item in the chart should look bigger with different color (choosed by the user with colorpicker).
Note: I'm new with flex 4 in general, and I'm using AmSerialChart and AmStockChart.
Thanx
Offline
If you want to highlight the clicked bullet, you can set up your graph to use bulletSizeField and colorField. Then just update corresponding properties of the datapoint data object upon click.
http://flex.amcharts.com/class_referenc … tSizeField
Offline
I've done this:
private function handleGraphItemClick(event:GraphEvent):void{
event.item.bulletSize=11;
event.item.color=cp_chart_marking.selectedColor;
var graph:AmGraph = event.graph as AmGraph;
graph.setStyle("fillAlphas",[0]);
It works fine with serial but not with stock. Also how can I un-highlight the item?
I'm still trying. Thank you for your help :)
Offline
Hi again.
Is there any way to apply what I need on amstock chart?, or how to map amserial chart with datefield
I NEED HELP!
Last edited by hope (2012-07-08 07:49:39)
Offline
The same technique should work for Stock chart as well. With one caveat: it won't work when chart is in in mode when it's grouping datapoints. This occurs when there are more datapoints in the selected time scope than it is set in CategoryAxesSettings.maxSeries (default 150)
http://flex.amcharts.com/stock_class_re … #maxSeries
If you want to turn off grouping of datapoints, you can set maxSeries to zero.
"Unmarking" of bullet is essentially the same as marking it: just unset the specific datapoint's bulletSize fields.
Alternatively, please consider using Events for marking specific points on the graph.
Offline
It worked. Thank you :)
But still I didn't figure out how to "unmarked" it. I tried to use double click but it didn't work.
What should I do?
Offline
Do you mean after you set the custom field in your data to undefined the chart still shows custom bullet on that datapoint?
Offline
© amCharts | Forum engine: PunBB