Adri2c

Bar Chart Cedar Widget v1.1 - 11/1/2018

Blog Post created by Adri2c on Jan 11, 2018

Hi all,

 

 

I want to share with all the comunity a widget I have developed (WAB 2.6); create graphs of your map services on the fly using Cedar. You can select the available layers in the Web Map. Choose, for the 'x' axis, the field you want to show information, repeat the procedure for the 'y' axis. Select the type of graphic, bars or horizontal bars. The widget is ready to filter the data by extension (by activating the check button). Inside the container of the widget, the graphic will be updated being this responsive.

 

Don't forget to add the Cedar dependencies. How to add other libraries to WAB?

 

I added the following dependencies in the 'index.html' file of the app:

  1. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
  2. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vega/2.6.1/vega.min.js"></script>
  3. <script type="text/javascript" src="https://unpkg.com/arcgis-cedar@0.9.1/dist/cedar.min.js"></script>

 

Version 1.1, pending improvements. All suggestions for improvement will be welcome.

 

List of the latest enhancements and changes:

  1. Added a new class => select the layers ids from the Web Map (Dojo Select)

 

Live demo here!

Attachments

Outcomes