A react-native module for displaying customizable stock charts.
Clone this repository
To run the example app to test your changes to the library, first ensure an Android emulator is running. Then run the following command(s) within the Chart directory.
After running that then run the following command to run android.
yarn example android
Some issues may arise such as gradlew not having execution permissions. For that navigate to the example directory and within the android directory run this command.
chmod 775 gradlew
Chart Input Properties
|dataPoints||An array of IDataPoint datatype values||Data point values to be render onto the Chart.|
|indicators||An array of IIndicator datatype values||Indictor values to render different information line onto the Chart.|
|numberOfTimeLabels||Number||Amount of Time Labels to be displayed.|
|showVolume||Boolean||Determines Volume Bar Chart display.|
|mode||Boolean||Determines Chart display mode.|
|coloring||IChartsColor datatype||Maintains Chart Line customization.|
|obtainPressedIndex()||Callback function||Pressed Data Index Retrieval.|
IChartsColor Input Properties
|axis||String||Colors the Data point line rendered on the Chart display.|
|positiveVolume||String||Colors the Volume Bar Chart where there is a positive upturn.|
|negativeVolume||String||Colors the Volume Bar Chart where there is a negative downturn.|
|dataPoint||String||Maintains the color of any datapoint dots being rendered in the Chart display|
|infoBox||String||Maintains the background color of an Infobox within the Chart display.|
|fontColor||String||Maintains the color of text that appears within the Chart display.|
|backgroundColor||String||Maintains the background color of the Chart.|
|defaultColorList||Array of Strings||Provides default color options if none given.|
Library provide certain range of customization of how the library shows when rendered. These include:
Allows for main data line to be rendered alingside two other indictor lines that represent a simple moving average, and an exponential moving average.
Provides color customization of lines to be displayed.
Contains different graphical displays such as a Volume Bar chart and a Candle Stick Chart options.
Data is based on IEX format for data being displayed.
For specific point detail display, there is a callback function that returns the specfic index of where the point was pressed. This index is returned to the developer/user based on the idea that the developer/user would handle that.
JEST testing functionality is also implemented within the library.