Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G Genesys Website
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Genesys PGR
  • Genesys Website
  • Issues
  • #248
Closed
Open
Created Mar 08, 2019 by Matija Obreza@mobrezaOwner

Summary pie charts

We now display pie charts using all available ES term results, but we list only the top 5 terms (.slice(0, 5)):

image

Notice the many different parts of the chart!

Update <PieChart component

<PieChart
  data={
  taxonomyGenusSpeciesOverview.terms.slice(0, 5).map(
    (term) => ({
      value: term.count,
      label: term.term,
    }),
  )} />
  1. Passing data to PieChart is O.K.
  2. Add option to declare maxTerms={ 8 } (default value is 5).
  3. Add option to set total (sum of all values)
  4. Add option to set missing

The updated PieChart should calculate the sum of other terms (total - missing - sum_of_topX_terms).

It should automatically add two sections to each pie:

  1. The { label: t('...other'), value: other }
  2. The { label: t('...missing'), value: missing }

A PieChart with maxTerms === 5 would potentially show the 5 top terms (using .slice(0, 5)) plus 2 generated entries (other + missing).

Update all piecharts

We use piecharts on various pages. Add total and missing attributes to all.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking