Us­ing D3 li­braries

Web Designer - - Tutorials -

Javascript tradeshows usu­ally have at least one speaker who ex­tols the val­ues of the D3 li­brary found at https://d3js.org. As the slides usu­ally con­tain at least one in­sanely im­pres­sive slideshow, de­vel­op­ers tend to ‘take a stab’.

This usu­ally ends in dis­as­ter for one sim­ple rea­son: the prod­uct is im­mensely com­plex due to its strictly data-driven de­sign. Think of a D3-based di­a­gram like a ‘shell’ of <div> tags an­i­mated via data bind­ing – an ar­chi­tec­ture as pow­er­ful as it is dif­fi­cult to tame.

Should you feel like us­ing D3.js in anger, an in­ter­est­ing ap­proach in­volves the use of pre-made D3 li­braries such as C3 found at https://c3js.org. They act as a ‘wrap­per’ around the un­der­ly­ing D3 li­brary and pro­vide an easy-to-use in­ter­face not dis­sim­i­lar to the one in Chart.js.

Newspapers in English

Newspapers from UK

© PressReader. All rights reserved.