Created
December 28, 2017 15:03
-
-
Save Umesh-Markande/8ea2c5de90ab774931058c62ecfcd539 to your computer and use it in GitHub Desktop.
Stack Bar With Interactive Brushable Bar d3.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8" /> | |
<style> | |
.axis { | |
font: 10px sans-serif; | |
} | |
.axis path, | |
.axis line { | |
fill: none; | |
stroke: #000; | |
shape-rendering: crispEdges; | |
} | |
.brush .extent { | |
stroke: #fff; | |
fill-opacity: .125; | |
shape-rendering: crispEdges; | |
} | |
g.bar.stack { | |
stroke: black; | |
stroke-width : 0.7; | |
} | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
width: 960px; | |
height: 500px; | |
position: relative; | |
} | |
text{ | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
} | |
.toolTip { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
position: absolute; | |
width: auto; | |
height: auto; | |
background: none repeat scroll 0 0 white; | |
border: 0 none; | |
border-radius: 8px 8px 8px 8px; | |
box-shadow: -3px 3px 15px #888888; | |
color: black; | |
font: 12px sans-serif; | |
padding: 5px; | |
text-align: center; | |
} | |
.legend { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
font-size: 60%; | |
} | |
text { | |
font: 10px sans-serif; | |
} | |
.axis text { | |
font: 10px sans-serif; | |
} | |
.axis path{ | |
fill: none; | |
stroke: #000; | |
} | |
.axis line { | |
fill: none; | |
stroke: #000; | |
shape-rendering: crispEdges; | |
} | |
.x.axis path { | |
display: none; | |
} | |
</style> | |
<body> | |
<div id="chart" style="border: solid 1px #e1e1e1;width:100%; height:470px;"> | |
</div> | |
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
var margin = { | |
top : 55, | |
right : 160, | |
bottom : 40, | |
left : 30 | |
}; | |
function getRandomColor(length) { | |
var colors = []; | |
for (var i = 0; i < length; i++ ) { | |
var color = Math.floor(0x1000000 * Math.random()).toString(16); | |
color = '#' + ('000000' + color).slice(-6); | |
colors.push(color); | |
} | |
return colors; | |
} | |
var miniHeight = 45; | |
var width = $('#chart').width() - margin.left - margin.right, height = $('#chart').height() - margin.top | |
- margin.bottom-50, marginOverview = { | |
top : height, | |
right : margin.right, | |
bottom : 20, | |
left : margin.left | |
}, heightOverview = $('#chart').height() - marginOverview.top - marginOverview.bottom; | |
var x_label_KEY = 'month_year'; | |
var svg = d3.select("#chart").append("svg").attr("width", | |
width + margin.left + margin.right).attr("height", | |
height+ margin.top + margin.bottom).append("g").attr( | |
"transform", "translate(" + margin.left + "," + margin.top + ")"); | |
/* Data in strings like it would be if imported from a csv */ | |
// var data = [{"month_year":"OCT-2017","DOXORUBICIN HCL LIPOSOME":"11","ADRUCIL":"19","EPIRUBICIN HCL":"2","CYCLOPHOSPHAMIDE":"3908","ABRAXANE":"79","TREXALL":"1678","GEMZAR":"0"},{"month_year":"SEP-2017","ADRUCIL":"32","ABRAXANE":"94","EPIRUBICIN HCL":"2","CYCLOPHOSPHAMIDE":"3845","TREXALL":"1645","DOXORUBICIN HCL LIPOSOME":"19","GEMZAR":"0"},{"month_year":"AUG-2017","ADRUCIL":"28","ABRAXANE":"94","DOXORUBICIN HCL LIPOSOME":"25","TREXALL":"1658","CYCLOPHOSPHAMIDE":"4116","EPIRUBICIN HCL":"3","GEMZAR":"0"},{"month_year":"JUL-2017","CYCLOPHOSPHAMIDE":"3968","DOXORUBICIN HCL LIPOSOME":"19","ADRUCIL":"25","ABRAXANE":"92","TREXALL":"1619","EPIRUBICIN HCL":"5","GEMZAR":"1"},{"month_year":"JUN-2017","ADRUCIL":"13","ABRAXANE":"97","EPIRUBICIN HCL":"9","TREXALL":"1592","DOXORUBICIN HCL LIPOSOME":"27","CYCLOPHOSPHAMIDE":"4132","GEMZAR":"0"},{"month_year":"MAY-2017","EPIRUBICIN HCL":"12","CYCLOPHOSPHAMIDE":"4204","ABRAXANE":"108","ADRUCIL":"14","DOXORUBICIN HCL LIPOSOME":"40","TREXALL":"1659","GEMZAR":"0"},{"month_year":"APR-2017","ADRUCIL":"13","ABRAXANE":"83","DOXORUBICIN HCL LIPOSOME":"39","EPIRUBICIN HCL":"10","TREXALL":"1623","CYCLOPHOSPHAMIDE":"4016","GEMZAR":"0"},{"month_year":"MAR-2017","TREXALL":"1611","ADRUCIL":"21","CYCLOPHOSPHAMIDE":"4205","DOXORUBICIN HCL LIPOSOME":"41","ABRAXANE":"87","EPIRUBICIN HCL":"11","GEMZAR":"0"}] | |
// var xAxisKeys = [] | |
var data = [{"month_year":"OCT-2017","FLUOROURACIL":"89612","SOLTAMOX":"66","VINORELBINE TARTRATE":"39","EXEMESTANE":"40292","MEGESTROL ACETATE":"69648","AVASTIN":"563","LETROZOLE":"142595","DOCETAXEL":"227","MEGACE ES":"61","METHOTREXATE SODIUM":"15984","ADRUCIL":"19","OTREXUP":"3532","KADCYLA":"50","AFINITOR":"4438","AFINITOR DISPERZ":"133","CAPECITABINE":"27717","TYKERB":"947","FASLODEX":"315","ADRIAMYCIN":"1","EPIRUBICIN HCL":"2","PACLITAXEL":"225","FARESTON":"588","IBRANCE":"17687","ABRAXANE":"79","GEMCITABINE HCL":"207","DOXIL":"1","PERJETA":"146","CYCLOPHOSPHAMIDE":"3908","ANASTROZOLE":"277683","RALOXIFENE HCL":"148904","CISPLATIN":"101","TREXALL":"1678","DOXORUBICIN HCL LIPOSOME":"11","DOXORUBICIN HCL":"210","HERCEPTIN":"618","AROMASIN":"425","FEMARA":"673","EVISTA":"1351","CARBOPLATIN":"362","MEGACE":"7","HALAVEN":"10","ARIMIDEX":"835","XELODA":"720","METHOTREXATE":"502024","TAMOXIFEN CITRATE":"159503","TAXOTERE":"0","NOLVADEX":"0","RHEUMATREX":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","IXEMPRA":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"SEP-2017","EXEMESTANE":"38517","IXEMPRA":"3","TREXALL":"1645","DOXORUBICIN HCL":"219","LETROZOLE":"135438","PACLITAXEL":"217","FEMARA":"685","MEGACE":"3","IBRANCE":"17344","DOXORUBICIN HCL LIPOSOME":"19","GEMCITABINE HCL":"188","CARBOPLATIN":"353","TYKERB":"883","METHOTREXATE":"485506","HALAVEN":"20","ANASTROZOLE":"265089","RALOXIFENE HCL":"141964","MEGACE ES":"57","CISPLATIN":"90","CAPECITABINE":"27497","SOLTAMOX":"60","AVASTIN":"887","METHOTREXATE SODIUM":"15124","ARIMIDEX":"835","OTREXUP":"3518","XELODA":"644","ADRUCIL":"32","TAMOXIFEN CITRATE":"152600","HERCEPTIN":"628","MEGESTROL ACETATE":"69376","CYCLOPHOSPHAMIDE":"3845","FARESTON":"598","RHEUMATREX":"1","KADCYLA":"54","PERJETA":"157","ABRAXANE":"94","EPIRUBICIN HCL":"2","FLUOROURACIL":"72572","EVISTA":"1297","AROMASIN":"423","AFINITOR":"4275","FASLODEX":"300","DOCETAXEL":"247","AFINITOR DISPERZ":"105","VINORELBINE TARTRATE":"27","DOXIL":"4","TAXOTERE":"0","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"AUG-2017","DOXORUBICIN HCL":"240","ARIMIDEX":"848","IBRANCE":"17557","METHOTREXATE SODIUM":"15775","CYCLOPHOSPHAMIDE":"4116","DOCETAXEL":"220","GEMCITABINE HCL":"237","DOXORUBICIN HCL LIPOSOME":"25","TAMOXIFEN CITRATE":"157840","PERJETA":"148","MEGACE":"5","ELLENCE":"2","EPIRUBICIN HCL":"3","SOLTAMOX":"75","MEGACE ES":"67","AFINITOR":"4593","FEMARA":"767","CISPLATIN":"105","KADCYLA":"45","MEGESTROL ACETATE":"73433","ADRUCIL":"28","DOXIL":"2","OTREXUP":"3436","ABRAXANE":"94","CARBOPLATIN":"379","RALOXIFENE HCL":"146098","VINORELBINE TARTRATE":"46","HERCEPTIN":"654","LETROZOLE":"141303","TYKERB":"1009","AFINITOR DISPERZ":"146","EVISTA":"1434","FARESTON":"641","ANASTROZOLE":"275003","CAPECITABINE":"28310","AROMASIN":"430","FLUOROURACIL":"68413","TREXALL":"1658","IXEMPRA":"3","HALAVEN":"11","XELODA":"750","FASLODEX":"323","METHOTREXATE":"500526","PACLITAXEL":"242","AVASTIN":"1110","EXEMESTANE":"39894","TAXOTERE":"0","NOLVADEX":"0","ADRIAMYCIN":"0","RHEUMATREX":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","GEMZAR":"0"},{"month_year":"JUL-2017","GEMZAR":"1","TAMOXIFEN CITRATE":"155147","PERJETA":"145","EPIRUBICIN HCL":"5","GEMCITABINE HCL":"240","RHEUMATREX":"1","ABRAXANE":"92","METHOTREXATE SODIUM":"14363","ANASTROZOLE":"268550","DOCETAXEL":"224","TREXALL":"1619","DOXORUBICIN HCL LIPOSOME":"19","EVISTA":"1498","SOLTAMOX":"69","RALOXIFENE HCL":"148806","ADRIAMYCIN":"1","MEGACE":"4","AROMASIN":"408","MEGACE ES":"71","EXEMESTANE":"39103","FEMARA":"749","AVASTIN":"910","VINORELBINE TARTRATE":"39","XELODA":"635","HERCEPTIN":"588","CISPLATIN":"114","TYKERB":"944","LETROZOLE":"136376","KADCYLA":"46","CARBOPLATIN":"354","AFINITOR":"4331","HALAVEN":"26","DOXORUBICIN HCL":"212","AFINITOR DISPERZ":"142","ARIMIDEX":"864","FASLODEX":"277","DOXIL":"4","MEGESTROL ACETATE":"70481","METHOTREXATE":"492541","ELLENCE":"1","FLUOROURACIL":"54009","CAPECITABINE":"26852","IBRANCE":"16766","OTREXUP":"3271","CYCLOPHOSPHAMIDE":"3968","ADRUCIL":"25","FARESTON":"650","PACLITAXEL":"241","TAXOTERE":"0","NOLVADEX":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","IXEMPRA":"0"},{"month_year":"JUN-2017","ELLENCE":"1","CISPLATIN":"117","MEGACE ES":"51","SOLTAMOX":"59","FEMARA":"707","KADCYLA":"35","TAMOXIFEN CITRATE":"156859","DOXIL":"6","CYCLOPHOSPHAMIDE":"4132","DOCETAXEL":"217","RALOXIFENE HCL":"145198","HERCEPTIN":"552","AROMASIN":"440","EPIRUBICIN HCL":"9","GEMCITABINE HCL":"213","PACLITAXEL":"272","TREXALL":"1592","ARIMIDEX":"877","CARBOPLATIN":"362","XELODA":"645","AFINITOR":"4334","LETROZOLE":"136863","AVASTIN":"807","FLUOROURACIL":"59830","ANASTROZOLE":"267287","IBRANCE":"16370","AFINITOR DISPERZ":"135","TYKERB":"949","EXEMESTANE":"38758","DOXORUBICIN HCL":"245","VINORELBINE TARTRATE":"32","FASLODEX":"316","METHOTREXATE SODIUM":"14477","METHOTREXATE":"496246","DOXORUBICIN HCL LIPOSOME":"27","MEGESTROL ACETATE":"71488","EVISTA":"1528","ABRAXANE":"97","HALAVEN":"10","FARESTON":"610","CAPECITABINE":"27926","ADRUCIL":"13","PERJETA":"150","RHEUMATREX":"6","MEGACE":"12","OTREXUP":"3536","TAXOTERE":"0","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","IXEMPRA":"0","GEMZAR":"0"},{"month_year":"MAY-2017","METHOTREXATE":"503936","ADRUCIL":"14","AFINITOR DISPERZ":"137","FASLODEX":"380","OTREXUP":"3299","EPIRUBICIN HCL":"12","FLUOROURACIL":"64627","TREXALL":"1659","FARESTON":"650","PACLITAXEL":"247","LETROZOLE":"138971","XELODA":"718","VINORELBINE TARTRATE":"24","ANASTROZOLE":"273665","PERJETA":"137","ARIMIDEX":"836","EVISTA":"1673","AVASTIN":"1303","RHEUMATREX":"15","CARBOPLATIN":"358","DOXIL":"3","ABRAXANE":"108","AROMASIN":"448","CISPLATIN":"114","HALAVEN":"14","METHOTREXATE SODIUM":"13765","DOXORUBICIN HCL":"246","DOXORUBICIN HCL LIPOSOME":"40","SOLTAMOX":"58","IXEMPRA":"1","AFINITOR":"4311","FEMARA":"774","CAPECITABINE":"26600","IBRANCE":"15928","RALOXIFENE HCL":"154668","EXEMESTANE":"39774","TYKERB":"931","TAMOXIFEN CITRATE":"161468","GEMCITABINE HCL":"198","MEGACE ES":"55","CYCLOPHOSPHAMIDE":"4204","MEGESTROL ACETATE":"70818","KADCYLA":"40","DOCETAXEL":"226","HERCEPTIN":"558","MEGACE":"11","TAXOTERE":"0","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"APR-2017","ABRAXANE":"83","FARESTON":"605","FLUOROURACIL":"62863","LETROZOLE":"130304","FASLODEX":"351","METHOTREXATE":"479948","EVISTA":"1756","EXEMESTANE":"37476","ADRUCIL":"13","CYCLOPHOSPHAMIDE":"4016","CISPLATIN":"106","CARBOPLATIN":"373","ARIMIDEX":"845","HALAVEN":"22","METHOTREXATE SODIUM":"12627","AFINITOR DISPERZ":"137","XELODA":"658","RALOXIFENE HCL":"149517","MEGESTROL ACETATE":"68177","VINORELBINE TARTRATE":"22","AVASTIN":"1250","IBRANCE":"15738","DOCETAXEL":"251","ANASTROZOLE":"255971","DOXORUBICIN HCL LIPOSOME":"39","SOLTAMOX":"75","TYKERB":"929","TAMOXIFEN CITRATE":"152973","AROMASIN":"449","AFINITOR":"4201","EPIRUBICIN HCL":"10","IXEMPRA":"3","KADCYLA":"56","PACLITAXEL":"258","RHEUMATREX":"12","GEMCITABINE HCL":"196","PERJETA":"133","TAXOTERE":"2","DOXIL":"3","OTREXUP":"3251","TREXALL":"1623","DOXORUBICIN HCL":"259","FEMARA":"679","HERCEPTIN":"577","CAPECITABINE":"26310","MEGACE":"4","MEGACE ES":"65","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"MAR-2017","METHOTREXATE":"508179","TAMOXIFEN CITRATE":"163285","IBRANCE":"15917","MEGACE":"15","AVASTIN":"1525","LETROZOLE":"137880","FLUOROURACIL":"73771","ANASTROZOLE":"272388","SOLTAMOX":"65","AFINITOR DISPERZ":"134","CARBOPLATIN":"372","GEMCITABINE HCL":"192","EPIRUBICIN HCL":"11","TYKERB":"974","HERCEPTIN":"590","RALOXIFENE HCL":"159083","MEGACE ES":"107","AFINITOR":"4496","ADRUCIL":"21","DOXIL":"9","KADCYLA":"51","FARESTON":"662","FEMARA":"809","DOCETAXEL":"274","OTREXUP":"3170","TREXALL":"1611","TAXOTERE":"2","AROMASIN":"524","EVISTA":"1937","CYCLOPHOSPHAMIDE":"4205","RHEUMATREX":"28","DOXORUBICIN HCL":"277","PERJETA":"132","CISPLATIN":"133","METHOTREXATE SODIUM":"13473","ABRAXANE":"87","EXEMESTANE":"40350","DOXORUBICIN HCL LIPOSOME":"41","FASLODEX":"357","VINORELBINE TARTRATE":"33","MEGESTROL ACETATE":"72610","CAPECITABINE":"27969","HALAVEN":"23","ARIMIDEX":"946","XELODA":"759","PACLITAXEL":"266","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","IXEMPRA":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"FEB-2017","CYCLOPHOSPHAMIDE":"3963","LETROZOLE":"124315","MEGACE ES":"105","FARESTON":"554","CISPLATIN":"107","XELODA":"682","PERJETA":"131","METHOTREXATE SODIUM":"11186","RALOXIFENE HCL":"144347","EVISTA":"1859","MEGACE":"12","ANASTROZOLE":"243980","OTREXUP":"2749","RHEUMATREX":"37","AVASTIN":"1138","CARBOPLATIN":"403","METHOTREXATE":"461381","VINORELBINE TARTRATE":"29","HERCEPTIN":"555","DOCETAXEL":"263","CAPECITABINE":"25465","TAMOXIFEN CITRATE":"148905","ADRUCIL":"34","TYKERB":"906","SOLTAMOX":"61","DOXORUBICIN HCL":"244","MEGESTROL ACETATE":"65359","HALAVEN":"21","ELLENCE":"1","AROMASIN":"434","IBRANCE":"14711","EXEMESTANE":"36576","GEMCITABINE HCL":"246","PACLITAXEL":"286","KADCYLA":"52","ARIMIDEX":"856","FLUOROURACIL":"69605","AFINITOR":"4224","FEMARA":"750","DOXORUBICIN HCL LIPOSOME":"36","FASLODEX":"329","AFINITOR DISPERZ":"136","ABRAXANE":"108","TREXALL":"1517","EPIRUBICIN HCL":"14","TAXOTERE":"0","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","IXEMPRA":"0","GEMZAR":"0","DOXIL":"0"},{"month_year":"JAN-2017","XELODA":"750","PERJETA":"136","HALAVEN":"24","EPIRUBICIN HCL":"11","DOXORUBICIN HCL":"220","IXEMPRA":"2","MEGACE":"17","DOXORUBICIN HCL LIPOSOME":"36","GEMCITABINE HCL":"245","OTREXUP":"2895","SOLTAMOX":"59","NAVELBINE":"2","ANASTROZOLE":"265379","LETROZOLE":"134440","CARBOPLATIN":"396","CAPECITABINE":"25770","CYCLOPHOSPHAMIDE":"4157","ADRUCIL":"39","AROMASIN":"476","CISPLATIN":"114","PACLITAXEL":"229","RALOXIFENE HCL":"159989","KADCYLA":"54","METHOTREXATE SODIUM":"12202","DOCEFREZ":"1","TREXALL":"1584","FLUOROURACIL":"80015","FEMARA":"794","DOCETAXEL":"221","EVISTA":"1902","EXEMESTANE":"39913","TYKERB":"882","MEGACE ES":"124","AVASTIN":"1406","HERCEPTIN":"553","AFINITOR DISPERZ":"153","IBRANCE":"14449","AFINITOR":"4108","FARESTON":"587","RHEUMATREX":"55","FASLODEX":"342","ABRAXANE":"96","MEGESTROL ACETATE":"70508","ARIMIDEX":"977","TAMOXIFEN CITRATE":"162615","METHOTREXATE":"496448","VINORELBINE TARTRATE":"33","TAXOTERE":"0","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","ELLENCE":"0","GEMZAR":"0","DOXIL":"0"},{"month_year":"DEC-2016","FLUOROURACIL":"79057","TYKERB":"990","LETROZOLE":"131271","EVISTA":"2132","AROMASIN":"533","ABRAXANE":"91","DOXIL":"4","FEMARA":"904","TAMOXIFEN CITRATE":"163413","AVASTIN":"1275","EPIRUBICIN HCL":"5","EXEMESTANE":"40282","MEGACE ES":"167","RHEUMATREX":"104","ADRUCIL":"27","TAXOTERE":"2","RALOXIFENE HCL":"160081","TREXALL":"1723","AFINITOR":"4464","SOLTAMOX":"70","CISPLATIN":"97","NAVELBINE":"1","CAPECITABINE":"26853","CYCLOPHOSPHAMIDE":"4358","GEMCITABINE HCL":"202","ARIMIDEX":"1185","AFINITOR DISPERZ":"115","XELODA":"744","FASLODEX":"341","VINORELBINE TARTRATE":"17","OTREXUP":"3258","METHOTREXATE":"502936","FARESTON":"670","PACLITAXEL":"233","HALAVEN":"24","DOXORUBICIN HCL LIPOSOME":"45","KADCYLA":"47","MEGACE":"23","METHOTREXATE SODIUM":"12708","IXEMPRA":"2","IBRANCE":"15086","CARBOPLATIN":"401","DOCETAXEL":"206","PERJETA":"146","ANASTROZOLE":"264009","MEGESTROL ACETATE":"72158","HERCEPTIN":"602","DOXORUBICIN HCL":"218","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"NOV-2016","AVASTIN":"1425","FEMARA":"869","DOCETAXEL":"217","TYKERB":"963","RALOXIFENE HCL":"158327","ARIMIDEX":"1187","IBRANCE":"14042","PACLITAXEL":"261","DOXORUBICIN HCL":"229","MEGESTROL ACETATE":"71590","LETROZOLE":"129540","MEGACE ES":"163","AFINITOR":"4374","ADRUCIL":"29","AFINITOR DISPERZ":"108","CAPECITABINE":"26191","HERCEPTIN":"543","TREXALL":"1568","DOXIL":"2","METHOTREXATE SODIUM":"12038","OTREXUP":"3174","DOXORUBICIN HCL LIPOSOME":"36","TAXOTERE":"4","IXEMPRA":"2","GEMCITABINE HCL":"232","FARESTON":"679","KADCYLA":"44","CARBOPLATIN":"432","EPIRUBICIN HCL":"10","RHEUMATREX":"94","ANASTROZOLE":"255900","MEGACE":"15","SOLTAMOX":"53","CYCLOPHOSPHAMIDE":"4309","CISPLATIN":"99","FLUOROURACIL":"79233","EVISTA":"2011","PERJETA":"146","AROMASIN":"564","TAMOXIFEN CITRATE":"158597","ABRAXANE":"85","FASLODEX":"306","HALAVEN":"19","METHOTREXATE":"491570","XELODA":"835","VINORELBINE TARTRATE":"23","EXEMESTANE":"39332","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"OCT-2016","CYCLOPHOSPHAMIDE":"4262","ARIMIDEX":"1188","KADCYLA":"42","DOXORUBICIN HCL":"222","ABRAXANE":"91","DOCETAXEL":"216","OTREXUP":"3087","VINORELBINE TARTRATE":"23","FEMARA":"875","SOLTAMOX":"48","RHEUMATREX":"113","HERCEPTIN":"594","DOXIL":"1","METHOTREXATE SODIUM":"14583","HALAVEN":"28","EPIRUBICIN HCL":"5","DOXORUBICIN HCL LIPOSOME":"52","AFINITOR":"4551","RALOXIFENE HCL":"165119","MEGESTROL ACETATE":"74909","CISPLATIN":"111","MEGACE":"15","XELODA":"835","EVISTA":"2170","TAMOXIFEN CITRATE":"163652","MEGACE ES":"187","FASLODEX":"295","TYKERB":"731","TAXOTERE":"5","TREXALL":"1560","AFINITOR DISPERZ":"114","IBRANCE":"14051","FARESTON":"632","AROMASIN":"584","CAPECITABINE":"26930","GEMCITABINE HCL":"240","IXEMPRA":"1","PACLITAXEL":"273","FLUOROURACIL":"79182","METHOTREXATE":"496692","CARBOPLATIN":"348","EXEMESTANE":"40313","LETROZOLE":"131746","ANASTROZOLE":"260904","ADRUCIL":"19","AVASTIN":"1330","PERJETA":"152","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"SEP-2016","CISPLATIN":"124","IXEMPRA":"7","KADCYLA":"47","IBRANCE":"13706","LETROZOLE":"129375","PERJETA":"145","DOXIL":"3","RHEUMATREX":"146","ABRAXANE":"115","FASLODEX":"267","GEMCITABINE HCL":"241","HERCEPTIN":"579","XELODA":"861","GEMZAR":"1","FARESTON":"647","MEGACE":"20","AROMASIN":"577","RALOXIFENE HCL":"163186","FLUOROURACIL":"68857","AFINITOR":"4738","CYCLOPHOSPHAMIDE":"4315","FEMARA":"880","ANASTROZOLE":"255994","TREXALL":"1539","CAPECITABINE":"27356","AFINITOR DISPERZ":"117","HALAVEN":"26","EPIRUBICIN HCL":"9","DOXORUBICIN HCL":"244","METHOTREXATE SODIUM":"15848","AVASTIN":"1030","EVISTA":"2155","VINORELBINE TARTRATE":"19","OTREXUP":"3036","DOCETAXEL":"262","EXEMESTANE":"39785","TAXOTERE":"2","DOXORUBICIN HCL LIPOSOME":"40","MEGESTROL ACETATE":"77145","MEGACE ES":"244","SOLTAMOX":"54","METHOTREXATE":"493725","ADRUCIL":"44","TAMOXIFEN CITRATE":"163039","CARBOPLATIN":"401","ARIMIDEX":"1223","TYKERB":"704","PACLITAXEL":"291","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","ELLENCE":"0"},{"month_year":"AUG-2016","OTREXUP":"3040","TYKERB":"1028","SOLTAMOX":"60","FARESTON":"683","EPIRUBICIN HCL":"10","VINORELBINE TARTRATE":"26","MEGACE ES":"263","AROMASIN":"622","TAMOXIFEN CITRATE":"169620","AVASTIN":"1208","EVISTA":"2353","EXEMESTANE":"40756","METHOTREXATE":"504596","HALAVEN":"24","FEMARA":"936","ARIMIDEX":"1291","CAPECITABINE":"28059","METHOTREXATE SODIUM":"16659","MEGACE":"20","FLUOROURACIL":"50582","ABRAXANE":"100","PERJETA":"162","ADRUCIL":"47","TREXALL":"1561","CISPLATIN":"158","CYCLOPHOSPHAMIDE":"4371","MEGESTROL ACETATE":"80544","ANASTROZOLE":"264003","FASLODEX":"306","DOCETAXEL":"277","GEMCITABINE HCL":"280","GEMZAR":"5","IBRANCE":"13438","HERCEPTIN":"643","AFINITOR DISPERZ":"127","CARBOPLATIN":"476","RALOXIFENE HCL":"170954","KADCYLA":"37","DOXORUBICIN HCL":"244","AFINITOR":"4763","DOXORUBICIN HCL LIPOSOME":"52","RHEUMATREX":"138","LETROZOLE":"133161","IXEMPRA":"3","XELODA":"905","DOXIL":"1","PACLITAXEL":"324","TAXOTERE":"0","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","ELLENCE":"0"},{"month_year":"JUL-2016","AFINITOR DISPERZ":"97","ANASTROZOLE":"249944","PACLITAXEL":"342","RHEUMATREX":"125","ARIMIDEX":"1108","CYCLOPHOSPHAMIDE":"4419","XELODA":"876","DOXORUBICIN HCL LIPOSOME":"47","MEGACE":"18","CISPLATIN":"161","AVASTIN":"1006","METHOTREXATE":"481702","IBRANCE":"12844","METHOTREXATE SODIUM":"15423","GEMCITABINE HCL":"260","CAPECITABINE":"27140","SOLTAMOX":"46","RALOXIFENE HCL":"165051","MEGESTROL ACETATE":"75161","DOXORUBICIN HCL":"272","OTREXUP":"2902","TREXALL":"1459","EXEMESTANE":"39685","AFINITOR":"4685","HALAVEN":"23","PERJETA":"146","ABRAXANE":"115","TAXOTERE":"3","LETROZOLE":"125708","HERCEPTIN":"619","MEGACE ES":"248","AROMASIN":"601","ADRUCIL":"39","FLUOROURACIL":"40681","DOXIL":"1","TAMOXIFEN CITRATE":"162022","FEMARA":"932","VINORELBINE TARTRATE":"28","CARBOPLATIN":"446","DOCETAXEL":"286","TYKERB":"990","EVISTA":"2407","EPIRUBICIN HCL":"15","FASLODEX":"265","FARESTON":"659","KADCYLA":"34","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","IXEMPRA":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"JUN-2016","RHEUMATREX":"140","DOCETAXEL":"328","PERJETA":"176","CAPECITABINE":"28321","AFINITOR DISPERZ":"103","FARESTON":"662","MEGACE ES":"308","RALOXIFENE HCL":"168236","AROMASIN":"606","HERCEPTIN":"695","IBRANCE":"13020","ANASTROZOLE":"254479","OTREXUP":"3054","ADRUCIL":"35","TAXOTERE":"1","KADCYLA":"44","FLUOROURACIL":"45713","XELODA":"978","EPIRUBICIN HCL":"17","CARBOPLATIN":"586","MEGACE":"18","DOXIL":"22","EVISTA":"2587","SOLTAMOX":"53","TAMOXIFEN CITRATE":"165710","NAVELBINE":"1","METHOTREXATE":"495869","FASLODEX":"330","VINORELBINE TARTRATE":"23","LETROZOLE":"127975","DOXORUBICIN HCL":"235","ARIMIDEX":"1328","METHOTREXATE SODIUM":"15385","CISPLATIN":"206","HALAVEN":"39","TREXALL":"1432","PACLITAXEL":"420","DOXORUBICIN HCL LIPOSOME":"45","FEMARA":"969","AVASTIN":"1057","IXEMPRA":"7","AFINITOR":"5108","ABRAXANE":"142","EXEMESTANE":"40572","CYCLOPHOSPHAMIDE":"4687","TYKERB":"1064","MEGESTROL ACETATE":"75834","GEMCITABINE HCL":"365","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"MAY-2016","LETROZOLE":"126383","CISPLATIN":"193","FEMARA":"999","OTREXUP":"2948","DOXORUBICIN HCL":"230","FARESTON":"653","ABRAXANE":"162","METHOTREXATE SODIUM":"15554","HERCEPTIN":"819","FLUOROURACIL":"48122","DOXORUBICIN HCL LIPOSOME":"51","KADCYLA":"41","ANASTROZOLE":"250785","METHOTREXATE":"488570","AFINITOR DISPERZ":"98","AVASTIN":"1070","RALOXIFENE HCL":"171205","NAVELBINE":"1","AFINITOR":"4957","CAPECITABINE":"27607","GEMZAR":"1","AROMASIN":"619","TREXALL":"1469","CARBOPLATIN":"578","RHEUMATREX":"135","MEGACE ES":"326","TYKERB":"944","TAXOTERE":"5","FASLODEX":"328","HALAVEN":"29","DOCETAXEL":"324","CYCLOPHOSPHAMIDE":"4952","EXEMESTANE":"40004","GEMCITABINE HCL":"289","ARIMIDEX":"1274","IBRANCE":"12188","ADRUCIL":"32","SOLTAMOX":"36","MEGACE":"24","XELODA":"1092","PERJETA":"188","TAMOXIFEN CITRATE":"165868","EPIRUBICIN HCL":"20","PACLITAXEL":"441","MEGESTROL ACETATE":"74637","DOXIL":"21","VINORELBINE TARTRATE":"32","EVISTA":"2581","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","IXEMPRA":"0","ELLENCE":"0"},{"month_year":"APR-2016","HALAVEN":"41","CISPLATIN":"203","MEGACE ES":"436","SOLTAMOX":"45","VINORELBINE TARTRATE":"39","MEGESTROL ACETATE":"71447","AFINITOR":"5225","AVASTIN":"1033","DOCETAXEL":"323","ABRAXANE":"162","OTREXUP":"2955","DOXORUBICIN HCL":"295","MEGACE":"30","DOXIL":"23","HERCEPTIN":"818","AROMASIN":"596","TYKERB":"1085","PACLITAXEL":"425","CAPECITABINE":"28039","CARBOPLATIN":"566","ANASTROZOLE":"244786","FLUOROURACIL":"61231","AFINITOR DISPERZ":"98","IXEMPRA":"5","RALOXIFENE HCL":"168833","DOXORUBICIN HCL LIPOSOME":"42","FEMARA":"946","NAVELBINE":"3","PERJETA":"191","METHOTREXATE SODIUM":"15058","METHOTREXATE":"486466","EVISTA":"2687","FASLODEX":"327","TAXOTERE":"6","EPIRUBICIN HCL":"23","TREXALL":"1435","FARESTON":"630","ADRUCIL":"49","CYCLOPHOSPHAMIDE":"4804","IBRANCE":"11708","LETROZOLE":"122949","GEMCITABINE HCL":"293","EXEMESTANE":"39569","RHEUMATREX":"156","XELODA":"1032","KADCYLA":"56","TAMOXIFEN CITRATE":"161872","ARIMIDEX":"1229","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"MAR-2016","PERJETA":"191","EXEMESTANE":"40508","CYCLOPHOSPHAMIDE":"5119","ANASTROZOLE":"251040","FLUOROURACIL":"67427","DOXIL":"9","CISPLATIN":"238","CARBOPLATIN":"520","ADRUCIL":"37","AROMASIN":"675","KADCYLA":"54","SOLTAMOX":"43","MEGESTROL ACETATE":"75118","RHEUMATREX":"162","EVISTA":"3027","IBRANCE":"11340","MEGACE ES":"422","DOCETAXEL":"320","AFINITOR DISPERZ":"105","AVASTIN":"1155","FEMARA":"1007","VINORELBINE TARTRATE":"25","RALOXIFENE HCL":"174049","METHOTREXATE SODIUM":"15167","MEGACE":"39","DOXORUBICIN HCL LIPOSOME":"50","DOXORUBICIN HCL":"232","EPIRUBICIN HCL":"15","GEMCITABINE HCL":"335","HERCEPTIN":"798","IXEMPRA":"5","LETROZOLE":"126419","PACLITAXEL":"434","FARESTON":"647","OTREXUP":"2936","XELODA":"1142","ARIMIDEX":"1399","CAPECITABINE":"29581","TAXOTERE":"1","FASLODEX":"339","TREXALL":"1435","HALAVEN":"27","TYKERB":"1092","ABRAXANE":"147","METHOTREXATE":"501723","AFINITOR":"5593","NAVELBINE":"2","TAMOXIFEN CITRATE":"167848","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"FEB-2016","MEGACE ES":"445","CARBOPLATIN":"479","DOXORUBICIN HCL LIPOSOME":"64","VINORELBINE TARTRATE":"36","EPIRUBICIN HCL":"10","METHOTREXATE":"474286","FLUOROURACIL":"67019","FASLODEX":"336","ABRAXANE":"136","DOXIL":"11","HALAVEN":"22","GEMCITABINE HCL":"302","AVASTIN":"1218","CISPLATIN":"210","ANASTROZOLE":"236912","TAMOXIFEN CITRATE":"160157","AFINITOR DISPERZ":"85","MEGESTROL ACETATE":"69403","CYCLOPHOSPHAMIDE":"5079","FEMARA":"963","PERJETA":"194","ARIMIDEX":"1361","IXEMPRA":"4","AROMASIN":"623","FARESTON":"665","TYKERB":"1111","EXEMESTANE":"38918","METHOTREXATE SODIUM":"13991","EVISTA":"2979","ELLENCE":"2","TAXOTERE":"5","ADRUCIL":"37","IBRANCE":"10013","PACLITAXEL":"429","RHEUMATREX":"142","HERCEPTIN":"694","DOXORUBICIN HCL":"306","KADCYLA":"47","XELODA":"1083","CAPECITABINE":"27447","DOCETAXEL":"318","LETROZOLE":"118869","TREXALL":"1382","GEMZAR":"1","OTREXUP":"2681","SOLTAMOX":"43","RALOXIFENE HCL":"166967","MEGACE":"27","AFINITOR":"5246","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0"},{"month_year":"JAN-2016","ADRUCIL":"46","AROMASIN":"638","MEGACE ES":"534","EXEMESTANE":"39361","OTREXUP":"2529","CARBOPLATIN":"483","EPIRUBICIN HCL":"13","IXEMPRA":"8","DOXORUBICIN HCL":"327","MEGACE":"31","EVISTA":"3820","LETROZOLE":"118714","METHOTREXATE":"477479","DOCETAXEL":"314","DOXORUBICIN HCL LIPOSOME":"36","ANASTROZOLE":"238627","TAXOTERE":"1","RHEUMATREX":"152","TAMOXIFEN CITRATE":"161453","HALAVEN":"24","MEGESTROL ACETATE":"71618","METHOTREXATE SODIUM":"14352","AVASTIN":"1266","IBRANCE":"9248","HERCEPTIN":"723","KADCYLA":"46","PACLITAXEL":"362","ELLENCE":"2","RALOXIFENE HCL":"170725","FLUOROURACIL":"72208","CAPECITABINE":"26300","TYKERB":"1028","XELODA":"1106","VINORELBINE TARTRATE":"28","AFINITOR":"5341","GEMZAR":"1","GEMCITABINE HCL":"278","AFINITOR DISPERZ":"82","FASLODEX":"339","PERJETA":"211","ARIMIDEX":"1363","ABRAXANE":"129","DOXIL":"8","CISPLATIN":"215","TREXALL":"1363","SOLTAMOX":"35","FARESTON":"591","FEMARA":"1024","CYCLOPHOSPHAMIDE":"5100","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0"},{"month_year":"DEC-2015","RALOXIFENE HCL":"177643","FEMARA":"1160","AFINITOR":"5911","AVASTIN":"1781","ADRUCIL":"56","CISPLATIN":"191","ABRAXANE":"126","ARIMIDEX":"1433","CARBOPLATIN":"535","XELODA":"1183","MEGACE":"32","DOXORUBICIN HCL":"299","MEGESTROL ACETATE":"75832","DOCETAXEL":"376","TYKERB":"1136","MEGACE ES":"615","HERCEPTIN":"812","CAPECITABINE":"28206","HALAVEN":"18","EXEMESTANE":"40686","TAXOTERE":"4","EPIRUBICIN HCL":"7","FLUOROURACIL":"74443","OTREXUP":"2781","DOXIL":"10","PERJETA":"233","KADCYLA":"52","LETROZOLE":"122390","RHEUMATREX":"201","TAMOXIFEN CITRATE":"170098","METHOTREXATE SODIUM":"15668","FARESTON":"633","IXEMPRA":"12","FASLODEX":"366","AROMASIN":"654","TREXALL":"1478","DOXORUBICIN HCL LIPOSOME":"41","SOLTAMOX":"42","ELLENCE":"1","VINORELBINE TARTRATE":"41","IBRANCE":"8680","EVISTA":"5321","CYCLOPHOSPHAMIDE":"5540","GEMCITABINE HCL":"291","METHOTREXATE":"503313","PACLITAXEL":"396","ANASTROZOLE":"248668","AFINITOR DISPERZ":"90","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","GEMZAR":"0"},{"month_year":"NOV-2015","ANASTROZOLE":"234755","AVASTIN":"1850","METHOTREXATE SODIUM":"14530","HALAVEN":"21","CYCLOPHOSPHAMIDE":"5261","FLUOROURACIL":"68918","AROMASIN":"684","RALOXIFENE HCL":"172617","PACLITAXEL":"393","HERCEPTIN":"745","EPIRUBICIN HCL":"3","DOCETAXEL":"353","XELODA":"1150","DOXORUBICIN HCL LIPOSOME":"41","ARIMIDEX":"1375","TYKERB":"1076","TREXALL":"1421","KADCYLA":"55","FARESTON":"670","MEGESTROL ACETATE":"72809","IXEMPRA":"11","SOLTAMOX":"41","OTREXUP":"2603","PERJETA":"208","TAXOTERE":"5","DOXORUBICIN HCL":"297","RHEUMATREX":"163","EVISTA":"5214","DOXIL":"10","GEMCITABINE HCL":"316","EXEMESTANE":"39347","METHOTREXATE":"476922","FEMARA":"1097","TAMOXIFEN CITRATE":"162549","ADRUCIL":"33","FASLODEX":"335","AFINITOR DISPERZ":"70","NAVELBINE":"2","CARBOPLATIN":"524","LETROZOLE":"117782","MEGACE ES":"652","AFINITOR":"5775","ELLENCE":"6","CISPLATIN":"176","MEGACE":"25","ABRAXANE":"131","IBRANCE":"7769","CAPECITABINE":"25898","VINORELBINE TARTRATE":"30","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","GEMZAR":"0"},{"month_year":"OCT-2015","ARIMIDEX":"1446","IBRANCE":"7535","FLUOROURACIL":"73643","VINORELBINE TARTRATE":"36","CISPLATIN":"184","DOXORUBICIN HCL LIPOSOME":"49","ELLENCE":"8","RALOXIFENE HCL":"178911","AVASTIN":"2111","AFINITOR":"6119","KADCYLA":"67","MEGACE ES":"798","EVISTA":"5797","MEGESTROL ACETATE":"79635","TYKERB":"1201","METHOTREXATE SODIUM":"15095","CARBOPLATIN":"650","IXEMPRA":"6","FASLODEX":"327","TREXALL":"1408","METHOTREXATE":"494038","FEMARA":"1157","PERJETA":"234","TAXOTERE":"7","EPIRUBICIN HCL":"12","LETROZOLE":"121424","MEGACE":"43","DOXIL":"4","SOLTAMOX":"39","DOCETAXEL":"411","NAVELBINE":"1","TAMOXIFEN CITRATE":"166115","ANASTROZOLE":"243077","GEMCITABINE HCL":"293","ABRAXANE":"117","XELODA":"1280","HALAVEN":"36","RHEUMATREX":"182","EXEMESTANE":"40579","ADRUCIL":"41","FARESTON":"634","OTREXUP":"2767","DOXORUBICIN HCL":"314","CYCLOPHOSPHAMIDE":"5625","AFINITOR DISPERZ":"81","CAPECITABINE":"28553","PACLITAXEL":"414","HERCEPTIN":"885","AROMASIN":"716","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","GEMZAR":"0"},{"month_year":"SEP-2015","EVISTA":"6006","AROMASIN":"656","TYKERB":"1176","DOXIL":"9","ADRIAMYCIN":"2","CARBOPLATIN":"586","RHEUMATREX":"156","VINORELBINE TARTRATE":"30","ARIMIDEX":"1516","HALAVEN":"20","MEGESTROL ACETATE":"79023","FARESTON":"663","MEGACE ES":"942","SOLTAMOX":"36","XELODA":"1262","CAPECITABINE":"26910","PACLITAXEL":"369","GEMCITABINE HCL":"322","ADRUCIL":"38","ANASTROZOLE":"237313","FEMARA":"1219","EXEMESTANE":"39802","CISPLATIN":"181","GEMZAR":"1","ELLENCE":"10","TREXALL":"1334","METHOTREXATE SODIUM":"14371","FASLODEX":"315","FLUOROURACIL":"61725","OTREXUP":"2593","AVASTIN":"1721","DOCETAXEL":"342","TAXOTERE":"6","TAMOXIFEN CITRATE":"164840","DOXORUBICIN HCL":"262","MEGACE":"33","AFINITOR DISPERZ":"87","KADCYLA":"48","HERCEPTIN":"840","ABRAXANE":"141","DOXORUBICIN HCL LIPOSOME":"35","METHOTREXATE":"488244","RALOXIFENE HCL":"177444","IXEMPRA":"11","AFINITOR":"6067","EPIRUBICIN HCL":"10","PERJETA":"237","CYCLOPHOSPHAMIDE":"5602","LETROZOLE":"117972","IBRANCE":"6772","NOLVADEX":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0"},{"month_year":"AUG-2015","LETROZOLE":"117893","DOXORUBICIN HCL LIPOSOME":"39","KADCYLA":"41","MEGESTROL ACETATE":"81897","TREXALL":"1268","EXEMESTANE":"40491","DOCETAXEL":"404","OTREXUP":"2598","AVASTIN":"1787","MEGACE ES":"1507","AFINITOR DISPERZ":"80","METHOTREXATE SODIUM":"14222","AFINITOR":"6289","ELLENCE":"5","XELODA":"1339","CAPECITABINE":"27144","AROMASIN":"727","ABRAXANE":"157","HERCEPTIN":"788","EPIRUBICIN HCL":"6","ARIMIDEX":"1450","PERJETA":"246","FEMARA":"1168","SOLTAMOX":"38","METHOTREXATE":"483153","GEMCITABINE HCL":"299","CARBOPLATIN":"587","RHEUMATREX":"164","IXEMPRA":"7","EVISTA":"6193","MEGACE":"43","ANASTROZOLE":"237317","HALAVEN":"29","DOXIL":"9","IBRANCE":"5974","NAVELBINE":"2","FARESTON":"648","ADRUCIL":"33","GEMZAR":"1","TYKERB":"1150","FLUOROURACIL":"41453","TAXOTERE":"5","CISPLATIN":"205","PACLITAXEL":"424","TAMOXIFEN CITRATE":"165692","CYCLOPHOSPHAMIDE":"5759","FASLODEX":"312","RALOXIFENE HCL":"180300","VINORELBINE TARTRATE":"38","DOXORUBICIN HCL":"259","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0"},{"month_year":"JUL-2015","HALAVEN":"26","ANASTROZOLE":"239485","METHOTREXATE":"489315","CISPLATIN":"232","RALOXIFENE HCL":"185293","IBRANCE":"5543","FARESTON":"655","DOXIL":"6","METHOTREXATE SODIUM":"14189","EVISTA":"6766","CARBOPLATIN":"583","ABRAXANE":"134","SOLTAMOX":"38","CAPECITABINE":"28397","FEMARA":"1230","DOXORUBICIN HCL":"263","HERCEPTIN":"824","AFINITOR":"6691","MEGACE ES":"3235","AROMASIN":"753","ADRUCIL":"28","ARIMIDEX":"1478","CYCLOPHOSPHAMIDE":"5913","PACLITAXEL":"369","RHEUMATREX":"177","XELODA":"1448","VINORELBINE TARTRATE":"53","NAVELBINE":"1","GEMCITABINE HCL":"276","AVASTIN":"1594","MEGESTROL ACETATE":"81208","KADCYLA":"42","EXEMESTANE":"40346","TAMOXIFEN CITRATE":"169589","AFINITOR DISPERZ":"57","TYKERB":"1250","PERJETA":"226","FASLODEX":"308","ELLENCE":"5","GEMZAR":"2","IXEMPRA":"9","FLUOROURACIL":"40246","OTREXUP":"2719","DOCETAXEL":"498","TAXOTERE":"5","DOXORUBICIN HCL LIPOSOME":"38","TREXALL":"1308","MEGACE":"33","LETROZOLE":"117937","EPIRUBICIN HCL":"19","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0"},{"month_year":"JUN-2015","PERJETA":"212","CYCLOPHOSPHAMIDE":"5828","METHOTREXATE SODIUM":"13888","MEGACE":"33","ANASTROZOLE":"237845","CARBOPLATIN":"512","ELLENCE":"3","SOLTAMOX":"45","KADCYLA":"54","XELODA":"1539","ARIMIDEX":"1486","DOCETAXEL":"465","HERCEPTIN":"709","EVISTA":"6884","DOXIL":"2","MEGESTROL ACETATE":"79825","HALAVEN":"22","CAPECITABINE":"27181","RALOXIFENE HCL":"183845","GEMCITABINE HCL":"324","AFINITOR":"6691","AFINITOR DISPERZ":"70","DOXORUBICIN HCL LIPOSOME":"40","DOXORUBICIN HCL":"249","EPIRUBICIN HCL":"15","TYKERB":"1224","FLUOROURACIL":"40770","FEMARA":"1286","VINORELBINE TARTRATE":"53","TREXALL":"1303","CISPLATIN":"236","LETROZOLE":"116023","TAXOTERE":"6","AVASTIN":"1629","FASLODEX":"323","MEGACE ES":"3063","TAMOXIFEN CITRATE":"169225","RHEUMATREX":"186","IBRANCE":"4483","FARESTON":"693","PACLITAXEL":"394","ABRAXANE":"125","AROMASIN":"743","IXEMPRA":"9","ADRUCIL":"37","OTREXUP":"2510","METHOTREXATE":"488932","EXEMESTANE":"40355","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","GEMZAR":"0"},{"month_year":"MAY-2015","DOCETAXEL":"449","PACLITAXEL":"388","HALAVEN":"16","METHOTREXATE LPF":"1","CYCLOPHOSPHAMIDE":"5716","FEMARA":"1232","TYKERB":"1314","ANASTROZOLE":"228636","FLUOROURACIL":"40732","ELLENCE":"1","CISPLATIN":"231","GEMCITABINE HCL":"301","RHEUMATREX":"148","CAPECITABINE":"27569","DOXIL":"3","EXEMESTANE":"39517","MEGACE ES":"2972","EVISTA":"6982","AFINITOR DISPERZ":"74","IBRANCE":"3392","METHOTREXATE":"471677","AROMASIN":"775","RALOXIFENE HCL":"180809","SOLTAMOX":"45","VINORELBINE TARTRATE":"58","KADCYLA":"41","CARBOPLATIN":"483","ARIMIDEX":"1509","EPIRUBICIN HCL":"14","TREXALL":"1267","MEGACE":"26","AVASTIN":"1678","XELODA":"1532","LETROZOLE":"111290","ADRUCIL":"12","FARESTON":"636","OTREXUP":"2286","ABRAXANE":"108","TAXOTERE":"7","FASLODEX":"290","HERCEPTIN":"737","METHOTREXATE SODIUM":"12985","AFINITOR":"6784","DOXORUBICIN HCL LIPOSOME":"44","TAMOXIFEN CITRATE":"163519","IXEMPRA":"11","MEGESTROL ACETATE":"76473","PERJETA":"205","GEMZAR":"1","DOXORUBICIN HCL":"246","NOLVADEX":"0","ADRIAMYCIN":"0","DOCEFREZ":"0","NAVELBINE":"0"},{"month_year":"APR-2015","DOXORUBICIN HCL":"255","IBRANCE":"3006","AROMASIN":"763","AFINITOR DISPERZ":"69","CARBOPLATIN":"519","FARESTON":"705","ANASTROZOLE":"230528","RHEUMATREX":"177","FASLODEX":"296","TAMOXIFEN CITRATE":"165482","ABRAXANE":"126","MEGESTROL ACETATE":"78871","METHOTREXATE":"477940","TYKERB":"1276","FEMARA":"1180","AFINITOR":"7166","DOXIL":"5","MEGACE ES":"3031","OTREXUP":"2269","RALOXIFENE HCL":"184420","EPIRUBICIN HCL":"6","TAXOTERE":"5","XELODA":"1683","CYCLOPHOSPHAMIDE":"5870","CISPLATIN":"213","METHOTREXATE SODIUM":"13047","EXEMESTANE":"39600","DOXORUBICIN HCL LIPOSOME":"59","TREXALL":"1314","IXEMPRA":"20","EVISTA":"7538","LETROZOLE":"111066","CAPECITABINE":"29122","PERJETA":"205","SOLTAMOX":"48","ELLENCE":"2","AVASTIN":"1491","FLUOROURACIL":"45432","MEGACE":"32","HERCEPTIN":"699","ARIMIDEX":"1553","DOCETAXEL":"384","PACLITAXEL":"416","GEMCITABINE HCL":"279","ADRUCIL":"12","KADCYLA":"45","NAVELBINE":"1","VINORELBINE TARTRATE":"53","HALAVEN":"18","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","GEMZAR":"0"},{"month_year":"MAR-2015","IXEMPRA":"10","FLUOROURACIL":"47736","MEGESTROL ACETATE":"81030","TAMOXIFEN CITRATE":"168960","EVISTA":"8890","FASLODEX":"314","TYKERB":"1331","FARESTON":"669","IBRANCE":"1888","ADRUCIL":"14","AVASTIN":"1661","RHEUMATREX":"195","CYCLOPHOSPHAMIDE":"6052","GEMCITABINE HCL":"323","KADCYLA":"49","DOXIL":"9","ARIMIDEX":"1674","SOLTAMOX":"35","FEMARA":"1380","XELODA":"1878","DOXORUBICIN HCL LIPOSOME":"47","TREXALL":"1233","METHOTREXATE":"487051","CAPECITABINE":"28291","ELLENCE":"1","RALOXIFENE HCL":"188593","ABRAXANE":"102","DOXORUBICIN HCL":"260","AFINITOR":"7321","PERJETA":"151","EPIRUBICIN HCL":"9","PACLITAXEL":"436","ANASTROZOLE":"235107","HERCEPTIN":"711","CISPLATIN":"183","LETROZOLE":"112890","OTREXUP":"2089","METHOTREXATE SODIUM":"13428","AFINITOR DISPERZ":"76","MEGACE":"46","AROMASIN":"867","CARBOPLATIN":"637","DOCETAXEL":"405","HALAVEN":"25","MEGACE ES":"3581","VINORELBINE TARTRATE":"49","TAXOTERE":"7","EXEMESTANE":"40005","NOLVADEX":"0","ADRIAMYCIN":"0","METHOTREXATE LPF":"0","DOCEFREZ":"0","NAVELBINE":"0","GEMZAR":"0"},{"month_year":"FEB-2015","FARESTON":"623","EVISTA":"8580","IXEMPRA":"16","TYKERB":"1274","OTREXUP":"2053","AFINITOR DISPERZ":"65","VINORELBINE TARTRATE":"47","DOXIL":"12","FASLODEX":"324","ADRIAMYCIN":"1","FLUOROURACIL":"58425","ANASTROZOLE":"213675","HERCEPTIN":"611","CAPECITABINE":"27597","RHEUMATREX":"187","KADCYLA":"49","CYCLOPHOSPHAMIDE":"5445","GEMCITABINE HCL":"374","PACLITAXEL":"357","NOLVADEX":"1","AROMASIN":"779","TREXALL":"1221","XELODA":"1989","FEMARA":"1325","EXEMESTANE":"36602","DOCETAXEL":"378","METHOTREXATE":"452284","DOXORUBICIN HCL LIPOSOME":"49","TAMOXIFEN CITRATE":"155154","RALOXIFENE HCL":"173332","SOLTAMOX":"42","AFINITOR":"6930","DOXORUBICIN HCL":"237","AVASTIN":"1314","HALAVEN":"15","CISPLATIN":"216","MEGESTROL ACETATE":"73882","IBRANCE":"728","TAXOTERE":"11","ARIMIDEX":"1526","METHOTREXATE SODIUM":"11850","PERJETA":"140","LETROZOLE":"102650","MEGACE":"43","ABRAXANE":"125","NAVELBINE":"2","CARBOPLATIN":"543","MEGACE ES":"3245","EPIRUBICIN HCL":"9","ADRUCIL":"41","METHOTREXATE LPF":"0","DOCEFREZ":"0","ELLENCE":"0","GEMZAR":"0"},{"month_year":"JAN-2015","DOCETAXEL":"410","IXEMPRA":"14","CARBOPLATIN":"572","AFINITOR DISPERZ":"59","HALAVEN":"23","DOXORUBICIN HCL LIPOSOME":"58","CAPECITABINE":"28280","TYKERB":"1418","EPIRUBICIN HCL":"9","ADRIAMYCIN":"1","FEMARA":"1274","PERJETA":"132","ADRUCIL":"40","CYCLOPHOSPHAMIDE":"5874","MEGACE ES":"3838","RALOXIFENE HCL":"189526","NAVELBINE":"5","PACLITAXEL":"399","FLUOROURACIL":"68369","MEGACE":"36","XELODA":"2149","HERCEPTIN":"647","FASLODEX":"304","EVISTA":"12016","TAXOTERE":"4","GEMCITABINE HCL":"329","MEGESTROL ACETATE":"81178","AFINITOR":"7306","EXEMESTANE":"39375","RHEUMATREX":"183","TREXALL":"1218","ABRAXANE":"141","AROMASIN":"903","FARESTON":"623","METHOTREXATE":"481805","KADCYLA":"49","ARIMIDEX":"1713","LETROZOLE":"108366","NOLVADEX":"2","OTREXUP":"1951","DOXIL":"11","TAMOXIFEN CITRATE":"166989","ANASTROZOLE":"229971","AVASTIN":"1520","METHOTREXATE SODIUM":"12453","DOXORUBICIN HCL":"259","CISPLATIN":"243","ELLENCE":"2","SOLTAMOX":"41","VINORELBINE TARTRATE":"68","METHOTREXATE LPF":"0","DOCEFREZ":"0","IBRANCE":"0","GEMZAR":"0"}] | |
var xValues = d3.set(data.map(function (d) { return d[x_label_KEY]; })).values(); | |
var verticalList = Object.assign({}, data[0]); | |
delete verticalList[x_label_KEY]; | |
var dataSetValue = d3.keys(data[0]).filter(function(key) { return key !== x_label_KEY; }); | |
// Transpose the data into layers | |
var dataset = d3.layout.stack()( | |
Object.keys(verticalList).map(key => key).map(function( | |
fruit) { | |
return data.map(function(d) { | |
return { | |
x : d[x_label_KEY], | |
y : +d[fruit] | |
}; | |
}); | |
})); | |
// Set x, y and colors | |
var x = d3.scale.ordinal() | |
.rangeBands([width, 0], 0.2, 0) | |
.domain(d3.range(data.length)); | |
var axisRange = d3.range(data.length); | |
axisRange.sort(function(a, b) { | |
return b - a | |
}); | |
var xScale = d3.scale.ordinal() | |
.rangeBands([width, 0], 0.2, 0) | |
.domain(xValues); | |
var y = d3.scale.linear().domain([ 0, d3.max(dataset, function(d) { | |
return d3.max(d, function(d) { | |
return d.y0 + d.y; | |
}); | |
}) ]).range([ height-miniHeight, 0 ]); | |
var ybrushScale = d3.scale.linear().domain( | |
[ 0, d3.max(dataset, function(d) { | |
return d3.max(d, function(d) { | |
return d.y0 + d.y; | |
}); | |
}) ]).range([ miniHeight, 0 ]); | |
var colors = getRandomColor(dataset.length); | |
// Define and draw axes | |
var yAxis = d3.svg.axis().scale(y).orient("left").ticks(5).tickSize(-width, | |
0, 0).tickFormat(function(d) { | |
return d | |
}); | |
var xAxis = d3.svg.axis().scale(x).orient("bottom") | |
var xAxis1 = d3.svg.axis().scale(xScale).tickSize(1, 0) | |
.tickValues(xValues).orient("bottom") | |
svg.append("g").attr("class", "y axis").call(yAxis); | |
// svg.append("g").attr("class", "x axis").attr("transform", | |
// "translate(0," + (height-margin.bottom) + ")").call(xAxis1); | |
var overview = svg.selectAll("g.cost").data(dataset).enter().append("g") | |
.attr("class", "overview").attr("transform", | |
"translate(0," + (marginOverview.top-margin.bottom) + ")"); | |
$('.overview').slice(1).remove(); | |
overview.append("g").attr("class", "x axis").attr("transform", | |
"translate(0," + (heightOverview-margin.bottom-35) + ")").call(xAxis1).selectAll("text") | |
.attr("transform", function(d) { | |
return "rotate(-65)" | |
}).attr("x", "-50") | |
.attr("y", "-10");; | |
overview.append("g").attr("class", "bars").attr("transform", | |
"translate(0," + (heightOverview - margin.bottom-55) + ")").selectAll(".bar") | |
.data(function(d) { | |
return d; | |
}).enter().append("rect").attr("class", "bar").attr("x", | |
function(d) { | |
return (xScale(d.x)); | |
}).attr("width", xScale.rangeBand()).attr("y", function(d) { | |
return -(ybrushScale(d.y0) - ybrushScale(d.y0 + d.y)) | |
}).attr("height", function(d) { | |
return ybrushScale(d.y0) - ybrushScale(d.y0 + d.y); | |
}).style('fill', colors[0]) | |
// Create groups for each series, rects for each segment | |
var groups = svg.selectAll("g.cost").data(dataset).enter().append("g") | |
.attr("class", "cost").style("fill", function(d, i) { | |
return colors[i]; | |
}); | |
var rect = groups.selectAll("rect").data(function(d) { | |
return d; | |
}).enter().append("rect").attr("x", function(d) { | |
return x(d.x); | |
}).attr("y", function(d) { | |
return y(d.y0 + d.y); | |
}).attr("height", function(d) { | |
return y(d.y0) - y(d.y0 + d.y); | |
}).attr("width", xScale.rangeBand()).on("mouseover", function() { | |
tooltip.style("display", null); | |
}).on("mouseout", function() { | |
tooltip.style("display", "none"); | |
}).on( | |
"mousemove", | |
function(d) { | |
tooltip.style("left", d3.event.pageX+10+"px"); | |
tooltip.style("top", d3.event.pageY-25+"px"); | |
tooltip.style("display", "inline-block"); | |
tooltip.select("text").html(""+d.x+":"+d.y+""); | |
}); | |
var axixrange = d3.range(data.length) | |
axixrange.sort(function(a, b) { | |
return b - a | |
}); | |
var xOverview = d3.scale.ordinal().rangeBands([ width, 0 ], 0.8, 0).domain( | |
axixrange); | |
var brush = d3.svg.brush().x(xOverview).extent([ 0, 100 ]).on("brush", | |
brushed); | |
// Draw legend | |
var legend = svg.append('g').selectAll(".legend").data(colors).enter().append("g") | |
.attr("class", "legend").attr("transform", function(d, i) { | |
return "translate(30," + i * 19 + ")"; | |
}); | |
legend.append("rect").attr("x", width - 18).attr("width", 18).attr( | |
"height", 18).style("fill", function(d, i) { | |
return colors[i]; | |
}); | |
legend.append("text").attr("x", width + 5).attr("y", 9).attr("dy", ".35em") | |
.style("text-anchor", "start").text(function(d, i) { | |
switch (i) { | |
case i: | |
return dataSetValue[i]; | |
} | |
}); | |
// Prep the tooltip bits, initial display is hidden | |
var tooltip = d3.select("#chart").append("div").attr("class", "toolTip").style("display", | |
"none"); | |
tooltip.append("text").attr("x", 15).attr("dy", "1.2em").style( | |
"text-anchor", "middle").attr("font-size", "12px").attr( | |
"font-weight", "bold"); | |
overview.append("g").attr("class", "x brush").call(brush).data(data) | |
.selectAll("rect") | |
// -6 is magic number to offset positions for styling/interaction to feel right | |
.attr("y", 0) | |
// need to manually set the height because the brush has | |
// no y scale, i.e. we should see the extent being marked | |
// over the full height of the overview chart | |
.attr("height", 50) // +7 is magic number for styling | |
brushed(); | |
function brushed() { | |
// update the main chart's x axis data range | |
selected = xOverview.domain().filter( | |
function(d) { | |
return (brush.extent()[0] <= xOverview(d)) | |
&& (xOverview(d) <= brush.extent()[1]); | |
}); | |
var start; | |
var end; | |
/* Keep a minimum amount of bars on there to avoid any jank */ | |
if (selected.length > 0) { | |
end = selected[0] + 1; | |
start = selected[selected.length - 1]; | |
} else { | |
start = 0; | |
end = data.length; | |
} | |
var updatedData = data.slice(start, end); | |
$('g.cost').remove(); | |
xScale.domain(d3.range(updatedData.length)); | |
dataset = d3.layout.stack()( | |
Object.keys(verticalList).map(key => key) | |
.map(function(fruit) { | |
return updatedData.map(function(d) { | |
return { | |
x : d[x_label_KEY], | |
y : +d[fruit] | |
}; | |
}); | |
})); | |
x.domain(dataset[0].map(function(d) { | |
return d.x; | |
})) | |
groups = svg.selectAll("g.cost").data(dataset).enter().append("g") | |
.attr("class", "cost").style("fill", function(d, i) { | |
return colors[i]; | |
}); | |
rect = groups.selectAll("rect").data(function(d) { | |
return d; | |
}).enter().append("rect").attr("x", function(d) { | |
return x(d.x); | |
}).attr("y", function(d) { | |
return y(d.y0 + d.y); | |
}).attr("height", function(d) { | |
return y(d.y0) - y(d.y0 + d.y); | |
}).attr("width", xScale.rangeBand()).on("mouseover", function() { | |
tooltip.style("display", null); | |
}).on("mouseout", function() { | |
tooltip.style("display", "none"); | |
}).on( | |
"mousemove", | |
function(d) { | |
tooltip.style("left", d3.event.pageX+10+"px"); | |
tooltip.style("top", d3.event.pageY-25+"px"); | |
tooltip.style("display", "inline-block"); | |
tooltip.select("text").html(""+d.x+":"+d.y+""); | |
}); | |
// Prep the tooltip bits, initial display is hidden | |
overview.select(".x.axis").call(xAxis); | |
} | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment