SlideShare a Scribd company logo
Alicia Barnash, Blue Raster
Esri Developer Summit
March 9, 2015
Build a Custom UI Control with D3.js
The Challenge
choose a solution…
Interactive SVG elements with http://d3js.org/
…borrowing an open source template
http://jaketrent.com/post/rotate-gauge-needle-in-d3/
…fork a template
Original: http://codepen.io/jaketrent/pen/eloGk/
My Fork: http://codepen.io/codeleash/pen/QwBeOP
… customize the specs
… customize the specs
… customize the specs
… customize the style
… add interactive elements
…and connect to the map
…and connect to the map
…and connect to the map
…and connect to the map
…and connect to the map
Contact
Alicia Barnash, Blue Raster
abarnash@blueraster.com
@aspacebarnash
http://codepen.io/codeleash/

More Related Content

More from Blue Raster

Fighting Climate Change by Fighting Fires - Esri FedGIS 2016 Presentation
Fighting Climate Change by Fighting Fires - Esri FedGIS 2016 PresentationFighting Climate Change by Fighting Fires - Esri FedGIS 2016 Presentation
Fighting Climate Change by Fighting Fires - Esri FedGIS 2016 Presentation
Blue Raster
 
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
Blue Raster
 
Blue Raster Natureserve Synergy Workshop Presentation
Blue Raster Natureserve Synergy Workshop PresentationBlue Raster Natureserve Synergy Workshop Presentation
Blue Raster Natureserve Synergy Workshop Presentation
Blue Raster
 
Blue Raster Presents on Emerging Hotspots of Global Tree Cover Loss
Blue Raster Presents on Emerging Hotspots of Global Tree Cover LossBlue Raster Presents on Emerging Hotspots of Global Tree Cover Loss
Blue Raster Presents on Emerging Hotspots of Global Tree Cover Loss
Blue Raster
 
Creating Apps with Maps in AppStudio - Esri User Conference 2015 Presentation
Creating Apps with Maps in AppStudio - Esri User Conference 2015 PresentationCreating Apps with Maps in AppStudio - Esri User Conference 2015 Presentation
Creating Apps with Maps in AppStudio - Esri User Conference 2015 Presentation
Blue Raster
 
U.S. National Arboretum - Esri User Conference 2015 Presentation
U.S. National Arboretum - Esri User Conference 2015 Presentation U.S. National Arboretum - Esri User Conference 2015 Presentation
U.S. National Arboretum - Esri User Conference 2015 Presentation
Blue Raster
 
The Power of Story Maps, Data Visualization, and Analysis: NetHope and Blue R...
The Power of Story Maps, Data Visualization, and Analysis: NetHope and Blue R...The Power of Story Maps, Data Visualization, and Analysis: NetHope and Blue R...
The Power of Story Maps, Data Visualization, and Analysis: NetHope and Blue R...
Blue Raster
 
Best Practices for Story Maps
Best Practices for Story MapsBest Practices for Story Maps
Best Practices for Story Maps
Blue Raster
 
Kill those bugs with the ultimate tool - Chrome DevTools
Kill those bugs with the ultimate tool - Chrome DevToolsKill those bugs with the ultimate tool - Chrome DevTools
Kill those bugs with the ultimate tool - Chrome DevToolsBlue Raster
 
Make JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and CleanMake JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and CleanBlue Raster
 
Great Story Maps - Blue Raster Esri User Conference 2014 Presentation
Great Story Maps - Blue Raster Esri User Conference 2014 PresentationGreat Story Maps - Blue Raster Esri User Conference 2014 Presentation
Great Story Maps - Blue Raster Esri User Conference 2014 Presentation
Blue Raster
 
Total Knockout: Start-to-Finish Development of Suitability Applications Using...
Total Knockout: Start-to-Finish Development of Suitability Applications Using...Total Knockout: Start-to-Finish Development of Suitability Applications Using...
Total Knockout: Start-to-Finish Development of Suitability Applications Using...
Blue Raster
 
Online Mapping Patterns in 2013 and Beyond
Online Mapping Patterns in 2013 and BeyondOnline Mapping Patterns in 2013 and Beyond
Online Mapping Patterns in 2013 and Beyond
Blue Raster
 
Harnessing Python
Harnessing PythonHarnessing Python
Harnessing Python
Blue Raster
 
Migrating Department of Education Web Mapping App to AWS EC2
Migrating Department of Education Web Mapping App to AWS EC2Migrating Department of Education Web Mapping App to AWS EC2
Migrating Department of Education Web Mapping App to AWS EC2
Blue Raster
 
PADDDtracker: Crowdsourcing PADDDs Using the Power of ArcGIS for Server - 201...
PADDDtracker: Crowdsourcing PADDDs Using the Power of ArcGIS for Server - 201...PADDDtracker: Crowdsourcing PADDDs Using the Power of ArcGIS for Server - 201...
PADDDtracker: Crowdsourcing PADDDs Using the Power of ArcGIS for Server - 201...
Blue Raster
 
