amCharts support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash Charts: Flash Charts Bundle


#1 2012-07-21 04:48:59

HOW to get an instance of an Axis Guide for customization?!

Hi there!

I've had an extremely fun time customizing and integrating AmCharts in my project, but now I'm having a very hard time changing the color of the horizontal (category) axis guide.
To clarify further, I am speaking about the red guide appearing on the horizontal axis guide for a Line chart.

Since there is no example here http://www.amcharts.com/docs/v.2/javasc … ence/guide
and I can't see how can I get the instance of the automatically added to Guide to my CategoryAxis...

I'm running out of ideas and decided to ask this question here.

Thanks in advance,
Martin

Offline

 

#2 2012-07-22 09:34:47

martynasma
Administrator

Re: HOW to get an instance of an Axis Guide for customization?!

You can change the color of the guide's line using "lineColor" property. I.e.:

Code:

guide.lineColor = "#00ff00";

Offline

 

#3 2012-07-22 13:21:22

Re: HOW to get an instance of an Axis Guide for customization?!

Hi gemm,

Thanks for your reply, but it still remains enclear to me how the get the instance of the guide in order to alter its properties.

Offline

 

#4 2012-07-22 13:22:27

Re: HOW to get an instance of an Axis Guide for customization?!

Hey. This topic is concerning the javascript plugin, not the flash one.

I dunno how it ended up in this section.

Offline

 

#5 2012-07-23 09:32:45

martynasma
Administrator

Re: HOW to get an instance of an Axis Guide for customization?!

Do you mean you want to alter guide when the chart is already drawn?

You can manipulate properties to the original guide object or you can access them all in valueAxis.guides array. I.e.:

Code:

chart.categoryAxis.guides[0].lineColor = "#00ff00";
chart.validateNow();

Offline

 

#6 2012-07-23 10:01:36

Re: HOW to get an instance of an Axis Guide for customization?!

Hi qemm!

Thanks for your reply. It seemed that it answered what I was looking for, but then it turned out chart.categoryAxis.guides is an Empty array !

Ok I'm starting to wander whether I've got the whole thing wrong. Do we, by the term guide refer to the following:

http://sourcerealms.net/x/amchart-question.png

?

Offline

 

#7 2012-07-23 11:12:50

martynasma
Administrator

Re: HOW to get an instance of an Axis Guide for customization?!

OK, this is not guide it's ChartCursor :)

Try this:

Code:

chart.chartCursor.cursorColor = "#00ff00";
chart.chartCursor.categoryBalloonColor = "#00ff00";

http://www.amcharts.com/docs/v.2/javasc … hartcursor

Offline

 

#8 2012-07-23 12:40:31

Re: HOW to get an instance of an Axis Guide for customization?!

Haha :)

Great. Thanks gemm!!!

Offline

 

© amCharts | Forum engine: PunBB