@luchillo17,
I was using ng2-charts and chart.js version 1.x.x (don’t remember which one). It was working ok. (by the way, where did you find chart.ts file?)
Then, suddenly, no more labels.
I upgraded to the latest 1.x.x. Suddenly, no more graph. Only 4 colors dots representing the 4 labels. Maybe it was at the same time I upgraded to new Ionic, angular and other librairies needed to work with Ionic. Not sure.
I then tried to use the latest version (2.x) because I thought maybe it was the issue. Got worst!
My original package.json looks like this:
{
"dependencies": {
"angular2": "2.0.0-beta.15",
"chart.js": "1.1.1",
"es6-shim": "^0.35.0",
"ionic-angular": "2.0.0-beta.6",
"ionic-native": "^1.1.1",
"ionicons": "3.0.0-alpha.3",
"ng2-charts": "^1.0.3",
"ng2-translate": "1.11.1",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.6.12"
},
"devDependencies": {
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-watch": "4.3.5",
"ionic-gulp-browserify-typescript": "^1.0.0",
"ionic-gulp-fonts-copy": "^1.0.0",
"ionic-gulp-html-copy": "^1.0.0",
"ionic-gulp-sass-build": "^1.0.0",
"ionic-gulp-scripts-copy": "^1.0.1",
"run-sequence": "1.1.5"
},
"name": "nexusionic",
"description": "NexusIonic: An Ionic project",
"cordovaPlugins": [
"cordova-sqlite-storage",
"cordova-plugin-camera",
"cordova-plugin-file",
"cordova-plugin-x-toast",
"phonegap-plugin-barcodescanner",
"cordova-plugin-statusbar",
"cordova-plugin-whitelist",
{
"locator": "https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git",
"id": "cordova-plugin-datepicker"
},
"cordova-plugin-globalization",
"cordova-plugin-network-information"
],
"cordovaPlatforms": [
{
"platform": "android",
"locator": "windows"
}
]
}
I have the chart.ts in my ‘app’ root. Still don’t know where that file comes from. I thought I could find it in ng2-chart or chart.js node directory, but nope. I took it from @ihadeed example that he put in your post.
In ts page file, I have:
import {CHART_DIRECTIVES} from '../../charts';
What am I missing?