Error when building new visualization factory using schemas

I am using Kibana 6.3.2 and followed sample project discussed here: https://www.elastic.co/blog/developing-new-kibana-visualizations

I have the following code as :

import optionsTemplate from './options_template.html';
import { CATEGORY } from 'ui/vis/vis_category';
import { VisFactoryProvider } from 'ui/vis/vis_factory';
import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
import { VisSchemasProvider } from 'ui/vis/editors/default/schemas';


class MyVisualization {
   constructor(el, vis) {
      this.el = el;
      this.vis = vis;

      this.container = document.createElement('div');
      this.container.className = 'myvis-container-div';
      this.el.appendChild(this.container);
   }
   async render(visData, status) {    
	
      return 'done rendering';
   }
   destroy() {
      console.log('destroying');
   }
}

const MyNewVisType = (Private) => {
  const VisFactory = Private(VisFactoryProvider);
  const Schemas = Private(VisSchemasProvider);

  return VisFactory.createBaseVisualization({
    name: 'plugins_force_graph',
    title: 'My New Vis Jalil',
    icon: 'my_icon',
    description: 'Cool new chart',
    category: CATEGORY.BASIC,
    visualization: MyVisualization ,

    editor: 'default',
    editorConfig: {
      optionsTemplate: optionsTemplate , 
       optionsTabs: [
           { title: 'tab 1', template: '<div>Data1</div>' },
           { title: 'tab 2', template: 'Option1' },
           
       ]
    }

  });
}

VisTypesRegistryProvider.register(MyNewVisType);

Visualizer will not appear when Schemas is used.

I moved this over to the kibana category, as this is not an Elasticsearch question.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.