Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
5d861913
Unverified
Commit
5d861913
authored
7 years ago
by
Ryan Senior
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #6897 from metabase/pulse-bar-chart-fix
Fix the pulse bar chart rendering to use overriden columns
parents
d08eb929
9f77dce1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/pulse/render.clj
+9
-8
9 additions, 8 deletions
src/metabase/pulse/render.clj
with
9 additions
and
8 deletions
src/metabase/pulse/render.clj
+
9
−
8
View file @
5d861913
...
...
@@ -355,12 +355,19 @@
(
render-table
(
prep-for-html-rendering
timezone
cols
rows
nil
nil
cols-limit
))
(
render-truncation-warning
cols-limit
(
count
cols
)
rows-limit
(
count
rows
))]})
(
defn-
graphing-columns
[
card
{
:keys
[
cols
]
:as
data
}]
[(
or
(
ui-logic/x-axis-rowfn
card
data
)
first
)
(
or
(
ui-logic/y-axis-rowfn
card
data
)
second
)])
(
s/defn
^
:private
render
:bar
:-
RenderedPulseCard
[
timezone
card
{
:keys
[
cols
rows
]
:as
data
}]
(
let
[
max-value
(
apply
max
(
map
second
rows
))]
(
let
[[
x-axis-rowfn
y-axis-rowfn
]
(
graphing-columns
card
data
)
max-value
(
apply
max
(
map
y-axis-rowfn
rows
))]
{
:attachments
nil
:content
[
:div
(
render-table
(
prep-for-html-rendering
timezone
cols
rows
second
max-value
2
))
(
render-table
(
prep-for-html-rendering
timezone
cols
rows
y-axis-rowfn
max-value
2
))
(
render-truncation-warning
2
(
count
cols
)
rows-limit
(
count
rows
))]}))
(
s/defn
^
:private
render
:scalar
:-
RenderedPulseCard
...
...
@@ -497,12 +504,6 @@
:attachment
{
content-id
image-url
}
:inline
nil
))
(
defn-
graphing-columns
[
card
{
:keys
[
cols
]
:as
data
}]
[(
or
(
ui-logic/x-axis-rowfn
card
data
)
first
)
(
or
(
ui-logic/y-axis-rowfn
card
data
)
second
)])
(
s/defn
^
:private
render
:sparkline
:-
RenderedPulseCard
[
render-type
timezone
card
{
:keys
[
rows
cols
]
:as
data
}]
(
let
[[
x-axis-rowfn
y-axis-rowfn
]
(
graphing-columns
card
data
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment