Skip to content

scale.x is not a function when embedding Line #1112

@isitrita

Description

@isitrita

Hi, I am trying to draw box, which will be looked as grid which will be bounded from four sides with grey
screen shot 2018-09-13 at 12 12 14

I am trying to put Line to do that, but I get exception TypeError: scale.x is not a function at Object.scalePoint (helpers.js:108)
How I could do that?

        scale={{ x: 'time' }}
        polar={false}
        height={166}
        padding={{
          top: 20,
          bottom: 30,
          left: 20,
          right: 50,
        }}
        theme={theme}
        containerComponent={
          <VictoryVoronoiContainer
            voronoiDimension="x"
            labels={d => `${d.y} ${new Date(d.x).toLocaleDateString()}`}
            labelComponent={<Tooltip />}
          />
        }
      >
        <VictoryAxis independentAxis />
        <VictoryAxis orientation="right" tickCount={6} dependentAxis />
        <Line
          x1="20"
          x2="20"
          y1="136"
          y2="20"
          role="presentation"
          shapeRendering="auto"
          vectorEffect="non-scaling-stroke"
          style={{stroke: 'rgba(73, 75, 82, 0.17)', strokeWidth: 1}}
        />
        {
          <VictoryGroup data={toDisplay} domain={domain}>
            <VictoryArea
              interpolation="monotoneX"
              style={{
                data: {
                  stroke: '#486de8',
                  strokeWidth: '1',
                  fill: '#486de829',
                },
              }}
            />
          </VictoryGroup>
        }
      </VictoryChart>```


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