BrickEconomy Widgets are a suite of embedded tools bringing BrickEconomy content and functionality to your webpages, enabling your audience to view much of what BrickEconomy has to offer directly on your site. To use these widgets simply contact us to enable widgets on your website.

Sets

The BrickEconomy Set widget will display the current new and used estimated values for most LEGO sets along with an interactive trends chart. Most options are completely customizable including which values to display, colors and sizes. A default example is below.

Code

Adding the widget to your website is very simple. In fact, we made it so simple you don't even need to use JavaScript and you can simply embed this widget as an iFrame in your HTML.

<iframe src="https://www.brickeconomy.com/widget/set/21026-1" style="width: 100%; height: 90px; border: 0px transparent;"></iframe>
The URL

The widget is pretty much managed by the URL in the src of the iframe code above. The URL will determine which set is displayed along with any options you select.

In the above code, the full set number along with the variation is defined in the URL path in the src element. In the example, 21026-1, is the full set number. To have your widget display a different set simply change this value to that set's number.

Options

You can completely customize the look and feel as well as features displayed using the options below in the URL as query strings parameters. For example, if you want to add a couple options your new URL will go from this:
https://www.brickeconomy.com/widget/set/21026-1
    to
https://www.brickeconomy.com/widget/set/21026-1?currency=USD&fontcolor=333333&backcolor=ffffff
Remember, to add options standard query string formatting is required. Make sure the first parameter/option is separated by a ? and all additional one with a &.
Option Description Usage
currency Displays the value in the selected currency. By default, USD is used. Supported currencies include USD, EUR, GBP, CAD, AUD, CNY, and KRW. currency=GBP
fontsize This is the size of the default font in px (pixels). Once set, all other fonts such as the smaller fonts are based on a percent of this font size. The value must be an integer between 2 and 36. fontsize=12
fontcolor This is the default font color for most text. All other text that is lighter will be an opacity of the specified color. The color must be a 6 character HEX value. fontcolor=202124
backcolor This value specifies the background color of the widget. Because the widget is based on an iframe, the default background color is transparent. The color must be a 6 character HEX value. backcolor=ffffff
labelbackcolor This is the color of any secondary data shown in the widget such as the growth for new sets or range for used sets. The label uses an 80% opacity which will influence the background and font colors. The color must be a 6 character HEX value. labelbackcolor=f5f5f5
chartcolor This is the primary color of all data points, the charts primary series lines and any text annotations. This color also is the basis of the display trend line if show which is an opacity of the chartcolor. The color must be a 6 character HEX value. chartcolor=1a73e8
chartwidth This is the width of the chart to display in pixels. The default with is 300px, but you can set a value between 50 and 1000 pixels wide. The value must be an integer. chartwidth=500
chartheight This is the height of the chart to display in pixels. The default height is 85px, but you can set a value between 50 and 400 pixels wide. The value must be an integer. chartheight=120
chartontop This determines if the chart should be display on top of the text. This is useful for widgets with less horizontal space such as some mobile devices. By default, the chart is displayed to the left of the text. To display the chart on top set this value to true. chartontop=true
hidechart If you want to hide the chart all together you simply need to include the parameter in the query string with the value true. hidechart=true
hidechartaxis If this set to false, the x and y axis labels and gridline will be hidden. The y axis represents the set's value and the x axis represents the timeline. hidechartaxis=true
chartaxisfontcolor This is the default font color for the labels of the x and y axis on the chart. The color must be a 6 character HEX value. chartaxisfontcolor=999999
chartgridlinecolor This is the color to dispaly for the chart's horizontal and vertical grid lines. The color must be a 6 character HEX value. chartgridlinecolor=eeeeee
chartvgridlines The approximate number of vertical grid lines inside the chart. It is only an approximation that is based on the size of your chart and will automatically prevent overlapping. chartvgridlines=3
charthgridlines The approximate number of horizontal grid lines inside the chart. It is only an approximation that is based on the size of your chart and will automatically prevent overlapping. charthgridlines=4
hidechartannotations If this set to true, the annotations on the chart which display stages such as Retired, Today and Estimated will be hidden. hidechartannotations=true
hidecharttrendlines If this set to true, the trendline in the chart will be hidden. The threndline shows the prevailing direction of the set's value over time. hidecharttrendlines=true
hidetext If you want to hide the entire right side of the widget where the set name, new and used prices are shown set this parameter to true. hidetext=true
shortsetname In some cases the set name displayed might be too long, setting this value to true could reduce the size of the name. shortsetname=true
hidesetname If you want to hide the entire line with the set's name and set number set this parameter to true. hidesetname=true
hidenew If you want to hide the entire line with the current estimated new/factory sealed set value set this parameter to true. hidenew=true
hideused If you want to hide the entire line with the current estimated used set values set this parameter to true. hideused=true
NOTE: By using BrickEconomy Widgets for your website you agree to the BrickEconomy Developer Agreement and Policy.