7.2.4 • Published 5 months ago

gramex-stacked-plot v7.2.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

GRAMEX STACKED PLOT

d3 stacked plot rendering for reusability purpOse.

Installation

  npm install gramex-stacked-plot

Dependencies

  npm install d3
  npm install lodash

Options/Config

Following options are available:

NameTypeDescription
datadata: {brand: 'Pepsi', animatic: 52, finished_film: 30}Data for Stacked plot.
marginObject { top: 178, right: 57, bottom: 55, left: 70 }Specify margin
labelTopPaddingnumberTop padding for xAxis labels
labelRightPaddingnumberRight padding for yAxis labels
barWidthnumberThickness of stacked plot
widthnumberWidth for SVG
heightnumberheight for SVG

Usage/Examples

HTML

<div id="gramexStackedPlot" class=''></div>

JS

const config = {
        width: 952,
        height: 500,
        marginTop: 178,
        marginBottom: 55,
        marginLeft: 70,
        marginRight: 57,
        labelTopPadding: 15,
        labelRightPadding: 35,
        data: [
              {brand: 'Pepsi', animatic: 52, finished_film: 30},
              {brand: 'Lays', animatic: 40, finished_film: 40},
              {brand: 'coka, cola', animatic: 45, finished_film: 50},
              {brand: 'Rockstar, Energy', animatic: 30, finished_film: 40},
              {brand: 'Funny, Frish', animatic: 25, finished_film: 40},
              {brand: 'Red, Bull', animatic: 20, finished_film: 70},
              {brand: '28 Black', animatic: 15, finished_film: 22},
              {brand: 'Lorenz', animatic: 60, finished_film: 46},
              {brand: 'Rockstar', animatic: 35, finished_film: 67}
        ]
    };
    renderStackedPlot("#gramexStackedPlot", config)
7.2.4

5 months ago

7.2.3

7 months ago

7.1.3

9 months ago

7.0.3

9 months ago

7.0.2

9 months ago

7.0.1

12 months ago

7.0.0

12 months ago