< Back to Widgets

Rates by State

How to use:

Copy the HTML code below and place it wherever you need on your site.

1
2
3
4
5
6
7

<div data-eb-component="eb-average-rate-by-state-table"
 style="height: 524px;"
 sort-by="price"
 order-by="asc"
 >
</div>
<script src="https://www.energybot.com/eb-webcomponents/v1/component-loader.js"></script>

Show the current, previous, and % change of the average electricity rate for every state in the U.S. over the last month.

Preview:

Customize this widget:

You'll need to edit the HTML above to customize this widget.

Sort by previous month's average rate:

Change the value of sort-by="price" to sort-by="previousPrice"

Otherwise, keep the value as sort-by="price" to sort by the current month's average rate.

If no sort-by attribute is provided, the chart will be sorted by state name.

Sort rates in descending order:

Change the value of order-by="asc" to order-by="desc"

Or alternatively, you can remove order-by="asc" from the code entirely.

Otherwise, keep the value as order-by="asc" to sort rates in ascending order.

Limit the number of rows:

Add the attribute limit="10" inside the <div> to limit the number of rows displayed by the widget.

The value of this attribute can be any numerical value.

If no limit attribute is provided, the chart will show energy rates for all states.

Change this widget's height:

Change the value of height="524px;" to any other numerical value.

Edit styles / change to dark mode:

You’ll need to recreate our styles on your website using the exact same class names.

Once complete, add a link to your CSS file in the HTML code above.

It should look something like this:

1
2
3
4
5
6
7
8

<div data-eb-component="eb-average-rate-by-state-table"
  eb-stylesheet="http://link-to-your-css-file.com.css"
 style="height: 524px;"
 sort-by="price"
 order-by="asc"
 >
</div>
<script src="https://www.energybot.com/eb-webcomponents/v1/component-loader.js"></script>

Styles for this widget:

State
Current Month
Previous Month
Change %
Alaska
20.02¢
20.02¢
0.2%
Massachusetts
20.02¢
20.02¢
3.2%
North Carolina
20.02¢
20.02¢
3.2%
Rhode Island
20.02¢
20.02¢
3.2%
Massachusetts
20.02¢
20.02¢
3.2%
Massachusetts
20.02¢
20.02¢
3.2%
Rhode Island
20.02¢
20.02¢
3.2%
Rhode Island
20.02¢
20.02¢
3.2%
Electricity data by EnergyBot