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

Issue#1006: Make bottom margin editable for Chart visualization #1007

Merged
merged 2 commits into from
May 18, 2016

Conversation

vorakumar
Copy link
Contributor

This addresses Issue #1006 by allowing user to modify bottom margin for Chart visualization. When the margin is modified, it adjusts the hight accordingly.

@@ -121,6 +121,8 @@
angular.module('plotly', [])
.constant('ColorPalette', ColorPalette)
.directive('plotlyChart', function () {
var baseHeight = 250;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not calculate the height based on the height that is passed to the directive?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is to skip setting height here and delegate this to Plotly (by setting the height of the div and only specifying the margin size).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Arik,
Kumar has gone on vacation and I'm going to pick up where he left off. Which alternative approach would you prefer we take? Delegating to Plotly sounds more elegant. What do you think?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[image: Inline image 2]
I'm having the same difficulty.

On Wed, Apr 27, 2016 at 3:45 PM, Chris Kozak notifications@github.com
wrote:

In rd_ui/app/scripts/directives/plotly.js
#1007 (comment):

@@ -121,6 +121,8 @@
angular.module('plotly', [])
.constant('ColorPalette', ColorPalette)
.directive('plotlyChart', function () {

  •  var baseHeight = 250;
    

Hello Arik,
Kumar has gone on vacation and I'm going to pick up where he left off.
Which alternative approach would you prefer we take? Delegating to Plotly
sounds more elegant. What do you think?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/getredash/redash/pull/1007/files/303e158eb1484e9694d90ea27face9465a56d3cc#r61323291

@arikfr
Copy link
Member

arikfr commented Apr 23, 2016

Thanks!

@vorakumar
Copy link
Contributor Author

@arikfr Removed the logic to calculate the height, and instead letting plotly to choose the right height based on the bottom margin. It seems to be working.

@vorakumar
Copy link
Contributor Author

@arikfr any feedback on the latest change?

@arikfr arikfr merged commit e20a005 into getredash:master May 18, 2016
@arikfr
Copy link
Member

arikfr commented May 18, 2016

Thanks!

simo7 pushed a commit to pubnative/redash that referenced this pull request Sep 22, 2016
Issue#1006:  Make bottom margin editable for Chart visualization
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

Successfully merging this pull request may close these issues.

4 participants