npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

radar-component

v1.0.2

Published

Render sections and targets on a radar

Downloads

1

Readme

Interactive Data Visualization Project

This project consists of an interactive data visualization using D3.js and React. The visualization shows circular elements with sections and points, where users can interact by selecting different sections and points.

Characteristics

  • The visualization shows circular elements with sections and points.
  • Users can click on sections and points to select them.
  • Selected sections and points show a shadow and highlight effect.
  • Section and point labels change color and style when selected.
  • When clicking an element or section, it is returned in the onclick function received by props.

Used technology

-React -D3.js

functional limitations

  • If a section is covered by another, it is not selectable.
  • If a point is in the same position as another, it is not selectable.
  • The label value must be unique.

Available Properties

  • data: An object of data containing the necessary information for the visualization.
  • onClick: A click event handler function called when a section or point is clicked.
  • config: style config.

Available Data Properties

  • sections: sections array(Example Value:{label, startAngle, endAngle, innerRadius, outerRadius, startElevation, endElevation, color, selected}).

    • label:string(key)
    • startAngle:number(0-360)
    • endAngle:number(0-360)
    • innerRadius:number(0-1)
    • outerRadius:number(0-1)
    • startElevation:number
    • endElevation:number
    • color:string
    • selected:boolean
  • targets: sections array(Example Value:{label, angle, radius, elevation, color, selected}).

    • label:string(key)
    • angle:number(0-360)
    • radius:number(0-1)
    • elevation:number
    • color:string
    • selected:boolean

Available Config Properties

  • radius: The radius of the main circle in the visualization. (Default value: 200).

  • numCircles: The number of concentric circles in the visualization. (Default value: 9).

  • colorCircles: The color of the concentric circles. (Default value: "green").

  • circleStroke: The stroke of the circles. (Default value: 3).

  • numLines: The number of lines originating from the center of the circle. (Default value: 24).

  • opacityLines: The opacity of the lines originating from the center of the circle. (Default value: 0.1).

  • strokeLines: The stroke thickness of the lines originating from the center of the circle. (Default value: 2).

  • colorLines: The color of the lines originating from the center of the circle. (Default value: "green").

  • north: The label indicating the north direction. (Default value: "N").

  • opacity: The opacity of elements in the visualization. (Default value: 0.4).

  • sectionLabelFontSize: The font size for section labels. (Default value: "12px").

  • sectionLabelFontWeight: The font weight for section labels. (Default value: "bold").

  • sectionLabelDefaultColor: The default font color for section labels. (Default value: "rgb(100, 100, 100)").

  • sectionLabelSelectedColor: The font color for selected section labels. (Default value: "whitesmoke").

  • unSelectedSectionLabelShadow :The shadow for unselected section labels. (Default value: "drop-shadow(0px 0px 0.7px rgba(0, 0, 0, 1))"),

  • selectedSectiondropShadowFilter: The shadow filter for selected sections. (Default value: "drop-shadow(0px 1.5px 1.5px rgba(0, 0, 0, 0.6))").

  • unSelectedSectiondropShadowFilter: The shadow filter for unselected sections. (Default value: "drop-shadow(0px 1.5px 1.5px rgba(0, 0, 0, 0.5))").

  • sectionRectWidth: The width of the rectangle for sections. (Default value: (radius) => radius * 0.08).

  • sectionRectHeight: The height of the rectangle for sections. (Default value: (radius) => radius * 0.08).

  • sectionBorderStroke: The border thickness of sections. (Default value: 2).

  • sectionStrokeColor: The border color of sections. (Default value: "white").

  • sectionRecBorderSrtoke: The border thickness of the section rectangle. (Default value: "1").

  • unselecteSectionRecColor: The background color of unselected section rectangles. (Default value: "white").

  • selectedSectionRecBorderColor: The border color of selected section rectangles. (Default value: "black").

  • unselectedSectionRecBorderColor: The border color of unselected section rectangles. (Default value: "white").

  • pointLabelFontSize: The font size for point labels. (Default value: "12px").

  • pointLabelFontWeight: The font weight for point labels. (Default value: "bold").

  • pointLabelTextColor: The font color for point labels. (Default value: "whitesmoke").

  • pointLabelTextShadow: The text shadow for point labels. (Default value: "0 0 1px black, 0 0 1px black").

  • pointRectWidth: The width of the rectangle for points. (Default value: (radius) => radius * 0.03).

  • pointRectHeight: The height of the rectangle for points. (Default value: (radius) => radius * 0.03).

  • pointBorderStroke: The border thickness of points. (Default value: 1.4).

  • selectedPointRectborderShadow: The border shadow of selected point rectangles. (Default value: (color) => drop-shadow(0px 0px 3px ${color})).

  • unSelectedPointRectborderShadow: The border shadow of unselected point rectangles. (Default value: "drop-shadow(0px 1.5px 1.5px rgba(0, 0, 0, 0.5))").

  • selectedPointStrokeColor: The border color of selected points. (Default value: "white").

  • pointRectRx: The horizontal radius of the corners of point rectangles. (Default value: 12).

  • pointRectRy: The vertical radius of the corners of point rectangles. (Default value: 12).