I have downloaded the attachment and its working fine .the saved image file is downloading in local files folder . While implementing the export functionality in my solution , If i refer the ControllerUrl property in pageload its not getting refered correctly .
> In your attached solution i have changed the ExportController class file path then its not worked for me .Please tell me how to refer the API path in locally without appfolder .
And also i have used the following method its works fine except some cases of Bar chart
[WebMethod]
public static void UploadImagetelerik(string svgString)
{
string chartimagefilename = System.Guid.NewGuid().ToString();
string fileNameWitPath = AppDomain.CurrentDomain.BaseDirectory + @"pages\temp\" + chartimagefilename + ".png";
ChartImageFileName_newexport = ChartImageFileName_newexport + "," + chartimagefilename;
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml(svgString);
SvgDocument svgDoc = SvgDocument.Open(xmlDoc);
svgDoc.Transforms = new SvgTransformCollection();
svgDoc.Transforms.Add(new SvgScale(1, 1));
svgDoc.Width = new SvgUnit(svgDoc.Width.Type, svgDoc.Width);
svgDoc.Height = new SvgUnit(svgDoc.Height.Type, svgDoc.Height);
svgDoc.Draw().Save(fileNameWitPath.ToString(), System.Drawing.Imaging.ImageFormat.Jpeg);
}
I have facing following error
ColorBlend object that was set is not valid.
Position's first element must be equal to 0.
ColorBlend objects must be constructed with the same number of positions and color values.
Positions must be between 0.0 and 1.0, 1.0 indicating the last element in the array.
Please tell me the solution for Export and save the chart as png image in local folder .
Thanks