I want to run Visualize's sample code using the visualization directive described below with kibana 6.0.0-rc2.
Although no error is output to the server console or the browser console,
Visualize is not displayed and it is a completely white screen.
https://www.elastic.co/guide/en/kibana/master/development-embedding-visualizations.html
The code is as below.
・index.html
<div ng-controller="KbnTestController" class="test_vis">
<visualization vis='vis' vis-data='visData'></visualize>
</div>
・app.js
import { uiModules } from 'ui/modules';
import uiRoutes from 'ui/routes';
import template from './template/index.html';
import { VisProvider } from 'ui/vis';
import './less/app.less';
import 'ui/courier';
import 'ui/modals';
uiRoutes.enable();
uiRoutes
.when('/', {
template
});
uiModules.get('kibana')
.controller('KbnTestController', function ($scope, Private) {
const Vis = Private(VisProvider);
const visConfig = {
type: 'metric'
};
$scope.vis = new Vis('b9e56600-a27d-11e7-94dc-eb7c16196973', visConfig);
$scope.visData = [{ columns: [{ title: 'Count' }], rows: [[ 1024 ], [ 256 ]] }];
});
・app.less
@import (reference) "~ui/styles/mixins.less";
.test_vis-app {
display: flex;
flex-direction: column;
flex: 1 1 100%;
}
.test_vis, visualize, visualization {
display: flex;
flex: 1 1 100%;
}
Please tell me how you can fix Visualize if you modify it.
Thank you.