Skip to content
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

Support for Components in Components #181

Open
nilzona opened this issue Sep 6, 2018 · 0 comments
Open

Support for Components in Components #181

nilzona opened this issue Sep 6, 2018 · 0 comments
Assignees

Comments

@nilzona
Copy link
Collaborator

nilzona commented Sep 6, 2018

🚀 Feature

Expand the Picasso definition API so that any component can define child components tied to a plugin layout strategy.

Motivation

This will enable features like Trellis charts and in general add another level of control of picasso components should be layed out.

Additional context

Example of how a definition could look like:

var config = {
  scales: { ... },
  components: [{
    type: 'layout',
    strategy: 'grid',
    rows: 2,
    components: [{
        type: 'layout',
        strategy: 'dock',
        components: [{
          scale: 'y',
          type: 'axis',
          dock: 'left'
        },{
          type: 'box-marker',
          dock: 'center',
          data: { ... },
          settings: { ... }
        }]
      },{
        type: 'layout',
        strategy: 'grid',
        columns: 3,
        components: [{
            type: 'point-marker',
            data: { ... },
            settings: { ... }
          },{
            type: 'point-marker',
            data: { ... },
            settings: { ... }
          },{
            type: 'point-marker',
            data: { ... },
            settings: { ... }
          }
        ]
      }
    ]
  }]
}
picasso.chart({ element: element, data: data, settings: config });

This would render a picasso object with two rows equal in size where the top row has a barchart with a y-axis docked to the left and the bottom row has three equally sized columns with points inside (e.g. scatter chart).

@nilzona nilzona self-assigned this Sep 10, 2018
@T-Wizard T-Wizard mentioned this issue Mar 23, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant