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

[Bug]: Scatter/Area/Line chart not reflecting axes with visible true #1696

Closed
1 task done
rhythm55 opened this issue Dec 6, 2023 · 1 comment
Closed
1 task done

Comments

@rhythm55
Copy link

rhythm55 commented Dec 6, 2023

Name

Rhythm

Are you an IBM employee?

  • Yes

What happened?

Consider we have axes options of bottom and left. If we further add

"top": {
            "visible": true
        }

Top axes is not showing up
image

But if we add mapsTo ,scaleType to top options , axes will start showing
image

In vanilla its working alone with visible
image

Version

"@carbon/charts": "^0.58.2",
"@carbon/charts-angular": "^0.58.2",

Data & options used

Options -

{
  "title": "Scatter (time series)",
  "axes": {
    "bottom": {
      "title": "2019 Annual Sales Figures",
      "scaleType": "time",
      "mapsTo": "date"
    },
    "left": {
      "mapsTo": "value"
    },
    "top": {
      "visible": true
    }
  },
  "height": "400px",
  "theme": "g100"
}

Data -

[
  {
    "group": "Dataset 1",
    "date": "2018-12-31T18:30:00.000Z",
    "value": 50000,
    "surplus": 901373256.9942336
  },
  {
    "group": "Dataset 1",
    "date": "2019-01-04T18:30:00.000Z",
    "value": 65000,
    "surplus": 575704494.8311269
  },
  {
    "group": "Dataset 1",
    "date": "2019-01-07T18:30:00.000Z",
    "value": null,
    "surplus": 12365.548646813086
  },
  {
    "group": "Dataset 1",
    "date": "2019-01-12T18:30:00.000Z",
    "value": 49213,
    "surplus": 172820271.61113694
  },
  {
    "group": "Dataset 1",
    "date": "2019-01-16T18:30:00.000Z",
    "value": 51213,
    "surplus": 593841716.4658608
  },
  {
    "group": "Dataset 2",
    "date": "2019-01-01T18:30:00.000Z",
    "value": 0,
    "surplus": 18727.79702010575
  },
  {
    "group": "Dataset 2",
    "date": "2019-01-05T18:30:00.000Z",
    "value": 57312,
    "surplus": 1015787461.6284164
  },
  {
    "group": "Dataset 2",
    "date": "2019-01-07T18:30:00.000Z",
    "value": 27432,
    "surplus": 37915501.47335695
  },
  {
    "group": "Dataset 2",
    "date": "2019-01-14T18:30:00.000Z",
    "value": 70323,
    "surplus": 127479840.9935445
  },
  {
    "group": "Dataset 2",
    "date": "2019-01-18T18:30:00.000Z",
    "value": 21300,
    "surplus": 174140417.4960151
  },
  {
    "group": "Dataset 3",
    "date": "2018-12-31T18:30:00.000Z",
    "value": 40000,
    "surplus": 717954869.8114405
  },
  {
    "group": "Dataset 3",
    "date": "2019-01-04T18:30:00.000Z",
    "value": null,
    "surplus": 23970.851500526758
  },
  {
    "group": "Dataset 3",
    "date": "2019-01-07T18:30:00.000Z",
    "value": 18000,
    "surplus": 14781186.764571419
  },
  {
    "group": "Dataset 3",
    "date": "2019-01-12T18:30:00.000Z",
    "value": 39213,
    "surplus": 671779005.824533
  },
  {
    "group": "Dataset 3",
    "date": "2019-01-16T18:30:00.000Z",
    "value": 61213,
    "surplus": 1501084805.2856529
  },
  {
    "group": "Dataset 4",
    "date": "2019-01-01T18:30:00.000Z",
    "value": 20000,
    "surplus": 9964544.657800611
  },
  {
    "group": "Dataset 4",
    "date": "2019-01-05T18:30:00.000Z",
    "value": 37312,
    "surplus": 912594024.878891
  },
  {
    "group": "Dataset 4",
    "date": "2019-01-07T18:30:00.000Z",
    "value": 51432,
    "surplus": 1201669291.3497975
  },
  {
    "group": "Dataset 4",
    "date": "2019-01-14T18:30:00.000Z",
    "value": 25332,
    "surplus": 349645089.85411257
  },
  {
    "group": "Dataset 4",
    "date": "2019-01-18T18:30:00.000Z",
    "value": null,
    "surplus": 20597.614912678597
  }
]

Relevant log output

No response

Codesandbox example

No response

What priority level would this be in your opinion?

P2

@theiliad
Copy link
Member

theiliad commented Dec 9, 2023

Hi, this is correct behaviour, we need mapsTo in order for the scale to function, scaleType however should just default to linear.

@theiliad theiliad closed this as not planned Won't fix, can't repro, duplicate, stale Dec 9, 2023
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