Skip to content

Can't update chart on different data source #948

@cansu-aksu

Description

@cansu-aksu

Hi,

After creating a chart, with a function, I change the data source and source options but the chart doesn't update even if I use revision or datarevision as you mentioned in the docs but when I change a trace, it gets updated without facing any issues. Also, I haven't been able to use Plotly.newPlot or Plotly.react as well to create a new chart even though it does not throw an error.

Is this a known issue? If it is, what might be causing this? I would appreciate if you can give me an example.

import plotly from 'plotly.js/dist/plotly';
import PlotlyEditor from 'react-chart-editor';
function ChartPane({ chartData, onUpdate }) {
  const { data, sourceOptions, sources, frames, layout } = chartData;
  return (
    <div className="chart-container bp3-dark">
      <PlotlyEditor
        data={data}
        config={config}
        layout={layout}
        frames={frames}
        plotly={plotly}
        onUpdate={onUpdate}
        dataSources={sources}
        dataSourceOptions={sourceOptions}
        useResizeHandler
        debug
        advancedTraceTypeSelector
        responsive
      />
    </div>
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions