Possibly not what you want to hear but I do this using Grafana rather than NR Dashboard. In fact, I use Telegraf to do the pings. It writes the output to InfluxDB (no code required, just a configuration). It is then easy to use Grafana to produce the charts.