Search the Community

Showing results for tags 'javascript-svg / fusionchart /sharpvector'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Company Forums
    • Company News
  • Product Forums
    • FusionCharts XT
    • FusionWidgets XT
    • PowerCharts XT
    • FusionMaps XT
    • Collabion Charts for SharePoint
    • jQuery Plugin for FusionCharts
    • AngularJS plugin
    • ReactJS plugin
  • General Forums
    • FusionCharts Jobs and Consultation
    • FusionLounge

Found 1 result

  1. Hi Team, We are experiencing a issue, which was working fine till last month. The issue is: We send the Chart SVG information generated from Javascript to server side to save the image as png. The code part of saving the image is not working properly. The created image is always blank. No exceptions are thrown. The Assemblies info: FusionCharts - SharpVectors.Converters SharpVectors.Rendering.Wpf SharpVectors.Runtime SharpVectors.Core Please help us on this. * * * * * Here is the pice of the code: private static MemoryStream GetJSImage(string svgHtml, string fileFormat) { string type = fileFormat.ToString().ToLower(System.Globalization.CultureInfo.CurrentCulture); byte[] svg = Encoding.ASCII.GetBytes(svgHtml); WpfDrawingSettings ds = new WpfDrawingSettings(); using (StreamSvgConverter ssc = new StreamSvgConverter(ds)) { ssc.SaveXaml = false; ssc.SaveZaml = false; ImageEncoderType encoder = ImageEncoderType.JpegBitmap; switch (type) { case "png": encoder = ImageEncoderType.PngBitmap; break; case "jpeg": encoder = ImageEncoderType.JpegBitmap; break; } ssc.EncoderType = encoder; ssc.SaveXaml = false; using (MemoryStream svgStream = new MemoryStream(svg)) { TextReader svgData = new StreamReader(svgStream); using (MemoryStream exportObjectStream = new MemoryStream()) { ssc.Convert(svgData, exportObjectStream); return exportObjectStream; } } } }