Skip to content
This repository was archived by the owner on Apr 19, 2024. It is now read-only.
This repository was archived by the owner on Apr 19, 2024. It is now read-only.

[Feat]: 1 legend for multiple charts #423

Description

@non-bin

Problem

I have a core utilization chart for each of my 4 CPU cores. Having 4 legends wastes space, but I don't remember what the colors mean.

Examples

All

image

One

image

None

image

Description

A way to group charts under a legend, or have an external legend tag linked to multiple charts

image
(photoshopped)

Importance

nice to have

Value proposition

makes things a bit nicer

Proposed implementation

I think reference the charts with a class something like this:

<div data-netdata="cpu.cpu0" data-legend="no" class="cpuCores">
<div data-netdata="legend" data-references="cpuCores">

Not sure how data-colors would be handled, maybe prioritise legend, then first or last chart

Here's how I'd imagine implementing my case:

<div class="row">
  <div class="col-6">
    <!-- row 1 -->
    <div data-netdata="cpu.cpu0"
         data-legend="no"
         data-width="49%"
         class="cpuCores">
    </div>

    <div data-netdata="cpu.cpu1"
         data-legend="no"
         data-width="49%"
         class="cpuCores">
    </div>
    <br>

    <!-- row 2 -->
    <div data-netdata="cpu.cpu2"
         data-legend="no"
         data-width="49%"
         class="cpuCores">
    </div>

    <div data-netdata="cpu.cpu3"
         data-legend="no"
         data-width="49%"
         class="cpuCores">
    </div>
  </div>
  
  <!-- legend -->
  <div class="col-1">
    <div data-netdata="legend"
         data-references="cpuCores">
    </div>
</div>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions