Liveweave: Generative AI Web Editor & HTML/CSS/JS Playground
Initializing
Liveweave
Web
expand_more
home
Home
data_object
CSS Explorer
arrow_outward
Palette
Color Explorer
arrow_outward
Polyline
Graphics Editor
arrow_outward
data_array
Python Editor
New
arrow_outward
build
Tools
expand_more
restart_alt
Load "Hello Weaver!"
post_add
Generate Lorem ipsum...
code
Format HTML
code_blocks
Format CSS
data_object
Format JavaScript
library_add
Library
expand_more
A
Algolia JS
Animate CSS
Apex Charts JS
B
Bulma CSS
Bootstrap
C
Chart JS
Chartist
Create JS
D
D3
Dojo
F
Foundation
Fullpage JS
G
Granim JS
Google Charts
H
Halfmoon
J
jQuery
M
Materialize
Moment JS
Masonry JS
Milligram CSS
P
Pure CSS
Primer CSS
Popper JS
Pattern CSS
Picnic CSS
R
React JS
Raphael JS
Raisin CSS
S
Semantic UI
Skeleton CSS
Spectre CSS
Tachyons CSS
T
Tailwind
Three JS
U
UI Kit
Vis JS
W
Water CSS
download
Download
expand_more
developer_mode
Download as HTML
folder_zip
Download as .ZIP
cloud_upload
Save
account_circle
Login
settings
Settings
expand_more
14
px
Live mode
Night mode
Line number
Mini map
Word wrap
sync_alt
Reset Settings
smart_display
Run
<!DOCTYPE html> <html> <head> <title>HighCharts Variwide Chart</title> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/variwide.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <script src="https://code.highcharts.com/modules/export-data.js"></script> <script src="https://code.highcharts.com/modules/accessibility.js"></script> </head> <body> <!-- Start your code here --> <figure class="highcharts-figure"> <div id="container"></div> <p class="highcharts-description"> Variwide charts can be used to visualize a second dimension in a column chart. Each data point is given a weight, in addition to its value, determining the width of the column. In this chart, the Y-Axis represents the labor cost of the country, while the column width is proportional to the country's GDP. </p> </figure> <!-- End your code here --> </body> </html>
#container { height: 500px; } .highcharts-figure, .highcharts-data-table table { min-width: 320px; max-width: 900px; margin: 1em auto; } .highcharts-data-table table { font-family: Verdana, sans-serif; border-collapse: collapse; border: 1px solid #ebebeb; margin: 10px auto; text-align: center; width: 100%; max-width: 500px; } .highcharts-data-table caption { padding: 1em 0; font-size: 1.2em; color: #555; } .highcharts-data-table th { font-weight: 600; padding: 0.5em; } .highcharts-data-table td, .highcharts-data-table th, .highcharts-data-table caption { padding: 0.5em; } .highcharts-data-table thead tr, .highcharts-data-table tr:nth-child(even) { background: #f8f8f8; } .highcharts-data-table tr:hover { background: #f1f7ff; }
Highcharts.chart('container', { chart: { type: 'variwide' }, title: { text: 'Labor Costs in Europe, 2016' }, subtitle: { text: 'Source: <a href="http://ec.europa.eu/eurostat/web/' + 'labour-market/labour-costs/main-tables">eurostat</a>' }, xAxis: { type: 'category' }, caption: { text: 'Column widths are proportional to GDP' }, legend: { enabled: false }, series: [{ name: 'Labor Costs', data: [ ['Norway', 50.2, 335504], ['Denmark', 42, 277339], ['Belgium', 39.2, 421611], ['Sweden', 38, 462057], ['France', 35.6, 2228857], ['Netherlands', 34.3, 702641], ['Finland', 33.2, 215615], ['Germany', 33.0, 3144050], ['Austria', 32.7, 349344], ['Ireland', 30.4, 275567], ['Italy', 27.8, 1672438], ['United Kingdom', 26.7, 2366911], ['Spain', 21.3, 1113851], ['Greece', 14.2, 175887], ['Portugal', 13.7, 184933], ['Czech Republic', 10.2, 176564], ['Poland', 8.6, 424269], ['Romania', 5.5, 169578] ], dataLabels: { enabled: true, format: '€{point.y:.0f}' }, tooltip: { pointFormat: 'Labor Costs: <b>€ {point.y}/h</b><br>' + 'GDP: <b>€ {point.z} million</b><br>' }, borderRadius: 3, colorByPoint: true }] });
Check out the new AI-powered Python Playground
×