React Native module for Flexmonster Pivot Table & Charts
This repository holds the source code for using Flexmonster Pivot in React Native applications.
Getting Started
If you don’t have React Native app, you can create it by running in the console:
npm install -g expo-cli
expo init my-app
cd my-app
expo start
You can find more information here: React Native: Getting Started
Add Flexmonster React Native module by running in the console:
npm i react-native-flexmonster --save
Include FlexmonsterReactNative
into App.js
:
import * as FlexmonsterReactNative from 'react-native-flexmonster';
Insert a pivot table into App.js
:
class FlexmonsterReactNativeApp extends React.Component<{}, { licenseKey: string, report: object }> {
private flexmonsterRef = React.createRef<FlexmonsterReactNative.Pivot>();
constructor(props) {
super(props);
// .................... // your code here
this.state = {
// .................... // your code here
licenseKey: "LICENSE_KEY",
report: {
// add your report object here
}
}
}
render() {
return (
<View style={{ flex: 1 }}>
<FlexmonsterReactNative.Pivot
licenseKey={this.state.licenseKey}
report={this.state.report}
/>
</View>
);
}
}
Usage
Available attributes for FlexmonsterReactNative.Pivot
:
report
– property to set a report. It can be inline Report Object or URL to report JSON.licenseKey
– the license key.
License
Here is Flexmonster licensing page. We have free 30 day trial!
Flexmonster React module is released as a MIT-licensed (free and open-source) add-on to Flexmonster Pivot.
Support & feedback
Please share your feedback or ask questions via Flexmonster Forum.