Skip to main content
100%

polymer 1.0 d3 bar chart

✓ Published0🌍 Public
HHypercubed
Last edited Jul 6, 2015
Created on Jul 6, 2015

This example shows a bar chart of letter frequencies, where each bar’s height is proportional to its frequency value. The visualization is built as a reusable Polymer 1.0 custom element, using D3.js to handle scales, axes, and the bar geometry. The code explicitly sets up an ordinal x-scale and linear y-scale, formats the y-axis as percentages, and appends SVG rectangles for each data point. Data is passed as a JSON string property and parsed into the chart, with the SVG rendered inside a `<div>` within the element’s shadow DOM. The axes and bars are styled via Polymer’s scoped CSS, and the chart updates when the data property changes.

AI-generated description

Similar vizzes