Bridging the Gap between Devs and D3.js with this One Tool

Why ad3lie?

barChartData = {
const xScale = d3.scaleTime().range([0, width])
const yScale = d3.scaleLinear().range([height, 0])
const colorScale = d3.scaleSequential(d3.interpolateSpectral)

const timeDomain = d3.extent(data, d => d.date);
const tempMax = d3.max(data, d => d.high);
const [minAvg, maxAvg] = d3.extent(data, d => d.avg);
xScale.domain(timeDomain);
yScale.domain([0, tempMax]);
colorScale.domain([maxAvg, minAvg]);
// calculate x and y for each rectangle
return data.map(d => {
const y1 = yScale(d.high);
const y2 = yScale(d.low);
return {
x: xScale(d.date),
y: y1,
height: y2 - y1,
fill: colorScale(d.avg),
}
});
}
import { data } from 'MyBarChartData.js'
import { BarChart } from 'ad3lie'

const MyBarChart = ({ data }) => (
<BarChart
data={data}
xKey="species"
yKey="body_mass_g"
xAxisLabel="Species"
yAxisLabel="Body Mass"
height={1000}
width={1000}
/>
)

What is ad3lie?

How Does It Work?

Summary

Get Involved!

Coming Soon…

  • New chart types that allow for further customization
  • Tool-tip functionality for more detailed graphs
  • More customizable attributes for each chart
  • Import functionality for user data

Team:

Ju Kim

Sophia Chiao

Kat Athay

Michael Teifel

Antonio Ayala

--

--

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store