Skip to content

"innerComponent is not a function" in CustomSVGSeries when animation is set. #598

@sradevski

Description

@sradevski

When trying to generate a CustomSVGSeries, I get the error written in the title. This only happens when animation is enabled. Also, if animation is enabled and I don't specify a customComponent function, it works properly.

I investigated the cause of it, and it seems that in the Animation component the customComponent field in the interpolated data object is turned into an object (instead of being a function as it is in the child.props.data).

My code:

const getMarkSeries = series =>
  <CustomSVGSeries
    key={`${series.id}mark`}
    animation
    data={series.data.map(entry => ({
      ...entry,
      size: 5,
      customComponent: () =>
        markShapesGenerator(series.markType, 5, {
          stroke: series.color,
          fill: series.color,
        }),
    }))}
  />;

react version: 15.6.1
react-vis version: 1.7.2

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