How to show chart with workflow in HTML5 Viewer?
Hi,
I am using Essentials 4.12 and Viewer for HTML 4.12.2, defined multiple features Chart. If use Identify tool to select several features and switch to charting view, it works well.
Now I want to use query task to select some features with workflow then show chart, but doesn't work.
I searched community with following topic, video and command help, but still cannot make it work, and shows "No chart to display".
So anyone can upload a sample code that works or point out what's wrong with my following workflow?
---------------------------------------
1. QueryTask with Result queryResult
2. SelecteFeatures with Feature Set queryResult, and set FeatureSet Id as "queryResultID"
3. RunExternalCommand with name "SetCollectionOfInterest" and parameter "queryResultID"
4. RunExternalCommand with name "ActivateView" and parameter "ChartingView"
5. RunExternalCommand with name "DisplayChartById" and parameter "ct1" which is the chart ID that defined.
---------------------------------------
https://support.geocortex.com/essentialsGSCForumDetail?id=0D5f200006aOeOPCA0&main-nav=essentials&sub-nav=forum
https://support.geocortex.com/essentialsGSCvideo?sub-nav=Videos&main-nav=essentials&keyword=chart&page=1
https://docs.geocortex.com/essentials/gvh/latest/commands-help/#/commands/Charting/SetCollectionOfInterest
Much appreciated!
0
-
Ming,
I attached two links to images illustrating the display and cleanup sequences for a workflow to display charts for selected features and then close the charts to return to the previous state. The Chart Display Sequence uses a SelectFeatures activity to select the "featureQueryResult" from a Query Task that precedes this sequence. From there, just use the external command "DisplayChartByID" to display the appropriate charts for the layer that you selected. Then use the external commands "OpenBottomRegion" then "ShowChartingView" to see the charts. Hope this helps.
Chart Display Sequence
Chart Cleanup Sequence
Cheers...Rick0 -
Works now! Thank you very much Richard. Compared my workflow with your uploaded images, now I learned that:
1. For "SelecteFeatures" activity, must set value to "Map Service Id" AND "Layer Name" that defines the chart, then it can build the relationship between the result feature set and chart, otherwise it will show blank chart with message "No chart to display".
2. To show the chart view, can use either command "ActivateView" with parameter "ChartingView" or command "ShowChartingView" without parameter.
3. If doesn't setup value to "Map Service Id" AND "Layer Name" in step 1, then if use command ActivateView" with parameter "ChartingView" it will show blank chart with message "No chart to display", but if use command "ShowChartingView" it will show nothing without any message.
4. Command "OpenBottomRegion" is not necessary if doesn't close bottom region intended before showing chart view.0 -
Hi Richard,
One more question, do you know how to show the chart view as a tab of result table instead of to overlap the result table?0 -
Hi Ming,
To clarify, are you wanting to show a Multiple Feature chart shown in a tab (side container?). The default behavior is that layers configured for single feature charts will be shown in the Additional Information panel (tab) as shown in the link.
Single Chart
Rick0 -
Ming,
The images are not showing for me. Could you repost? I place my images on a Google drive folder that is shareable.
Rick0 -
Ming,
From what I know, I believe that what you are asking for cannot be done-out-of-the-box. It would require a custom module. Multiple tabs in Table View will only be present with multiple layers with data seletced/selections. With that said, the charts can be accessed through the elipses or "hamburger menu" as shown in the link. I would like to hear if there are any other ideas or alternatives to getting this task done.
Table View Chart Hamburger Menu
Rick0 -
I remember seeing this awhile back about Tables and React.
http://go.geocortex.com/react0 -
Hi Richard,
Thanks for the information. For single feature chart, it can show both detail tab and chart tab in same table view by default, so there should be some command we can use for multiple feature chart? I have submitted request to the support, and will post the solution here once get it.
Details
Charts0 -
Thanks...I could use that command. I saw on your Charts link the table chart on Tim Hortons. Got any data on how many "TimBits" are consumed per census subdivision??? :-)
Cheers...Rick0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
10 Kommentare