Javascript Editing Tools Made Easy Blue Raster - Esri Developer Summit 2013 L...
Javascript Editing Tools Made Easy Blue Raster - Esri Developer Summit 2013 L...Javascript Editing Tools Made Easy Blue Raster - Esri Developer Summit 2013 L...
Javascript Editing Tools Made Easy Blue Raster - Esri Developer Summit 2013 L...Blue Raster
 
Python Multiprocessing Spoon-fed - Blue Raster Esri Developer Summit 2013 Lig...
Python Multiprocessing Spoon-fed - Blue Raster Esri Developer Summit 2013 Lig...Python Multiprocessing Spoon-fed - Blue Raster Esri Developer Summit 2013 Lig...
Python Multiprocessing Spoon-fed - Blue Raster Esri Developer Summit 2013 Lig...Blue Raster
 
Operation Point Cluster - Blue Raster Esri Developer Summit 2013 Presentation
Operation Point Cluster - Blue Raster Esri Developer Summit 2013 PresentationOperation Point Cluster - Blue Raster Esri Developer Summit 2013 Presentation
Operation Point Cluster - Blue Raster Esri Developer Summit 2013 PresentationBlue Raster
 
Moving ArcGIS Servers to AWS Cloud Hosting - NCES, Blue Raster, Sanametrix - ...
Moving ArcGIS Servers to AWS Cloud Hosting - NCES, Blue Raster, Sanametrix - ...Moving ArcGIS Servers to AWS Cloud Hosting - NCES, Blue Raster, Sanametrix - ...
Moving ArcGIS Servers to AWS Cloud Hosting - NCES, Blue Raster, Sanametrix - ...
Blue Raster
 

More from Blue Raster (20)

Fighting Climate Change by Fighting Fires - Esri FedGIS 2016 Presentation
Fighting Climate Change by Fighting Fires - Esri FedGIS 2016 PresentationFighting Climate Change by Fighting Fires - Esri FedGIS 2016 Presentation
Fighting Climate Change by Fighting Fires - Esri FedGIS 2016 Presentation
 
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
AppStudio for ArcGIS: The Basics - Esri FedGIS 2016
 
Blue Raster Natureserve Synergy Workshop Presentation
Blue Raster Natureserve Synergy Workshop PresentationBlue Raster Natureserve Synergy Workshop Presentation
Blue Raster Natureserve Synergy Workshop Presentation
 
Blue Raster Presents on Emerging Hotspots of Global Tree Cover Loss
Blue Raster Presents on Emerging Hotspots of Global Tree Cover LossBlue Raster Presents on Emerging Hotspots of Global Tree Cover Loss
Blue Raster Presents on Emerging Hotspots of Global Tree Cover Loss
 
Creating Apps with Maps in AppStudio - Esri User Conference 2015 Presentation
Creating Apps with Maps in AppStudio - Esri User Conference 2015 PresentationCreating Apps with Maps in AppStudio - Esri User Conference 2015 Presentation
Creating Apps with Maps in AppStudio - Esri User Conference 2015 Presentation
 
U.S. National Arboretum - Esri User Conference 2015 Presentation
U.S. National Arboretum - Esri User Conference 2015 Presentation U.S. National Arboretum - Esri User Conference 2015 Presentation
U.S. National Arboretum - Esri User Conference 2015 Presentation
 
The Power of Story Maps, Data Visualization, and Analysis: NetHope and Blue R...
The Power of Story Maps, Data Visualization, and Analysis: NetHope and Blue R...The Power of Story Maps, Data Visualization, and Analysis: NetHope and Blue R...
The Power of Story Maps, Data Visualization, and Analysis: NetHope and Blue R...
 
Best Practices for Story Maps
Best Practices for Story MapsBest Practices for Story Maps
Best Practices for Story Maps
 
Kill those bugs with the ultimate tool - Chrome DevTools
Kill those bugs with the ultimate tool - Chrome DevToolsKill those bugs with the ultimate tool - Chrome DevTools
Kill those bugs with the ultimate tool - Chrome DevTools
 
Make JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and CleanMake JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and Clean
 
Great Story Maps - Blue Raster Esri User Conference 2014 Presentation
Great Story Maps - Blue Raster Esri User Conference 2014 PresentationGreat Story Maps - Blue Raster Esri User Conference 2014 Presentation
Great Story Maps - Blue Raster Esri User Conference 2014 Presentation
 
Total Knockout: Start-to-Finish Development of Suitability Applications Using...
Total Knockout: Start-to-Finish Development of Suitability Applications Using...Total Knockout: Start-to-Finish Development of Suitability Applications Using...
Total Knockout: Start-to-Finish Development of Suitability Applications Using...
 
Online Mapping Patterns in 2013 and Beyond
Online Mapping Patterns in 2013 and BeyondOnline Mapping Patterns in 2013 and Beyond
Online Mapping Patterns in 2013 and Beyond
 
