![](https://forum.fusioncharts.com/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
James_UK
Members-
Content count
7 -
Joined
-
Last visited
About James_UK
-
Rank
Forum Newbie
-
Annotations are truncated at edge of chart area
James_UK replied to James_UK's topic in General usage
Hi Akash, > If Macros are used, it returns the Macro string itself, not the absolute value. I think that should be considered as being a bug. Retrieving the annotations object after "drawcomplete" (as in your fiddle) should be capable of returning the computed x,y values in the object. It shouldn't, at that stage, be merely returning the unexpanded input string. Thanks, James -
Annotations are truncated at edge of chart area
James_UK replied to James_UK's topic in General usage
Hi Akash, Static or fixed annotations, and with a known number of columns/data points are fine, since I can determine the x,y coordinates on the server (although that's rather clumsy).The problem comes with dynamic (i.e. variable content - determined in browser at runtime) annotation text, and/or a variable number of columns (e.g. in your fiddle, suppose instead of 4 columns, you had 12 or 24, or some number selected by the user in the browser?). The web page would be unable to determine the correct, new, placement of the annotation and would need to make a call to the server for a refresh. This is they key. How can I determine, at runtime, whether it will go outside the chart area? Something like "x" : "Math.min( $chartStartX+5, $dataset.0.set.0.x-15 )" Alternatively if there was some way to get back a dataObj (similar to dataplotRollOver but for an Annotation item or group) which contained 'x' and 'chartX', so I could then recalculate the annotation start point outside of FC. Thanks, James -
James_UK started following Annotations are truncated at edge of chart area and Text label alignment on annotations
-
Hi Akash, Yes I see. I thought it was something to do with positioning around a coordinate point (i.e.the origin - "x" and "y" - being a single point in space), which you have confirmed. I was having difficulty understanding how to left-align the text over a dynamic (variably-sized) "calloutbase" rectangle, but now I can see how I need to do this. My confusion arose when specifying a toX and toY (wrapWidth & wrapHeight) which I mentally pictured as making a 'box' within which I thought the text would be aligned. I see now the alignment only relates to X,Y and ignores toX,toY. Thanks for taking the time to explain this to me. James
-
The text align and vAlign parameters seem to work wrong on annotations. Example: given the fiddle http://jsfiddle.net/fusioncharts/bLxr4/ 1) to make it easier to see the effect, shorten the CalloutLabel text slightly to just "text": "Biggest Quarter" 2) add "align":"left", to CalloutLabel When you run this, the text is seemingly aligned to the right. Similarly align;right actually appears as left- alignment. I'm not sure if this is an actual bug or some artifact resulting from placing the x co-ordinate at the column itself rather than using a pixel offset, i,e, "x": "$dataset.0.set.1.x", Thanks James {FC XT 3.12}
-
I'm using a column chart (column2d) and adding a callout annotation on a dataset. How do I stop the callout from going outside the bounds of the chart area? Example: given the fiddle http://jsfiddle.net/fusioncharts/bLxr4/ 1) add "textAlign":"right", to groups[{}] 2) change the callout so it displays on column 0 by changing all "$dataset.0.set.1" to "$dataset.0.set.0" When you run this you should see the callout text is chopped off at the left since it is outside the chart area Sure I can change the starting x co-ordinate of the CalloutBase, but I would need potentially to alter this for every dIndex in the dataset, so that's not very practical (when I have a large number of data points each with a different and variable message) Is there some parameter I'm missing? Or do you have any other suggestions for a way to keep the text within the chart area? Many thanks James {FC XT 3.12}
-
Thanks Akash. I missed that setting, or more accurately I didn't understand what the Description meant. Perhaps you could change the following page as well to reflect the change you made on the grouping-annotations.html page? http://www.fusioncharts.com/dev/advanced-chart-configurations/annotations/annotations-references.html Thanks for your quick reply and your help. James
-
When using column charts (column2d) and adding a callout annotation, the annotation is hidden behind other columns. (i.e. a lower stacking order). Example: given the fiddle http://jsfiddle.net/fusioncharts/bLxr4/ change the value for Q1 to 40000. The column for Q1 now appears on top of the annotation. (Note this also happens with line charts but is obviously more noticeable with columns.) {FC XT 3.12}