Hi All,
I must be missing something simple for a line chart. I have a simple csv file X,Y data ... values are doubles and I want to create a line chart but it blows up with the error:
File "<stdin>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\charts.py", line 449, in exportToSVG
svgRes = self.getSVG(width if width != None else self.displaySize[0],
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\charts.py", line 445, in getSVG
return _convertArcObjectToPythonObject(self._arc_object.getSVG(width, height))
If I use the 'scatter' chart type, works fine but I don't get the nice line thru the data... so I don't think it's the data or csv format.
ArcPro 3.0.2
CODE (running in a simple windows cmd window via C:\Users\fspataro\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\python.exe):
import arcpy
out_svg_file = r"T:\scratch\analysis2\test.svg"
temp_csv_file = r"T:\scratch\analysis2\test.csv"
c = arcpy.charts.Line(x='X', y='Y', dataSource=temp_csv_file)
c.exportToSVG(out_svg_file, width=400, height=400)
DATA (save as test.csv):
X,Y
0.00,8.32
3.27,8.66
6.54,9.06
9.81,9.44
13.08,9.86
16.35,10.38
19.62,11.02
22.89,11.74
26.17,12.67
Thanks!