1

Below is my JSON Data,

{
   "chart":{"type":"bubble","plotBackgroundImage":"Highcharts-3.0.7/graphics/BubbleBGImage.jpg"},
  "series":
   [
     {"data":[{"x":7,"y":7,"z":49},{"x":7,"y":7,"z":49}]},
     {"data":[{"x":7,"y":8,"z":56},{"x":7,"y":8,"z":56}]},
     {"data":[{"x":7,"y":8,"z":56},{"x":7,"y":8,"z":56}]},
     {"data":[{"x":3,"y":7,"z":21},{"x":3,"y":7,"z":21}]}
   ]
}

I have that image in that path too but when try to get bubble chart, I can get result as required except the required Back Ground Image whose path I have mentioned in JSON Data, I get blur image behind the bubbles,I am getting this JSON data from Web Service and have passed this HighChart API through Web Method, My path is correct, I have checked this with another html code executed from localhost to render same output for bubble chart and it gives same result with desired background Image as well, but doesnot give same background image with this JSON data,any clue what I am messing with ..???

Reshma
  • 864
  • 5
  • 20
  • 38
  • Have you tried to use absolute path? If locally it works fine, but not on productions, that means paths are not correct, sorry. Or you have other differences between production and local copy, like different versions of files, libs etc. – Paweł Fus Jan 08 '14 at 13:25
  • Actually I tried by that to by using System.Web.HttpContext.Current.Server.MapPath function but it doesnot help me, and I don't think there is any major difference...the only difference that I follow is I try to call my JSON file directly from web service where the above data is save from javascript code and try to get chart where I don't get background image and other is I have saved all the required file in localhost like JSON data file,image,highchart api and etc..and then run that html code on localhost and I get chart along with background image – Reshma Jan 08 '14 at 13:43
  • I came across one post saying I need to store he image as byte information since it is saved in JSON object and then need to get that byte information to server...honestly ..I didnt understand this..can u relate it? – Reshma Jan 08 '14 at 13:44
  • [http://stackoverflow.com/questions/8726400/how-can-i-add-an-image-file-into-json-object]..this is the link which gives the explanation where I am confused..if you can explain it,it will be grateful of you, – Reshma Jan 08 '14 at 13:46
  • Just get full path, see: http://jsfiddle.net/ua4gy/ I can't help you with backend, but I know that Highcharts will grab file from web properly when you will set absolute path. You can see skies as background image, right? And you see proper path set for `plotBackgroundImage`. – Paweł Fus Jan 08 '14 at 14:21

0 Answers0