Skip to content

"Series Style" control not working #27302

Closed

Description

@Quatters

Bug description

There is control in Line Chart called "Series style". When you select any of the option it includes the chart is not re-rendered, nothing happens.

How to reproduce the bug

  1. Create Line Chart.
  2. Go to "Customize" tab.
  3. Search for "Series style" control.
  4. Select any option.
  5. Nothing happens.

Screenshots/recordings

image

Superset version

3.1.1

Python version

Not applicable

Node version

Not applicable

Browser

Not applicable

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Activity

  1. Quatters commented on Feb 29, 2024

    @Quatters
    ContributorAuthor

    When I fixed this control locally, I saw that all options duplicate existing charts (Line -> Line Chart, Scatter -> Scatter Plot, Smooth Line -> Smooth Line, Bar -> Bar Chart, Step - [start, middle, end] -> Stepped Line). Maybe we can remove it?

  2. michael-s-molina commented on Feb 29, 2024

    @michael-s-molina
    Member

    This problem is a little bit more complex. The Line chart variations (normal, smooth, step) were broken into multiple charts and for that reason this control shouldn't exist. To add to the problem, the Area chart, which has the exact same variations, was not broken into multiple charts and this control works. In order to fix this mess, we need to decide if we want to have multiple charts and disable this control or a single chart which accepts style variations. Independent of the resolution, this will require a migration.

    @rusackas @villebro @kgabryje @geido

  3. geido commented on Feb 29, 2024

    @geido
    Member

    I agree this requires further discussion. Curious what was the decision driving the Line chart to be broken into multiple charts

  4. michael-s-molina commented on Feb 29, 2024

    @michael-s-molina
    Member

    Just for reference, here's the Area chart and the control in action:

    Screen.Recording.2024-02-29.at.11.39.16.mov
  5. rusackas commented on Jul 30, 2024

    @rusackas
    Member

    Normally I'd threaten to close this out as stale by now, but this is still relevant today, and should probably be put forward as a SIP to either consolidate or bifurcate these chart types once and for all. Any interested parties?

  6. chkang83 commented on Feb 14, 2025

    @chkang83
    Contributor

    The code below seems to change the type to line unconditionally, so when I remove that code, it seems to work fine.

    /var/local/idk2/heartset/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts

    seriesType: EchartsTimeseriesSeriesType.Line,

    const lineTransformProps = (chartProps: EchartsTimeseriesChartProps) =>
      transformProps({
        ...chartProps,
        formData: {
          ...chartProps.formData,
          seriesType: EchartsTimeseriesSeriesType.Line,
        },
      });
    
  7. geido commented on Mar 4, 2025

    @geido
    Member

    The code below seems to change the type to line unconditionally, so when I remove that code, it seems to work fine.

    /var/local/idk2/heartset/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts

    seriesType: EchartsTimeseriesSeriesType.Line,

    const lineTransformProps = (chartProps: EchartsTimeseriesChartProps) =>
      transformProps({
        ...chartProps,
        formData: {
          ...chartProps.formData,
          seriesType: EchartsTimeseriesSeriesType.Line,
        },
      });
    

    @chkang-idk2 if you would like to look deeper into this problem, considering what @michael-s-molina has written about the issues we have encountered, feel free to open a PR. It would be super helpful!

  8. vedantprajapati commented on Jun 3, 2025

    @vedantprajapati
    Contributor

    This problem is a little bit more complex. The Line chart variations (normal, smooth, step) were broken into multiple charts and for that reason this control shouldn't exist. To add to the problem, the Area chart, which has the exact same variations, was not broken into multiple charts and this control works. In order to fix this mess, we need to decide if we want to have multiple charts and disable this control or a single chart which accepts style variations. Independent of the resolution, this will require a migration.

    @rusackas @villebro @kgabryje @geido

    @geido

    We ran into this a few months ago. as a temporary fix, we overrided the generic class with visibility -> true and then made modifications on a more granular level to hide this for line charts.

    Image
    # geotab/controlPanel.tsx
    
    
    import controlPanel from '../Timeseries/Regular/Line/controlPanel';
    // Define the createGenericControlPanel function outside of the class
    const createRemovedSeriesStyleControlPanel = {
      ...controlPanel,
      controlPanelSections: controlPanel.controlPanelSections.map(section => {
        // Check if section is not null before accessing its properties
        if (section === null) {
          return section;
        }
        return {
          ...section,
          controlSetRows: section.controlSetRows?.map((row: any[]) =>
            row.map(item => {
              if (item?.name === 'seriesType') {
                return {
                  ...item,
                  config: {
                    ...item.config,
                    visibility: () => true,
                  },
                };
              }
              return item;
            }),
          ),
        };
      }),
    };
    
    export default createRemovedSeriesStyleControlPanel;
  9. vedantprajapati commented on Jun 3, 2025

    @vedantprajapati
    Contributor

    let me know if we want to make this change? I can make a PR. @geido

  10. geido commented on Jun 3, 2025

    @geido
    Member

    let me know if we want to make this change? I can make a PR. @geido

    Sure. That would be great. It is going to be easier to discuss the changes on a PR. Thank you!

  11. vedantprajapati commented on Jun 3, 2025

    @vedantprajapati
    Contributor

    Created ^ 🥳 @geido

  12. sfirke commented on Nov 7, 2025

    @sfirke
    Member

    I'm glad I found this thread, I was trying to make a stepped line chart and was confused by the selector not working. Then I saw mentioned above this is its own line chart type!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions