1.0.4 • Published 6 months ago

graphjs-react v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

Follow the instructions to install GraphJS-React

$ npm install graphjs-react

Usage

Add GraphJS-React CSS file to your index.js.

import 'graphjs-react/index.css'

Built With

React

License

Distributed under the MIT License.

Documantation

Interfaces

interface ChartColumn {
  y: string | number,
  x: string | number,
  color?: string, 
}
interface TitleProps{
    label:string,
    style?:CSSProperties
}
interface ContextChartXY {
  context: CanvasRenderingContext2D | null
  maxItemWidth: number
}
interface LegendItemProps {
    name: string,
    color: string,
    size?: number
}
interface ChartPointItem extends ChartColumn{
    root:LegendItemProps
}
interface LineChartProps{
    onPointOver?:(e:MouseEvent,item:ChartPointItem)=>void,
    onPointClick?:(e:MouseEvent,item:ChartPointItem)=>void
} 
interface ItemProps {
    /**
     * @description The value of item
     */
    value: number,
    /**
     * @description item name
     */
    name: string,
    /**
     * @description specify a color for background
     */
    backgroundColor: string,
    /**
     * @description text color, It was excluded from Funnel Chart
     */
    textColor?: string
}
interface FunnelChartOptions{
    /**
     * @description high value bg gradient color
     * @default #00308F
     */
    highBarColor:string,
     /**
     * @description low value bg gradient color
     * @default gray
     */
    lowBarColor:string,
     /**
     * @description inline text color
     * @default lightgray
     */
    barInlineTextColor:string,
     /**
     * @description label text color
     * @default black
     */
    labelTextColor:string
}

Notes for 1.0.2

Notes for 1.0.3

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago