This is a migrated thread and some comments may be shown as answers.

Can't find variable: TKChartDelegate

3 Answers 87 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Raúl
Top achievements
Rank 1
Raúl asked on 18 Jan 2017, 05:36 PM

NativeScript version: 2.4.0
iOS SDKs version: 10.1
Version of UI for NativeScript: 1.5.1
IDE: Visual Studio Code.

Using angular 2.

Using Iphone 7 on simulator.

Hello, I only added the UI with npm i nativescript-telerik-ui-pro and tns plugin install nativescript-telerik-ui-pro

Then I just import in my main module in declarations array:

import { CHART_DIRECTIVES } from 'nativescript-telerik-ui-pro/chart/angular';

And I'm getting this error:

1   0x10ed005dc -[TNSRuntime executeModule:referredBy:]
2   0x10ae00d02 main
3   0x110d7868d start
file:///app/tns_modules/nativescript-telerik-ui-pro/chart/chart.js:151:55: JS ERROR ReferenceError: Can't find variable: TKChartDelegate
Jan 18 10:54:55 mba com.apple.CoreSimulator.SimDevice.BBBDDC7A-4EEC-4F8E-B6A9-B5C1534B0E30.launchd_sim[69718] (UIKitApplication:org.nativescript.bluedragonapp[0xf949][65367]): Service exited due to Segmentation fault: 11

 anyone know something about this issue?

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Tsonev
Telerik team
answered on 19 Jan 2017, 04:07 PM
Hi,

I reviewed your problem, was unable to reproduce this behavior on my side.

As a solution, you could try to delete platforms and hooks folders from the project.
Clear  cache, while using  cache clear command, then try to rebuild the app with ` run ios`.

If this does not help, please build your app with  run ios --log trace and send us the full log from the terminal.

the ticket, you could use only tns plugin add <plugin_name>`, while installing . The  command will save the plugin as a dependency in the project package. file and will download the plugin in folder.


Hope this helps

Regards,
nikolay.tsonev
Telerik by Progress
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
0
Dipanjan
Top achievements
Rank 1
answered on 19 Jan 2017, 06:42 PM

Thank you so much.

The error is gone, the only thing is that I follow the get started guide in the docs to plot s simple graph, but the graph is not displayed.

the only log I get is this:

[Graphics] UIColor created with component values far outside the expected range. Set a breakpoint on UIColorBreakForOutOfRangeColorComponents to debug. This message will only be logged once.

0
Accepted
Nikolay Tsonev
Telerik team
answered on 20 Jan 2017, 02:01 PM
Hi,

Could you provide some code snippets or sample project, where the problem could be reproduced? We tried to reproduce this error, the given information is not enough to investigate the problem further.

For you I am also providing sample code, where has been used 
app.module.ts
........
import { CHART_DIRECTIVES } from 'nativescript-telerik-ui-pro/chart/angular';
 
@NgModule({
    declarations: [AppComponent, CHART_DIRECTIVES],
    bootstrap: [AppComponent],
    imports: [NativeScriptModule],
    schemas: [NO_ERRORS_SCHEMA]
})
export class AppModule { }

app.component.html
<RadCartesianChart tkExampleTitle tkToggleNavButton>
    <CategoricalAxis tkCartesianHorizontalAxis></CategoricalAxis>
    <!-- >> chart-line-axis -->
    <LinearAxis tkCartesianVerticalAxis></LinearAxis>
    <!-- << chart-line-axis -->
    <LineSeries tkCartesianSeries [items]="categoricalSource" categoryProperty="Country" valueProperty="Amount"></LineSeries>
</RadCartesianChart>

app.component.ts

import { Component } from "@angular/core";
import {ObservableArray} from "data/observable-array"
 
 
@Component({
    selector: "my-app",
    templateUrl: "app.component.html",
})
export class AppComponent {
       public categoricalSource: Array<any>;
   
    constructor() { }
   
    ngOnInit() {
        this.categoricalSource = [
            { Country: "Germany", Amount: 15, SecondVal: 14, ThirdVal: 24, Impact: 0, Year: 0 },
            { Country: "France", Amount: 13, SecondVal: 23, ThirdVal: 25, Impact: 0, Year: 0 },
            { Country: "Bulgaria", Amount: 24, SecondVal: 17, ThirdVal: 23, Impact: 0, Year: 0 },
            { Country: "Spain", Amount: 11, SecondVal: 19, ThirdVal: 24, Impact: 0, Year: 0 },
            { Country: "USA", Amount: 18, SecondVal: 8, ThirdVal: 21, Impact: 0, Year: 0 }
        ];
    }
 
}


Hope this helps.
Regards,
nikolay.tsonev
Telerik by Progress
Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Tags
Chart
Asked by
Raúl
Top achievements
Rank 1
Answers by
Nikolay Tsonev
Telerik team
Dipanjan
Top achievements
Rank 1
Share this question
or