Skip to content

Images for logos, diagramming, etc. #496

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

Closed
mdtusz opened this issue May 2, 2016 · 4 comments
Closed

Images for logos, diagramming, etc. #496

mdtusz opened this issue May 2, 2016 · 4 comments
Assignees
Labels
feature something new

Comments

@mdtusz
Copy link
Contributor

mdtusz commented May 2, 2016

@etpinard @cldougl

For adding logos or other visual elements to plots that are not specifically data. A proposed interface is to add an images layout attribute:

{
  images: [{
    source: 'http://www.placekitten.com/450/450', // always kittens
    opacity: 0.8,
    layer: 'above',
    xanchor: 'center',
    yanchor: 'top',
    x: 0.5,
    y: 0,
    xref: 'paper', // default to use paper ref?
    yref: 'paper',
    width: 0.2 // smart aspect ratio preservation unless both dimensions given?
  }]
}
@etpinard
Copy link
Contributor

etpinard commented May 2, 2016

maybe also borderwidth and bordercolor ?

@mdtusz
Copy link
Contributor Author

mdtusz commented May 2, 2016

Yep those can be added as well.

Regarding where to place the images - currently shapes can be in shapelayer-below or shapelayer-above. Do we create additional images-above and images-below or simply add them to the existing shapelayers? I'm hesitant to add yet more layers to the plot, but at the same time, it's nice to keep things clearly defined. Thoughts?

@etpinard
Copy link
Contributor

etpinard commented May 2, 2016

Do we create additional images-above and images-below or simply add them to the existing shapelayers?

I'd vote for for no. Let's put images in the same layer(s) as shapes.

@etpinard
Copy link
Contributor

etpinard commented May 2, 2016

One thing to take into consideration would be the ordering of shapes and images in those <g> layer.

I'd vote for always placing images below the shapes in a given <g> layer using d3 selection.order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

2 participants