
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Chart JS is a simple yet flexible JavaScript charting library. This gem is a Ruby Domain Specific Language which allows you to easily build charts without touching a single line of JavaScript or HTML.
$ gem install chart_js
A simple example to generate a static html file.
require "chart_js"
ChartJS.line do
file "example.html"
data do
labels ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
dataset "Cats" do
color :random
data [12, 19, 3, 5, 2, 3]
end
dataset "Dogs" do
color :random
data [10, 12, 3, 4, 5, 3]
end
end
end
chart_js
plays well with others.
require "chart_js"
require "sinatra"
get "/" do
chart = ChartJS.line do
data do
labels ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
dataset "Cats" do
color :random
data [12, 19, 3, 5, 2, 3]
end
dataset "Dogs" do
color :random
data [10, 12, 3, 4, 5, 3]
end
end
end
chart.to_html
end
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that chart_js 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.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.