
Research
SAP CAP npm Packages Hit by Mini Shai-Hulud Supply Chain Attack
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.
d3-gtimeline
Advanced tools
Google-like timeline chart. Demo.
If you use NPM, npm install d3-gtimeline. Otherwise, download the latest release.
Creates a function to generate charts on the selection. Use the standard D3 selection.call with datum.
Example below shows how to create the simple chart similar to the one from Google timeline chart manual:
const chart = d3.timeline(),
data = [
["Washington", "", new Date(1789, 3, 30), new Date(1797, 2, 4)],
["Adams", "", new Date(1797, 2, 4), new Date(1801, 2, 4)],
["Jefferson", "", new Date(1801, 2, 4), new Date(1809, 2, 4)],
];
d3.select("div").datum(data).call(chart);
More advanced example (as well based on the data from Google timeline chart manual)
const chart = d3.timeline(),
data = [
["President", "George Washington", new Date(1789, 3, 30), new Date(1797, 2, 4)],
["President", "John Adams", new Date(1797, 2, 4), new Date(1801, 2, 4)],
["President", "Thomas Jefferson", new Date(1801, 2, 4), new Date(1809, 2, 4)],
["Vice President", "John Adams", new Date(1789, 3, 21), new Date(1797, 2, 4)],
["Vice President", "Thomas Jefferson", new Date(1797, 2, 4), new Date(1801, 2, 4)],
["Vice President", "Aaron Burr", new Date(1801, 2, 4), new Date(1805, 2, 4)],
["Vice President", "George Clinton", new Date(1805, 2, 4), new Date(1812, 3, 20)],
["Secretary of State", "John Jay", new Date(1789, 8, 25), new Date(1790, 2, 22)],
["Secretary of State", "Thomas Jefferson", new Date(1790, 2, 22), new Date(1793, 11, 31)],
["Secretary of State", "Edmund Randolph", new Date(1794, 0, 2), new Date(1795, 7, 20)],
["Secretary of State", "Timothy Pickering", new Date(1795, 7, 20), new Date(1800, 4, 12)],
["Secretary of State", "Charles Lee", new Date(1800, 4, 13), new Date(1800, 5, 5)],
["Secretary of State", "John Marshall", new Date(1800, 5, 13), new Date(1801, 2, 4)],
["Secretary of State", "Levi Lincoln", new Date(1801, 2, 5), new Date(1801, 4, 1)],
["Secretary of State", "James Madison", new Date(1801, 4, 2), new Date(1809, 2, 3)],
];
d3.select("div").datum(data).call(chart);
Returns or sets explicit width of the chart. If this value is null, width of the chart is adapted to the width of the parent node.
# timeline.padding([value]) <>
Returns or sets padding value for elements in the timeline.
Returns or sets a boolean value to show/hide the today line on the timescale. Default: false.
# timeline.duration([value]) <>
Returns or sets the duration of the horizontal animation. Default: 0.
Returns or sets array containing colors to be used. Default colorset contains Google colors.
# timeline.reversed([boolean]) <>
If true flips the chart and shows the labels on the right side. Default value is false i.e. left side labels.

FAQs
Google-like timeline chart
We found that d3-gtimeline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.