Hello,
I'm building a plugin application for Kibana 6.2.4 and I would like to add a Chart. I injected this directive ZingChart-AngularJS.
This is my app.js:
import { uiModules } from 'ui/modules';
import uiRoutes from 'ui/routes';
import 'angular-ui-bootstrap';
import 'zingchart-angularjs';
import 'ui/autoload/styles';
import './less/style.less';
import index from './templates/index.html';
uiRoutes.enable();
uiRoutes
.when('/', {
template: index,
controller: 'getAllAlertsController',
controllerAs: 'controller'
});
uiModules
.get('app/my_alerts',['ui.bootstrap', 'zingchart-angularjs'])
.controller('getAllAlertsController', function ($scope) {
$scope.myData = [1,4,5,5,10];
});
And this is my index.html:
<!--<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script> -->
<script src="https://cdn.zingchart.com/zingchart.min.js"></script>
<script src="https://cdn.zingchart.com/angular/zingchart-angularjs.js"> </script>
<div class="container">
<div class="row col-md-12 panel-default">
<div class="panel-heading">
<h1> My Alerts </h1>
</div>
<div class="panel-body">
<zingchart id="chart-1" zc-values="controller.myData"></zingchart>
</div>
</div>
</div>
I run npm install zingchart-angularjr, I imported it in app.js and check my network ! Everything loaded ! But I've this error in my console: zingchart is not defined
This my first time where I injected something into Kibana App. My code is fine, no?