Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markosko/nativescript-charts
https://github.com/markosko/nativescript-charts
charts nativescript nativescript-plugin
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/markosko/nativescript-charts
- Owner: markosko
- License: other
- Created: 2016-10-28T18:18:52.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-11T15:16:13.000Z (over 7 years ago)
- Last Synced: 2024-09-29T23:21:29.509Z (3 months ago)
- Topics: charts, nativescript, nativescript-plugin
- Language: TypeScript
- Size: 1.99 MB
- Stars: 11
- Watchers: 6
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chart plugin for Nativescript
Standalone plugin, **not part of Telerik UI**Android uses https://github.com/PhilJay/MPAndroidChart
iOS not implemented
Plugin for now contains Line chart type
## Line type:
Add namespace `xmlns:LineChart="nativescript-charts/line-chart"`
*chartSettings* are type of `ILineChart`
*chartData* is type of `ILineSeries`
Each point is object of `{x,y}`
Both can be imported from `nativescript-charts/line-chart`
### Example for LineChart
```typescript
var points = [
{x:1,y:4},
{x:3,y:5.9},
{x:7,y:4},
{x:8,y:10},
{x:10,y:1}
];var lineData:ILineSeries = {
lineData: points,
color:"green",
name:"test",
};var linechartOpts:ILineChart= {
Legend:{
enabled:false,
form:LegendForm.CIRCLE,
},
XAxis:{
textSize:12,
textColor:"green",
position:XPosition.TOP,
axisMinimum:-30,
axisMaximum:30,
drawGridLines:false,
showOnlyMinMax:false,
enabled:true
},
RightYAxis:{
textSize:10,
textColor:"green",
position:YPosition.OUTSIDE_CHART,
axisMaximum:120,
axisMinimum:-10,
showOnlyMinMax:false,
drawGridLines:false,
enabled:true
},
LeftYAxis:{
textSize:10,
textColor:"green",
position:YPosition.OUTSIDE_CHART,
axisMaximum:120,
axisMinimum:-10,
showOnlyMinMax:false,
drawGridLines:false,
enabled:true
},
BaseSettings:{
enabledDescription:false,
drawGridBackground:false,
}
};
``````xml
```