Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codersrank/skills-chart

Package Overview
Dependencies
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codersrank/skills-chart

CodersRank skills chart widget

  • 0.9.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

CodersRank Skills Chart Widget

CodersRank Skills Chart Widget is a web component that allows you easily integrate nice looking skills chart from your CodersRank profile to your personal website:

Install from NPM

Widget script available through NPM:

npm i @codersrank/skills-chart --save

After installation you need to import and register web component:

import CodersRankSkillsChart from '@codersrank/skills-chart';

// register web component as <codersrank-skills-chart> element
window.customElements.define('codersrank-skills-chart', CodersRankSkillsChart);

Install from CDN

Widget can also be downloaded or linked directly from CDN:

<!-- replace x.x.x with actual version -->
<script src="https://unpkg.com/@codersrank/skills-chart@x.x.x/codersrank-skills-chart.min.js"></script>

In this case it is not required to register web component, it is already registered as <codersrank-skills-chart> element.

Usage

As it is a web component the usage is pretty simple, just add widget HTML tag with your CodersRank username

<codersrank-skills-chart username="YOUR_USERNAME"></codersrank-skills-chart>

Widget Attributes

Widget supports following properties as HTML element attributes:

NameTypeDefaultDescription
usernamestringYour CodersRank username
labelsbooleanfalseDisplay chart labels (chart axis with dates)
legendbooleanfalseDisplay legend below the chart
tooltipbooleanfalseEnables tooltip with number of activities per day
skillsstringAllows to specify skills to display in chart. For example skills="JavaScript, Vue, CSS"
svg-widthnumber640Render width of chart's SVG element. Ideally should match actual chart width
svg-heightnumber320Render height of chart's SVG element. Ideally should match actual chart height

For example, to enable labels, legend and tooltip:

<codersrank-skills-chart
  username="YOUR_USERNAME"
  labels
  legend
  tooltip
></codersrank-skills-chart>

Styling

It is possible to customize widget colors with CSS Custom Properties (CSS Variables) by setting them directly on the widget element with style attribute or in CSS.

There are following CSS Custom Properties are available:

PropertyValue
--font-familyOpen Sans, Helvetica Neue, Helvetica, Arial, sans-serif
--svg-width100%
--svg-heightauto
--axis-bg-colorrgba(0, 0, 0, 0.35)
--hidden-area-color#ddd
--label-text-colorinherit
--label-font-size10px
--label-font-weight500
--legend-text-colorinherit
--legend-disabled-text-color#ccc
--legend-font-size14px
--preloader-color#72a0a8
--tooltip-font-size12px
--tooltip-total-font-size16px
--tooltip-total-font-weightbold

Contribution

Yes please! See the contributing guidelines for details.

Licence

This project is licensed under the terms of the MIT license.

Keywords

FAQs

Package last updated on 21 Oct 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc