Hello,
Based on Peter Pišljar's example (https://www.elastic.co/blog/developing-new-kibana-visualizations), I'm trying to embed a visualization inside my kibana plugin.
My controller looks like this:
app.controller('TestVisApp', function ($scope, Private, serviceSettings) {
const visContainer = $('.test-vis-app-visualize');
getVisualizeLoader().then(loader => {
loader.embedVisualizationWithId(visContainer, '68a473b0-8168-11e8-b601-d5f98337454c',
{
timeRange: {
from: 'now-1y',
to: 'now'
}
});
});
});
Nevertheless, no matter which visualization id I try, I get the following error:
Uncaught TypeError: Cannot read property 'from' of undefined (https://131.101.126.10:5601/zrq/bundles/vendors.bundle.js?v=8467:1903)
Error: Uncaught TypeError: Cannot read property 'from' of undefined (https://131.101.126.10:5601/zrq/bundles/vendors.bundle.js?v=8467:1903) at window.onerror (https://131.101.126.10:5601/zrq/bundles/commons.bundle.js?v=8467:36474:16)
Here's the browser log:
:5601/zrq/bundles/commons.bundle.js?v=8467:734 Error: Uncaught TypeError: Cannot read property 'from' of undefined (https://131.101.126.10:5601/zrq/bundles/vendors.bundle.js?v=8467:1903)
_ at window.onerror (:5601/zrq/bundles/commons.bundle.js?v=8467:36474)_
Notifier.showFatal @ :5601/zrq/bundles/commons.bundle.js?v=8467:734
:5601/zrq/bundles/vendors.bundle.js?v=8467:1903 Uncaught TypeError: Cannot read property 'from' of undefined
_ at Timefilter.calculateBounds (:5601/zrq/bundles/commons.bundle.js?v=8467:33417)
_ at Timefilter.getBounds (:5601/zrq/bundles/commons.bundle.js?v=8467:33412)_
_ at getUpdateStatus (:5601/zrq/bundles/commons.bundle.js?v=8467:20052)_
_ at Object.callee$ (:5601/zrq/bundles/commons.bundle.js?v=8467:40108)
_ at tryCatch (:5601/zrq/bundles/vendors.bundle.js?v=8467:193098)_
_ at Generator.invoke [as invoke] (:5601/zrq/bundles/vendors.bundle.js?v=8467:193336)
_ at Generator.prototype.(anonymous function) [as next] (https://131.101.126.10:5601/zrq/bundles/vendors.bundle.js?v=8467:193150:21)_
_ at step (:5601/zrq/bundles/commons.bundle.js?v=8467:40003)_
_ at :5601/zrq/bundles/commons.bundle.js?v=8467:40003_
:5601/zrq/bundles/commons.bundle.js?v=8467:698 Uncaught Error: Uncaught TypeError: Cannot read property 'from' of undefined (https://131.101.126.10:5601/zrq/bundles/vendors.bundle.js?v=8467:1903)
_ at window.onerror (:5601/zrq/bundles/commons.bundle.js?v=8467:36474)_
:5601/zrq/bundles/commons.bundle.js?v=8467:1010 tabify agg response
:5601/zrq/bundles/commons.bundle.js?v=8467:1006 complete in 0.90ms
Any ideas?
I am using Kibana 6.2.1 and Elasticsearch 6.2.1.
Thanks in advance,
Arturo.