Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple numbers are overwritten for valuesOverPoints set to 1 #415

Open
sankarcn opened this issue Jul 14, 2023 · 2 comments
Open

multiple numbers are overwritten for valuesOverPoints set to 1 #415

sankarcn opened this issue Jul 14, 2023 · 2 comments

Comments

@sankarcn
Copy link

Expected Behaviour

When we chart a stacked bar graph with valuesOverPoints set to 1, then the value shown on top should have the total.

Actual Behaviour

Looks like multiple numbers are overwritten on each other giving a very unreadable output.

Steps to Reproduce:

new Chart("#chart", {
  "data": {
    "labels": [
      "Planned",
      "Actual",
      "Profit"
    ],
    "datasets": [
      {
        "name": "Planned",
        "values": [
          1350,
          1350,
          0
        ],
        "chartType": "bar"
      },
      {
        "name": "Overrun",
        "values": [
          0,
          7499,
          0
        ],
        "chartType": "bar"
      },
      {
        "name": "Profit",
        "values": [
          0,
          0,
          14188
        ],
        "chartType": "bar"
      }
    ],
    "yMarkers": [
      {
        "label": "",
        "value": 1350,
        "options": {
          "labelPos":"center"
        }
      }
    ]
  },
  "type": "bar",
  "height": 250,
  "barOptions": {
    "stacked": true,
    "spaceRatio": 0.2
  },
  "valuesOverPoints": 1,
  "axisOptions": {
    "yAxisMode": "tick",
    "xAxisMode": "tick",
    "xIsSeries": 0
  },
  "colors": [
    "#2986cc",
    "#f1c232",
    "#2cb100"
  ]
});

Error

NOTE: Add a GIF/Screenshot if required.

Frappé Charts version:
Codepen / Codesandbox:

@Miki471151
Copy link

Hello. I'd like to work on this issue. Please assign it to me.

@sankarcn
Copy link
Author

sankarcn commented Oct 8, 2023

Thank @Miki471151 . But I do not have access to assign issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants