New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@gramex/chartbase

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gramex/chartbase

Base utilities for charts

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

@gramex/chartbase

Base utilities for charts

Example

import { layer, getSVG } from "https://cdn.jsdelivr.net/npm/@gramex/chartbase@1";
// Create a new g.layer under <svg id="chart-svg"> ONLY IF it does not exist
layer(d3.select("svg#chart-svg"), "g", "layer");
// Get the viewBox width and height of <svg id="chart-svg">
const { width, height } = getSVG("svg#chart-svg");

Installation

Install via npm:

npm install @gramex/chartbase

Use locally as an ES module:

<script type="module">
  import chartbase from "./node_modules/@gramex/chartbase/dist/chartbase.js";
</script>

Use via CDN as an ES Module:

<script type="module">
  import chartbase from "https://cdn.jsdelivr.net/npm/@gramex/chartbase@1";
</script>

API

See API documentation

Release notes

  • 1.0.3: 18 Aug 2024. Security update
  • 1.0.2: 24 Nov 2023. Fix getSVG() width and height calculation
  • 1.0.0: 31 Oct 2023. Initial release

Authors

Anand S s.anand@gramener.com

License

MIT

Keywords

gramex

FAQs

Package last updated on 28 Oct 2024

Did you know?

Socket

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.

Install

Related posts