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.

Support coordinate form data in Area and LineAreaCombo Charts

See original GitHub issue

Version

3.11.2

Development Environment

Firefox 77.0.1 on Fedora 32, using create-react-app and https://github.com/nhn/toast-ui.react-chart

(I am opening the issue here because it does not seem related to the react wrapper)

Current Behavior

Trying to use coordinate-style data in an AreaChart or LineAreaComboChart produces a crash.

I tested that the snippets below will reproduce the bug in a fresh create-react-app environment, which I put here: https://github.com/smichel17/tui-combo-bug-example/

AreaChart

This line:

https://github.com/nhn/tui.chart/blob/796da15d48ef4be3a7eed9f2ab103fd1ff7ce507/src/js/models/data/dataProcessor.js#L139

Produces a TypeError: seriesData is undefined

Minimal example to reproduce

import React from 'react';

import { AreaChart } from "@toast-ui/react-chart";
import 'tui-chart/dist/tui-chart.css'

function App() {
  let data = {
    series: [
      {
        name: "Goal",
        data: [
          { x: 1, y: 3, },
          { x: 2, y: 3, },
          { x: 3, y: 3, },
          { x: 4, y: 3, },
          { x: 5, y: 3, },
        ],
      },
    ],
  };

  return <AreaChart data={data} />;
}

export default App;

LineAreaComboChart

This line:

https://github.com/nhn/tui.chart/blob/5aa555a9681e8294f24ad6fecc25e27997b463a7/src/js/components/mouseEventDetectors/tickBaseCoordinateModel.js#L76

Produces a TypeError: ranges[(tickCount - 1)] is undefined

Minimal example to reproduce

import React from 'react';

import { ComboChart } from "@toast-ui/react-chart";
import 'tui-chart/dist/tui-chart.css'

function App() {
  let data = {
    series: {
      area: [
        {
          name: "Goal",
          data: [
            { x: 1, y: 3, },
            { x: 2, y: 3, },
            { x: 3, y: 3, },
            { x: 4, y: 3, },
            { x: 5, y: 3, },
          ],
        },
      ],
      line: [
        {
          name: "Data",
          data: [
            { x: 1, y: 5, },
            { x: 2, y: 4, },
            { x: 3, y: 3, },
            { x: 3, y: 2, },
            { x: 3, y: 1, },
          ],
        },
      ],
    },
  };

  return <ComboChart data={data} />;
}

export default App;

Expected Behavior

An area chart is basically a line chart with the area under the series filled in. Also, your line and area charts share a wiki page. So, I expected that coordinate data would also work with area charts.

I was initially going to file this as a bug report, but while I was writing it, I noticed that the wiki page never actually says that coordinate data will work with area charts (only line charts), so I guess this is a feature request, instead 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jung-hancommented, Jun 26, 2020

@smichel17 Thanks for the details! Currently, major updates are being prepared, so adding new features to chart3 can be a bit difficult. We will review the features in the new major version. Thanks for posting the issue!

0reactions
stale[bot]commented, Sep 1, 2020

This issue will be closed due to inactivity. Thanks for your contribution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Present your data in a scatter chart or a line chart
Click Scatter. Tip: You can rest the mouse on any chart type to see its name. Click the chart area of the chart...
Read more >
Create a chart on a form or report - Microsoft Support
In Access, create Pie, Bar, Clustered Column, Line, and Combo charts; interact with forms and reports; enhance formats and data series.
Read more >
Video: Create a combo chart - Microsoft Support
Training: Change the chart type of one or more data series in your chart ( graph ) and add a secondary vertical (value)...
Read more >
Visualization: Combo Chart - Google Developers
Overview. A chart that lets you render each series as a different marker type from the following list: line, area, bars, candlesticks, and...
Read more >
Quick Start: Area Charts - Tableau Help
Create an Area Chart · Open Tableau Desktop and connect to the Sample - Superstore data source. · Navigate to a new worksheet....
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