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
becf6272
Commit
becf6272
authored
7 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Fix row chart, also format row chart labels
parent
b940874d
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
frontend/src/metabase/visualizations/lib/LineAreaBarRenderer.js
+12
-5
12 additions, 5 deletions
...nd/src/metabase/visualizations/lib/LineAreaBarRenderer.js
with
12 additions
and
5 deletions
frontend/src/metabase/visualizations/lib/LineAreaBarRenderer.js
+
12
−
5
View file @
becf6272
...
...
@@ -5,7 +5,7 @@ import d3 from "d3";
import
dc
from
"
dc
"
;
import
moment
from
"
moment
"
;
import
_
from
"
underscore
"
;
import
{
updateIn
}
from
"
icepick
"
;
import
{
updateIn
,
getIn
}
from
"
icepick
"
;
import
{
getAvailableCanvasWidth
,
...
...
@@ -109,7 +109,9 @@ function initChart(chart, element) {
// disable animations
chart
.
transitionDuration
(
0
);
// disable brush
chart
.
brushOn
(
false
);
if
(
chart
.
brushOn
)
{
chart
.
brushOn
(
false
);
}
}
function
applyChartTimeseriesXAxis
(
chart
,
settings
,
series
,
xValues
,
xDomain
,
xInterval
)
{
...
...
@@ -1277,11 +1279,16 @@ export function rowRenderer(
const
colors
=
settings
[
"
graph.colors
"
];
const
dataset
=
crossfilter
(
series
[
0
].
data
.
rows
);
// format the dimension axis
const
rows
=
series
[
0
].
data
.
rows
.
map
(
row
=>
[
formatValue
(
row
[
0
],
{
column
:
cols
[
0
],
type
:
"
axis
"
}),
row
[
1
]
]);
const
dataset
=
crossfilter
(
rows
);
const
dimension
=
dataset
.
dimension
(
d
=>
d
[
0
]);
const
group
=
dimension
.
group
().
reduceSum
(
d
=>
d
[
1
]);
const
xDomain
=
d3
.
extent
(
series
[
0
].
data
.
rows
,
d
=>
d
[
1
]);
const
yValues
=
series
[
0
].
data
.
rows
.
map
(
d
=>
d
[
0
]);
const
xDomain
=
d3
.
extent
(
rows
,
d
=>
d
[
1
]);
const
yValues
=
rows
.
map
(
d
=>
d
[
0
]);
forceSortedGroup
(
group
,
makeIndexMap
(
yValues
));
...
...
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