Skip to content

Instantly share code, notes, and snippets.

@ryanvgates
Created May 14, 2015 02:16
Show Gist options
  • Save ryanvgates/60e1dfc70b55967bd64b to your computer and use it in GitHub Desktop.
Save ryanvgates/60e1dfc70b55967bd64b to your computer and use it in GitHub Desktop.
Step 6 - Debugging Tip
g = new Dygraph(
// containing div
document.getElementById("graphdiv"),
// CSV or path to a CSV file.
"Fort Lauderdale Data Snapshot-Reoriented.csv",
{
title: 'Fort Lauderdale Budget Data',
width: 800,
height: 480,
axisLabelWidth: 100,
hideOverlayOnMouseOut: false,
axes: {
y: {
axisLabelFormatter: formatLikeCurrency,
valueFormatter: formatLikeCurrency,
}
},
}
);
function formatLikeCurrency(x) {
return numeral(x).format('($ 0.00 a)');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment