Skip to content

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

Merged
arikfr merged 2 commits into
getredash:masterfrom
vorakumar:issue-1006
May 18, 2016
Merged

Issue#1006: Make bottom margin editable for Chart visualization#1007
arikfr merged 2 commits into
getredash:masterfrom
vorakumar:issue-1006

Conversation

@vorakumar
Copy link
Copy Markdown
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.

Comment thread rd_ui/app/scripts/directives/plotly.js Outdated
angular.module('plotly', [])
.constant('ColorPalette', ColorPalette)
.directive('plotlyChart', function () {
var baseHeight = 250;
Copy link
Copy Markdown
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
Copy Markdown
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).

Copy link
Copy Markdown

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?

Copy link
Copy Markdown

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
Copy Markdown
Member

arikfr commented Apr 23, 2016

Thanks!

@vorakumar
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@arikfr any feedback on the latest change?

@arikfr arikfr merged commit e20a005 into getredash:master May 18, 2016
@arikfr
Copy link
Copy Markdown
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