Harnessing Python
Harnessing PythonHarnessing Python
Harnessing Python
 
Migrating Department of Education Web Mapping App to AWS EC2
Migrating Department of Education Web Mapping App to AWS EC2Migrating Department of Education Web Mapping App to AWS EC2
Migrating Department of Education Web Mapping App to AWS EC2
 
PADDDtracker: Crowdsourcing PADDDs Using the Power of ArcGIS for Server - 201...
PADDDtracker: Crowdsourcing PADDDs Using the Power of ArcGIS for Server - 201...PADDDtracker: Crowdsourcing PADDDs Using the Power of ArcGIS for Server - 201...
PADDDtracker: Crowdsourcing PADDDs Using the Power of ArcGIS for Server - 201...
 
Javascript Editing Tools Made Easy Blue Raster - Esri Developer Summit 2013 L...
Javascript Editing Tools Made Easy Blue Raster - Esri Developer Summit 2013 L...Javascript Editing Tools Made Easy Blue Raster - Esri Developer Summit 2013 L...
Javascript Editing Tools Made Easy Blue Raster - Esri Developer Summit 2013 L...
 
Python Multiprocessing Spoon-fed - Blue Raster Esri Developer Summit 2013 Lig...
Python Multiprocessing Spoon-fed - Blue Raster Esri Developer Summit 2013 Lig...Python Multiprocessing Spoon-fed - Blue Raster Esri Developer Summit 2013 Lig...
Python Multiprocessing Spoon-fed - Blue Raster Esri Developer Summit 2013 Lig...
 
Operation Point Cluster - Blue Raster Esri Developer Summit 2013 Presentation
Operation Point Cluster - Blue Raster Esri Developer Summit 2013 PresentationOperation Point Cluster - Blue Raster Esri Developer Summit 2013 Presentation
Operation Point Cluster - Blue Raster Esri Developer Summit 2013 Presentation
 
Moving ArcGIS Servers to AWS Cloud Hosting - NCES, Blue Raster, Sanametrix - ...
Moving ArcGIS Servers to AWS Cloud Hosting - NCES, Blue Raster, Sanametrix - ...Moving ArcGIS Servers to AWS Cloud Hosting - NCES, Blue Raster, Sanametrix - ...
Moving ArcGIS Servers to AWS Cloud Hosting - NCES, Blue Raster, Sanametrix - ...
 

Recently uploaded

Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 

Recently uploaded (20)

Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 

Building a Custom UI Control with D3 - 2015 Esri Devoloper Summit

Editor's Notes

  1. We were building an application that updates a number of thematic layers on the map, within each thematic data type, the user has four possible climate change scenarios to select from. For the UX design, this presented the problem of communicating this concept to the user. During the application design phase, someone on our team had the idea of switching between the four scenarios with this circular dial control. The control looks cool and does a nice job of communicating the scenario options for each layer to the user. However, from the perspective of the developer, this is a pretty annoying design as it is not exactly trivial to implement in the CSS Box Model. The client, designer, and project managers loved it, so the challenge for the developer was to find a solution that worked smoothly and didn’t spend a lot of development hours on this relatively small piece of the application.
  2. “D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.” Not just useful, for traditional Data Visualization, also can be leveraged for building controls that go beyond typical HTML/CSS box elements We wanted the individual pieces of the control to be interactive, and the needle movement to have an animation effect, so simple CSS background classes weren’t ideal
  3. Didn’t want to spend a lot of time learning the entire framework, when I only needed to use a subset of the functionality D3 has a steeper learning curve than many other JS libraries but fortunately there are lots of examples of controls that other people have already built Found this example from a “Jake Trent” character online. No need to reinvent the wheel from scratch, Jake Trent’s gauge control get’s us halfway there
  4. He posted the code for his gauge control on Codepen, made it really easy to play around with his parameters to see how much work would be involved in making this gauge look like our dial control Luckily after some trial and error I was able to find which parameters I needed to change to get the dial look
  5. numSections was set to 3, ours needed 8 different sections
  6. We also wanted the sections to fill out a circle, rather than a half circle, able to accomplish that
  7. Added parameter to make the sections look thicker, rotate them so the first section was directly on top, and changed the needle to a smaller radius, chartInset brings the arcs in closer to the needle
  8. - It’s really easy to style the look of D3 elements, using CSS, I changed the color of all sections to the same rgb value, also changed the color of the needle
  9. After I got the look of the gauge to match our dial control. The next steps where to integrate the code into our application framework and extend the functionality to support updating our map. I added 4 clickable text elements to the control. When the user clicks on one of the labels, the callback function sets the needle to point to that label and adds a .select class to that element, which is then highlighted a different color in the css.
  10. - Once all the internal logic of the control was functioning, All I had to do was add a line of code to the callback function to wire the control into our application code. Our modelEventControll changeScenario function handles the rest of the task of updating our map.