Exception when creating dashboard-chart

1052
3
Jump to solution
04-16-2021 05:36 AM
TorbjørnDalløkken2
Occasional Contributor

Hi. 

I'm trying to create a Dashboard using the arcgis.apps.dashboard library, and I've got a problem creating charts. I've succeeded in creating a empty chart and adding it to a new dashboard, but as soon as I try to add a valuefield I get an exception. The chart is using groupByValues, so I need to add a field using the function add_value_field(). I pass the fieldname through this function like this:

chart = SerialChart(item = webmap,
layer=0,
name="Test Chart",
title = "Test Title",
categories_from = "groupByValues")

chart.data.add_value_field("PriKlasse")

Then I get this exception:

~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\apps\dashboard\_serialchart\_serial_chart.py in _field_type(self, field_name)
   1046 
   1047     def _field_type(self, field_name):
-> 1048         f_type = self._item.tables[0].query().sdf[field_name].dtype
   1049         return f_type
   1050 

IndexError: list index out of range

The error seems to be the same as described in this post: https://community.esri.com/t5/arcgis-api-for-python-questions/creating-dashboard-elements-with-geojs...

 

0 Kudos
1 Solution

Accepted Solutions
TorbjørnDalløkken2
Occasional Contributor

There's been registered two bug related to this issue, so the problem is being solved as we speak hopefully.

View solution in original post

0 Kudos
3 Replies
TorbjørnDalløkken2
Occasional Contributor

There's been registered two bug related to this issue, so the problem is being solved as we speak hopefully.

0 Kudos
SimonSchütte_ct
Occasional Contributor III

@ TorbjørnDalløkken2 ‎is this fixed by now? Would you be so kind to share the bug ID, so we can check the status and versions?
In Github, there is this Bug report: https://github.com/Esri/arcgis-python-api/issues/1110

0 Kudos
TorbjørnDalløkken2
Occasional Contributor

Hi  @SimonSchütte_ct . 

I just recieved a message from ESRI saying that the bugs now are closed without being fixed. The reason for that is that the dashboard-module was using the ArcGIS Dashboard Classic, which is retired and the dashboard-module will also be deprecated from version 2.0.1.

ArcGIS Dashboards Classic is Retiring