Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
[master] Modify examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Phantas0s committed Jan 14, 2020
1 parent 7f48301 commit c9fe5d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion example/ga-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ general:

projects:
- name: Example
name_options:
title_options:
border_color: default
text_color: default
size: XXL
Expand Down
8 changes: 2 additions & 6 deletions example/mix-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,15 @@ projects:
options:
title: "sessions/users 3 weeks ago"
metric: "ga:sessionsPerUser"
title_color: blue
border_color: blue
text_color: blue
color: blue
num_color: default
start_date: 3_weeks_ago
end_date: 3_weeks_ago
- name: ga.box_total
options:
title: "sessions/users 2 weeks ago"
metric: "ga:sessionsPerUser"
title_color: blue
text_color: magenta
border_color: magenta
color: magenta
num_color: default
start_date: 2_weeks_ago
end_date: 2_weeks_ago
Expand Down
3 changes: 1 addition & 2 deletions internal/platform/ga.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ func NewAnalyticsClient(keyfile string) (*Analytics, error) {
}

// analytics reporting v4 service

an.service, err = ga.NewService(context.Background(), option.WithHTTPClient(an.config.Client(context.Background())))
if err != nil {
return nil, fmt.Errorf("creating the analytics reporting service v4 object failed: %v", err)
Expand Down Expand Up @@ -360,7 +359,7 @@ func (c *Analytics) StackedBar(an AnalyticValues) (dim []string, new []int, ret
return formatNewReturning(resp.Reports, formater)
}

// formatBar to return one slice of dimension which elements are all linked with the elements of one slice of values.
// formatBar to return one slice of dimension which elements are all linked with the elements of another slice with the values.
func formatBar(reps []*ga.Report, dimFormater func(dim []string) string) (dim []string, u []int, err error) {
dimVal := map[string]int{}
for _, v := range reps {
Expand Down

0 comments on commit c9fe5d1

Please sign in to comment.