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.

bars off the chart

See original GitHub issue

Expected Behaviour

Actual Behaviour

Steps to Reproduce:

NOTE: Add a GIF/Screenshot if required.

Frappé Charts version:

const { Chart } = require("frappe-charts/dist/frappe-charts.min.cjs.js");

const data = {
  labels: ["18:00", "19:00", "20:00", "21:00"],
  datasets: [
    {
      chartType: "bar",
      name: "prod",
      values: [40, 50, 30, 60]
    },
    {
      chartType: "bar",
      name: "err",
      values: [10, 10, 10, 0]
    },
    {
      chartType: "bar",
      name: "stop",
      values: [10, 0, 20, 0]
    }
  ]
}

const el = document.querySelector("body > div");

new Chart(el, {  // or a DOM element,
  title: "status preview",
  data,
  type: "axis-mixed",
  colors: ["green", "red", "yellow"],
  barOptions: {
    stacked: true
  }
  // axisOptions: {
  //   xAxisMode: "tick",
  //   yAxisMode: "tick"
  // }
})

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
alecplcommented, Feb 26, 2021

For me looks like adding (global) "type": "bar" fixes the issue, but I must say that it worked without it for a while (with other datasets).

0reactions
alecplcommented, Feb 26, 2021

Same here: chart-bug

{
    "title":"Test",
    "data":{
        "labels":["2021-01","2021-02","2021-03","2021-04","2021-05","2021-06","2021-07","2021-08"],
        "datasets":[
            {"name":"Test","chartType":"bar","values":[206,281,217,207,210,198,257,200]}
        ]
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

A Complete Guide to Bar Charts | Tutorial by Chartio
Bar charts are a fundamental visualization for comparing values between groups of data. Use this guide to learn how to get the most...
Read more >
Bar Chart: Definition, How Analysts Use Them, and Example
A bar chart shows where the price of an asset moved over a period of time and is useful for tracking prices and...
Read more >
How to remove a bar from a bar chart
This is simple - I have a bar chart with 4 rows and 2 columns with a legend - I want to remove...
Read more >
Bar Chart | Chart.js
A bar chart provides a way of showing data values represented as vertical bars. It is sometimes used to show trend data, and...
Read more >
How to Sort Your Bar Charts - Depict Data Studio
To arrange your bar chart from greatest to least, you sort the # of votes column from largest to smallest. Well, that would...
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