huridocs/uwazi

View on GitHub
app/react/Charts/components/specs/__snapshots__/StackedDualBarChart.spec.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`StackedDualBarChart should allow overriding default data and label and map the Legend payload 1`] = `
<ForwardRef
  height={320}
>
  <BarChart
    barCategoryGap="10%"
    barGap={4}
    data={
      Array [
        Object {
          "name": "d1",
        },
        Object {
          "name": "d2",
        },
      ]
    }
    height={300}
    layout="horizontal"
    margin={
      Object {
        "bottom": 0,
        "left": 0,
        "right": 30,
        "top": 0,
      }
    }
    reverseStackOrder={false}
    stackOffset="none"
    syncMethod="index"
  >
    <XAxis
      allowDataOverflow={false}
      allowDecimals={true}
      allowDuplicatedCategory={true}
      dataKey="xAxisName"
      height={30}
      hide={false}
      label=""
      mirror={false}
      orientation="bottom"
      padding={
        Object {
          "left": 0,
          "right": 0,
        }
      }
      reversed={false}
      scale="auto"
      tickCount={5}
      type="category"
      width={0}
      xAxisId={0}
    />
    <YAxis
      allowDataOverflow={false}
      allowDecimals={true}
      allowDuplicatedCategory={true}
      height={0}
      hide={false}
      mirror={false}
      orientation="left"
      padding={
        Object {
          "bottom": 0,
          "top": 0,
        }
      }
      reversed={false}
      scale="auto"
      tickCount={5}
      type="number"
      width={60}
      yAxisId={0}
    />
    <CartesianGrid
      strokeDasharray="2 4"
    />
    <Tooltip
      accessibilityLayer={false}
      allowEscapeViewBox={
        Object {
          "x": false,
          "y": false,
        }
      }
      animationDuration={400}
      animationEasing="ease"
      content={
        <ExtendedTooltip
          active={false}
          chartLabel="someLabel"
          parentData={
            Array [
              Object {
                "name": "d1",
              },
              Object {
                "name": "d2",
              },
            ]
          }
          payload={Array []}
        />
      }
      contentStyle={Object {}}
      coordinate={
        Object {
          "x": 0,
          "y": 0,
        }
      }
      cursor={true}
      cursorStyle={Object {}}
      filterNull={true}
      isAnimationActive={true}
      itemStyle={Object {}}
      labelStyle={Object {}}
      offset={10}
      reverseDirection={
        Object {
          "x": false,
          "y": false,
        }
      }
      separator=" : "
      trigger="hover"
      useTranslate3d={false}
      viewBox={
        Object {
          "height": 0,
          "width": 0,
          "x": 0,
          "y": 0,
        }
      }
      wrapperStyle={Object {}}
    />
    <Bar
      activeBar={false}
      animationBegin={0}
      animationDuration={400}
      animationEasing="ease"
      data={Array []}
      dataKey="setAValue"
      fill="#D24040"
      hide={false}
      isAnimationActive={true}
      layout="vertical"
      legendType="rect"
      minPointSize={0}
      shape={
        <ColoredBar
          color="default"
          index={0}
        />
      }
      stackId="unique"
      xAxisId={0}
      yAxisId={0}
    />
    <Bar
      activeBar={false}
      animationBegin={0}
      animationDuration={400}
      animationEasing="ease"
      data={Array []}
      dataKey="setBValue"
      fill="#D24040"
      hide={false}
      isAnimationActive={true}
      layout="vertical"
      legendType="rect"
      minPointSize={0}
      shape={
        <ColoredBar
          color="light"
          index={0}
        />
      }
      stackId="unique"
      xAxisId={0}
      yAxisId={0}
    />
    <Legend
      align="center"
      iconSize={14}
      layout="horizontal"
      payload={
        Array [
          Object {
            "color": "#0088FE",
            "formatter": [Function],
            "type": "rect",
            "value": "d1",
          },
          Object {
            "color": "#00ABC4",
            "formatter": [Function],
            "type": "rect",
            "value": "d2",
          },
        ]
      }
      verticalAlign="bottom"
    />
  </BarChart>
</ForwardRef>
`;

exports[`StackedDualBarChart should render a BarChart with default values 1`] = `
<ForwardRef
  height={320}
>
  <BarChart
    barCategoryGap="10%"
    barGap={4}
    data={Array []}
    height={300}
    layout="horizontal"
    margin={
      Object {
        "bottom": 0,
        "left": 0,
        "right": 30,
        "top": 0,
      }
    }
    reverseStackOrder={false}
    stackOffset="none"
    syncMethod="index"
  >
    <XAxis
      allowDataOverflow={false}
      allowDecimals={true}
      allowDuplicatedCategory={true}
      dataKey="xAxisName"
      height={30}
      hide={false}
      label=""
      mirror={false}
      orientation="bottom"
      padding={
        Object {
          "left": 0,
          "right": 0,
        }
      }
      reversed={false}
      scale="auto"
      tickCount={5}
      type="category"
      width={0}
      xAxisId={0}
    />
    <YAxis
      allowDataOverflow={false}
      allowDecimals={true}
      allowDuplicatedCategory={true}
      height={0}
      hide={false}
      mirror={false}
      orientation="left"
      padding={
        Object {
          "bottom": 0,
          "top": 0,
        }
      }
      reversed={false}
      scale="auto"
      tickCount={5}
      type="number"
      width={60}
      yAxisId={0}
    />
    <CartesianGrid
      strokeDasharray="2 4"
    />
    <Tooltip
      accessibilityLayer={false}
      allowEscapeViewBox={
        Object {
          "x": false,
          "y": false,
        }
      }
      animationDuration={400}
      animationEasing="ease"
      content={
        <ExtendedTooltip
          active={false}
          chartLabel={null}
          parentData={Array []}
          payload={Array []}
        />
      }
      contentStyle={Object {}}
      coordinate={
        Object {
          "x": 0,
          "y": 0,
        }
      }
      cursor={true}
      cursorStyle={Object {}}
      filterNull={true}
      isAnimationActive={true}
      itemStyle={Object {}}
      labelStyle={Object {}}
      offset={10}
      reverseDirection={
        Object {
          "x": false,
          "y": false,
        }
      }
      separator=" : "
      trigger="hover"
      useTranslate3d={false}
      viewBox={
        Object {
          "height": 0,
          "width": 0,
          "x": 0,
          "y": 0,
        }
      }
      wrapperStyle={Object {}}
    />
    <Bar
      activeBar={false}
      animationBegin={0}
      animationDuration={400}
      animationEasing="ease"
      data={Array []}
      dataKey="setAValue"
      fill="#D24040"
      hide={false}
      isAnimationActive={true}
      layout="vertical"
      legendType="rect"
      minPointSize={0}
      shape={
        <ColoredBar
          color="default"
          index={0}
        />
      }
      stackId="unique"
      xAxisId={0}
      yAxisId={0}
    />
    <Bar
      activeBar={false}
      animationBegin={0}
      animationDuration={400}
      animationEasing="ease"
      data={Array []}
      dataKey="setBValue"
      fill="#D24040"
      hide={false}
      isAnimationActive={true}
      layout="vertical"
      legendType="rect"
      minPointSize={0}
      shape={
        <ColoredBar
          color="light"
          index={0}
        />
      }
      stackId="unique"
      xAxisId={0}
      yAxisId={0}
    />
    <Legend
      align="center"
      iconSize={14}
      layout="horizontal"
      payload={Array []}
      verticalAlign="bottom"
    />
  </BarChart>
</ForwardRef>
`;