-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Chart Data dependency issue #86
Comments
Thanks for looking into migrating the plugin to 6.0. You should be able to completely get ride of You can safely remove the following modifyToDsl, aggFilter, vis.aggs watch, and respProcessor. Then Where is your fork? Give the above a try and let me know if you get stuck. |
Hey @nreese I made the changes you suggested and some others in utils.js to make the plugin work. Thank you |
I happen to be trying to migrate this to Kibana 6.x as well. The issue pranshu1955 is seeing is because chartData is null in draw() after removing the code recommended by nreese and so it exits without drawing. I do not understand what should be done here in draw() to set the previously uninitialized chartData to something which holds the data from the esResponse -
I tried tracing through the former buildChartData code to understand what structure should go there, and I have read various plugin-building blogs and documentation, but I can't find anything that shows how to set up this field when adding markers. Thank you for any help. |
Ahh. So you meant to pass esResponse rather than chartData. I tracked down that callbacks.js was using chart.geohashGridAgg and that kibana's maps_visualization.js makes use of esResponse.geohashGridAgg and realized that is what you meant. |
Hey @carakel |
@carakel I am stuck at the same as you are.
@nreese Is there a way through which BuildChartData can be used in Kibana 6 because it doesn't seem to work without it. Thanks |
Because of my workplace requirements, I cannot post code/intellectual property publicly without going through a two-month release review cycle. So, all I can post is that I commented out this chartData call -
// chartData = respProcessor.process(resp); And changed draw() to this --
// if(!chartData) return;
When it drops through to TimeMapMap's use of chart.geoHashGridAdd, it will be referring to the one in esResponse, not chartData. I still don't have it running - whenever I run kibana, I get the module2.default error when it loads. I have gone through all of the code in the plugin trying to change the default references to named references but I still get the error. I'm not sure why you don't see it; I am using 6.1.3 and I had to edit lots of files including ones you don't show changing such as - public/lib/jquery.minicolors/minicolors.js, e.g. - var module = require('ui/modules').get('kibana/enhanced_tilemap'); vs import { uiModules } from 'ui/modules'; |
@pranshu1995 Try moving |
@nreese The real problem is that chartData in : I moved responseConverter as a top level property, and even tried to pass explicitly pass the resp to AggResponseGeoJsonProvider and resp.tables too. @carakel Can you look into this too if it works out? Thanks |
Hey guy,
|
@SSa-KrVf47FD Thanks for looking into getting the plugin to run in 6.x. 6.x changed the way plugins interact with the elasticsearch results. In 5.x, the plugin was getting the raw JSON response from elasticsearch which included the aggregation results under |
Thanks @nreese for the quick reply ! I figured as much. But what i still can't figure is what the draw function will use as data. Should the resp from esResponse be processed before calling draw() or should the rest of the functions that use the old chartData be modified to support the new structure ? |
Hey |
Hi @nreese
I've been trying to migrate your plugin to Kibana v6.1.2
Now the problem is, when trying to import Build Chart Data from 'ui/vislib_vis_type/build_chart_data'
The file doesn't exist in Kibana v6.1.2 at the mentioned path.
I even tried to explicitly copy the required file at the same path, but it gives an error :
Respective code :
import { VislibVisTypeBuildChartDataProvider } from 'ui/vislib_vis_type/build_chart_data'; const buildChartData = Private(VislibVisTypeBuildChartDataProvider); // This throws the following error
And it originates here in the bundled file :
var buildChartData = Private(_build_chart_data.VislibVisBuildChartData)
Is it possible that maybe this file exists somewhere else Kibana 6 and I can load it from there.
Or some changes that I can make in the same file to make it work?
Please help out.
Thank you
The text was updated successfully, but these errors were encountered: