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
37f4f2cc
Commit
37f4f2cc
authored
8 years ago
by
Tom Robinson
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #3081 from metabase/instrument-chart-settings
Instrument chart settings
parents
e6ebdcc3
b5811048
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/metabase/query_builder/VisualizationSettings.jsx
+1
-1
1 addition, 1 deletion
...tend/src/metabase/query_builder/VisualizationSettings.jsx
frontend/src/metabase/visualizations/components/ChartSettings.jsx
+7
-3
7 additions, 3 deletions
.../src/metabase/visualizations/components/ChartSettings.jsx
with
8 additions
and
4 deletions
frontend/src/metabase/query_builder/VisualizationSettings.jsx
+
1
−
1
View file @
37f4f2cc
...
...
@@ -92,7 +92,7 @@ export default class VisualizationSettings extends React.Component {
{
this
.
renderChartTypePicker
()
}
<
ModalWithTrigger
className
=
"Modal Modal--wide Modal--tall"
triggerElement
=
{
<
Icon
name
=
"gear"
/>
}
triggerElement
=
{
<
span
data-metabase-event
=
"Query Builder;Chart Settings"
><
Icon
name
=
"gear"
/
></
span
>
}
triggerClasses
=
"text-brand-hover"
>
<
ChartSettings
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/visualizations/components/ChartSettings.jsx
+
7
−
3
View file @
37f4f2cc
...
...
@@ -5,6 +5,7 @@ import _ from "underscore";
import
Visualization
from
"
metabase/visualizations/components/Visualization.jsx
"
import
{
getSettingsWidgets
}
from
"
metabase/lib/visualization_settings
"
;
import
MetabaseAnalytics
from
"
metabase/lib/analytics
"
;
const
ChartSettingsTab
=
({
name
,
active
,
onClick
})
=>
<
a
...
...
@@ -54,6 +55,9 @@ class ChartSettings extends Component {
}
onChangeSettings
=
(
newSettings
)
=>
{
for
(
const
key
of
Object
.
keys
(
newSettings
))
{
MetabaseAnalytics
.
trackEvent
(
"
Chart Settings
"
,
"
Change Setting
"
,
key
);
}
this
.
setState
({
settings
:
{
...
this
.
state
.
settings
,
...
...
@@ -109,10 +113,10 @@ class ChartSettings extends Component {
</
div
>
</
div
>
<
div
className
=
"pt1"
>
<
a
className
=
{
cx
(
"
Button Button--primary
"
,
{
disabled
:
!
isDirty
})
}
href
=
""
onClick
=
{
()
=>
this
.
onDone
()
}
>
Done
</
a
>
<
a
className
=
"text-grey-2 ml2"
onClick
=
{
onClose
}
>
Cancel
</
a
>
<
a
className
=
{
cx
(
"
Button Button--primary
"
,
{
disabled
:
!
isDirty
})
}
onClick
=
{
()
=>
this
.
onDone
()
}
data-metabase-event
=
"Chart Settings;Done"
>
Done
</
a
>
<
a
className
=
"text-grey-2 ml2"
onClick
=
{
onClose
}
data-metabase-event
=
"Chart Settings;Cancel"
>
Cancel
</
a
>
{
!
_
.
isEqual
(
this
.
state
.
settings
,
{})
&&
<
a
className
=
"Button Button--warning float-right"
onClick
=
{
()
=>
this
.
setState
({
settings
:
{}
})
}
>
Reset to defaults
</
a
>
<
a
className
=
"Button Button--warning float-right"
onClick
=
{
()
=>
this
.
setState
({
settings
:
{}
})
}
data-metabase-event
=
"Chart Settings;Reset"
>
Reset to defaults
</
a
>
}
</
div
>
</
div
>
...
...
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