Skip to content

rashidkpc/canvas-dynamic-layout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

canvas_dynamic_layout

Pseudo elements for dynamically generating and laying out Canvas elements. Totally unsupported.


Installation

This isn't designed to be distributable (or even usable), but if you're crafty you can get it going. It requires Kibana master as of whenever the last commit to this repo was. I can't make any promises otherwise.

See the kibana contributing guide for instructions setting up your development environment. Once you have completed that, use the following yarn scripts.

  • yarn kbn bootstrap

    Install dependencies and crosslink Kibana and all projects/plugins.

    IMPORTANT: Use this script instead of yarn to install dependencies when switching branches, and re-run it whenever your dependencies change.

  • yarn start

    Start kibana and have it include this plugin. You can pass any arguments that you would normally send to bin/kibana

    yarn start --elasticsearch.hosts http://localhost:9220
    

Usage

Whoa whoa whoa. Ok, here's an example. You can probably sort it out from here. At very least you can drop that into your workpad and hack, right?

screenshot

demodata | 
layoutElements by=project 
 elements={
  positionElement 
   element={markdown {getCell project} font={font align="center" color=#fff size=12 weight=bold}} container={position top=0}
   element={shape "semicircle" fill="#4cbce4" } container={position css='svg {filter: drop-shadow( 2px 2px 2px rgba(0, 0, 0, .3));}'}
 } 
 containers={position top={math '1 - median(price)/max(price)'} height={math 'median(price)/max(price)'} containerStyle={containerStyle overflow="visible"} css='div {text-shadow: 2px 2px #666;}'}

About

An experiment in data driven layouting for Canvas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published