Sign in to follow this  
MGS_Sebastien

Calculation issue with annotations macros

Recommended Posts

Hi !

 

I think that I ask is not possible but I try :)

 

I want to do multiplications and divisions with macros of annotations.

 

For exemple here the JSFiddle :

http://jsfiddle.net/x5FBh/620/

 

I try to put the green circle (last annotation in code) in the center of the canvas, how can I do that ?

I tried like the JSFiddle exemple : $canvasStartX + ($canvasWidth / 2)

But the ($canvasWidth / 2) is ignored, when i remove brackets / 2 is ignored.

 

Do you have any other solution for me ?

Keep in mind the chart is dynamically resized, so fixed values don't work.

 

 

Thank you,

Sébastien

Edited by MGS_Sebastien

Share this post


Link to post
Share on other sites
 

Hi,

 

You can use only the + or - operators to create a macro expression.

 

There should be at least one macro name to create a macro expression.

 

Common mathematical expressions like 30 + 10 - 5, which do not contain a macro, will not work.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Thanks for this confirmation.

 

However, can someone help me about the fiddle I post. I mean, how can I place an annotation at 0 on x-axis without calculation ?

 

 

Thank you,

Sébastien

Share this post


Link to post
Share on other sites

Hi Vishalika,

 

Thanks for this.

Well I didn't take exactly your exemple but i took : yaxis.0.label.5.x to place on 0, and yaxis.0.label.6.x to place on 20 and etc... I am happy thats finaly works :)

 

 

 

Thank you,

Sébastien

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this