question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

multiple series labels and identifying

See original GitHub issue

Hi!! Nice and clean charts!!

i was wondering, i’m using multiple linechart series on my data and i dunno how to identify each line for each line is a diferent series, how can i label each line / colorline?

Data Example:

var data = {

    //my labels
    labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],

    //my multiple series
    series: [
        //series1: label example: apples
        [5, 2, 4, 2, 0],
        //series1: label example: lemons
        [8, 1, 14, 12, 10],
    ]
};

all i got is: http://oi60.tinypic.com/6q8fhv.jpg

but how do i identify each series?

thanks!!

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:18

github_iconTop GitHub Comments

9reactions
gionkunzcommented, Sep 10, 2014

Hi there and thanks! 😃 They get a default class that is generated. ct-series-a, ct-series-b, ct-series-c etc. You can also override by using the object series notation:

var data = {

    //my labels
    labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],

    //my multiple series
    series: [
        //series1: label example: apples
        {
          className: 'apples',
          name: 'My nice apples',
          data: [5, 2, 4, 2, 0],
        },
        {
        //series1: label example: lemons
          className: 'lemons',
          name: 'My nice lemons',
          data: [8, 1, 14, 12, 10],
        }
    ]
};

Then you’ll have two things available, first a class will be set on a group above the form elements (series group) as well as some custom attributes on your element containing the original data values. You can also check the new advanced example to attach behavior: http://gionkunz.github.io/chartist-js/getting-started.html#adding-behavior-to-your-charts

4reactions
gionkunzcommented, Aug 21, 2016

@wgbn search for chartist label plugin on NPM / Github.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiple Series in One Excel Chart - Peltier Tech
Fill in entries for series name and Y values, and the chart shows two series. The original X labels remain on the chart....
Read more >
Add or remove data labels in a chart - Microsoft Support
Use data labels to quickly identify a data series in a chart. ... Click a data label one time to select all data...
Read more >
Label line chart series - Get Digital Help
The chart above contains no legend instead data labels are used to show what each line ... Use the legend to identify line...
Read more >
One label for multiple series - highcharts - Stack Overflow
I need to make one label responsible for multiple series data. As shown in this fiddle http://jsfiddle.net/HHqGN/ , I have two series:.
Read more >
Chart Elements
Data labels identify individual data points. Data labels are a good way to emphasize or explain a particular piece of data on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found