1.0.0-alpha.2 • Published 3 years ago

@talixo/charts v1.0.0-alpha.2

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

Talixo Charts

UI components for charts

How to install

Package is available as @talixo/charts in NPM registry, so you can use it in your project using npm install @talixo/charts --save or yarn add @talixo/charts.

Requirements

Your package should additionally have some extra dependencies:

  • @talixo/checkbox: ^0.1.0
  • @talixo/shared: ^0.1.0
  • lodash: ^4.17.10
  • prop-types: ^15.6.1
  • react: ^16.2.0
  • react-dom: ^16.2.0
  • react-vis: ^1.9.2

These packages are required by @talixo/charts, but you have to install them manually, to avoid having different versions of these in your application.

Supported props

Chart

It allows any props which are allowed for react-vis 'FlexibleXYPlot'. Additionally, it handles some differently:

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper.
dataChartData[{ dataItems: [] }]Line chart data.
timeSeriesbooleanfalseIdicates if x axis should be displayed as date
typeline or barlineType of chart (line or bar).
xAxisTitlestringn/aX axis title.
yAxisTitlestringn/aY axis title.
zoomablebooleanfalseIndicates if chart is zoomable, can be applied to chart.

PieChart

It allows any props which are allowed for react-vis 'FlexibleXYPlot'. Additionally, it handles some differently:

Property nameTypeDefaultDescription
arcPropsobjectn/aAdditional props that are passed to react-vis ArcSeries.
classNamestringn/aAdditional class name passed to wrapper.
dataPieData{ dataItems: [] }Line chart data.

FilterableChart

It allows any props which are allowed for react-vis 'FlexibleXYPlot'. Additionally, it handles some differently:

Property nameTypeDefaultDescription
legendPositionobjectn/aPosition of the legend relative to chart.
legendPropsstringn/aAdditional props to be passed to legend. Accepts any property which is allowed for Legend Component.
pathToDataItemsarray[]Path to data items tha will be filtered.

Legend

It allows any props which are allowed for div. Additionally, it handles some differently:

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper.
dataItemsChartData or PieData[]Data items to be displayed
directionstringverticalIdicates if x axis should be displayed as date
onClickline or barlineType of chart (line or bar).

Property shapes

ChartData

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to DataSeries (react-vis VerticalBarSeries or Line Series).
colorstringn/aColor of the data series.
dataItemsDataItemn/aData inforamtion to be displayed in chart.
disabledbooleanfalseIndicates if data will be shown in the chart.
labelstringn/aonClick callback, gets the clicked item, index and event as parameter.

DataItem

Property nameTypeDefaultDescription
xstring or numbern/aX axis data.
ystring or numbern/aY axis data.

PieData

Property nameTypeDefaultDescription
dataItemsPieItem[]n/aData inforamtion to be displayed in chart.
titlestringn/aTitle of chart.

PieItem

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to DataSeries (react-vis VerticalBarSeries or Line Series).
colorstringn/aColor of the arc.
disabledbooleanfalseIndicates if data will be shown in the chart.
labelstringn/aLabel of data series.
valuenumber or stringn/aValue of data series.

Changelog

  • 1.0.0 - initial version
1.0.0-alpha.35

3 years ago

1.0.0-alpha.32

3 years ago

1.0.0-alpha.31

3 years ago

1.0.0-alpha.30

3 years ago

1.0.0-alpha.27

3 years ago

1.0.0-alpha.24

3 years ago

1.0.0-alpha.20

4 years ago

1.0.0-alpha.19

4 years ago

1.0.0-alpha.18

4 years ago

1.0.0-alpha.16

4 years ago

1.0.0-alpha.12

4 years ago

1.0.0-alpha.7

4 years ago

1.0.0-alpha.6

4 years ago

1.0.0-alpha.5

4 years ago

1.0.0-alpha.4

4 years ago

1.0.0-alpha.3

4 years ago

1.0.0-alpha.2

4 years ago