Shrabanee

Facing some issues with annotations in Firefox only.

Recommended Posts

Hi

I am trying to set annotations in the chart, when there is no data present to show for piechart.

For all the browsers it is working fine, except in Firefox.

I am updating the chart using 'setJSONData', when there is no data to show I am trying to show an annotation. But it is not coming up in firefox.

5a312be52724d_ScreenShot2017-12-13at6_48_22pm.png.409ed0f158b4dea911734e6056e129c9.png

 

As you can see in the above image, it is not showing any annoation. 

I tried inspecting and this is what I got 

5a312bf70a5ec_ScreenShot2017-12-13at6_48_55pm.png.5a75c5d3df6b50302f4a2738a41bc922.png

Seems Element is there but it is not properly positioned. 

 

Annonation I am using is as below:

 

"annotations":
            {
                "width": "200",
                "height": "300",
                 "autoScale": "1",
                  "groups": [
                    {
                        "id": "user-images",
                         "items": [
                                    {
                                        "id": "dyn-label",
                                        "type": "text",
                                        "fillcolor": "#cdcdcd",
                                        "font":"lato",
                                        "fontsize": "20",
                                        "text": "test message to show",
                                        "bold": "1",
                                        "wrap": "1",
                                        "wrapWidth": "300",
                                        "x": "$canvasCenterX",
                                        "y": "$canvasCenterY-50",
                                        "scaleText":"1"
                                    }
                            ]
                    }
                    ]
          }

Can someone help me with this issue? What am I doing wrong?

Thanks

Edited by Shrabanee

Share this post


Link to post
Share on other sites

Hey @Akash Biswas

I know it is working in firefox when I am using your code in the fiddle directly.

5a354965bac6b_ScreenShot2017-12-16at9_51_28pm.png.499f0128d61e8f6e3260d37b7a450b3b.png

As you can see in the screenshot above, "dy"  value for 'tspan' has some negative value. I am not able to understand what is going wrong. 
While rendering the chart, this was working properly but after changing the code from rerendering to update, it is not working and it is happening in firefox only.

I have tried by adding a blank annotation and then updating it when I want to show annotation, that helped me when there is no data to show on the charts.
But when I have some data to show and along with that, if I am trying to show annotation I am getting issue.

5a354ae153f8b_ScreenShot2017-12-16at10_02_16pm.png.606706a8266251dccea0671dc4ecd9e4.png

In the above image, I am trying to show a text along with the data and it is not coming.

5a354b790f193_ScreenShot2017-12-16at10_02_58pm.png.692dd87ac1f6493dec4ca2f958b59849.png

For this above image, legends are not coming, if the chart was blank initially and then I am trying to show it with some data using the update code.

Can you tell me what I might be doing wrong for which this dy value became negative with the update code and only happening in firefox? :( 

Thanks

Edited by Shrabanee

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