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.

Stacked scatter graph

See original GitHub issue

I’m trying to stacked my scatter graph with the option stacked: true, but when I do that my graph just disappear. I use the version 2.7.2 of chartjs.

'use strict';

function filledLine(input_data, html_markup, extra_config) {
  var scatterChartData = {
    datasets: input_data.datasets,
  };

  window.myScatter = Chart.Scatter(document.getElementById(html_markup), {
    data: scatterChartData,
    options: {
      title: {
        display: true,
        text: 'Chart.js Scatter Chart',
      },
      scales: {
        xAxes: [
          {
            position: 'bottom',
            scaleLabel: {
              display: true,
              labelString: 'x axis',
            },
          },
        ],
        yAxes: [
          {
            stacked: true,
            position: 'left',
            scaleLabel: {
              display: true,
              labelString: 'y axis',
            },
          },
        ],
      },
    },
  });
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
benmccanncommented, Feb 11, 2019

I would expect it should assuming a line chart is supposed to stack. They’re basically the same thing except scatter doesn’t show the line with the points. And my assumption is that you should be able to stack a line chart

0reactions
etimbergcommented, Jun 7, 2020

I got it working, opening a PR and we can discuss

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel: How to plot a stacked scatter set - Super User
Insert -> Scatter -> Scatter with Smooth Lines and Markers will give you that type of graph. This does require the data to...
Read more >
Help with a stacked scatter plot | MrExcel Message Board
Hi everyone! I need to make a stacked scatter plot - exactly like this (Stacked Charts With Vertical Separation) but with a scatter...
Read more >
vertically stack scatter graphs - PC Review
hi i dont know if this is possible but i would like to display 3 sets of xy scatter data stacked vertically one...
Read more >
MATLAB stackedplot - MathWorks
Stacked plot of several variables with common x-axis ... of individual plots, so that the stacked plot has a line plot, scatter plot,...
Read more >
stacked scatter plots - Excel Help Forum
Code: Please Login or Register to view this content. what i would like to do is plot both y1 and y2 on one...
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