| 1 | /**
|
|---|
| 2 | * A collection of all default zIndex values used by Recharts.
|
|---|
| 3 | *
|
|---|
| 4 | * You can reuse these, or you can define your own.
|
|---|
| 5 | */
|
|---|
| 6 | export var DefaultZIndexes = {
|
|---|
| 7 | /**
|
|---|
| 8 | * CartesianGrid and PolarGrid
|
|---|
| 9 | */
|
|---|
| 10 | grid: -100,
|
|---|
| 11 | /**
|
|---|
| 12 | * Background of Bar and RadialBar.
|
|---|
| 13 | * This is not visible by default but can be enabled by setting background={true} on Bar or RadialBar.
|
|---|
| 14 | */
|
|---|
| 15 | barBackground: -50,
|
|---|
| 16 | /*
|
|---|
| 17 | * other chart elements or custom elements without specific zIndex
|
|---|
| 18 | * render in here, at zIndex 0
|
|---|
| 19 | */
|
|---|
| 20 |
|
|---|
| 21 | /**
|
|---|
| 22 | * Area, Pie, Radar, and ReferenceArea
|
|---|
| 23 | */
|
|---|
| 24 | area: 100,
|
|---|
| 25 | /**
|
|---|
| 26 | * Cursor is embedded inside Tooltip and controlled by it.
|
|---|
| 27 | * The Tooltip itself has a separate portal and is not included in the zIndex system;
|
|---|
| 28 | * Cursor is the decoration inside the chart area. CursorRectangle is a rectangle box.
|
|---|
| 29 | * It renders below bar so that in a stacked bar chart the cursor rectangle does not hide the other bars.
|
|---|
| 30 | */
|
|---|
| 31 | cursorRectangle: 200,
|
|---|
| 32 | /**
|
|---|
| 33 | * Bar and RadialBar
|
|---|
| 34 | */
|
|---|
| 35 | bar: 300,
|
|---|
| 36 | /**
|
|---|
| 37 | * Line and ReferenceLine, and ErrorBor
|
|---|
| 38 | */
|
|---|
| 39 | line: 400,
|
|---|
| 40 | /**
|
|---|
| 41 | * XAxis and YAxis and PolarAngleAxis and PolarRadiusAxis ticks and lines and children
|
|---|
| 42 | */
|
|---|
| 43 | axis: 500,
|
|---|
| 44 | /**
|
|---|
| 45 | * Scatter and ReferenceDot,
|
|---|
| 46 | * and Dots of Line and Area and Radar if they have dot=true
|
|---|
| 47 | */
|
|---|
| 48 | scatter: 600,
|
|---|
| 49 | /**
|
|---|
| 50 | * Hovering over a Bar or RadialBar renders a highlight rectangle
|
|---|
| 51 | */
|
|---|
| 52 | activeBar: 1000,
|
|---|
| 53 | /**
|
|---|
| 54 | * Cursor is embedded inside Tooltip and controlled by it.
|
|---|
| 55 | * The Tooltip itself has a separate portal and is not included in the zIndex system;
|
|---|
| 56 | * Cursor is the decoration inside the chart area, usually a cross or a box.
|
|---|
| 57 | * CursorLine is a line cursor rendered in Line, Area, Scatter, Radar charts.
|
|---|
| 58 | * It renders above the Line and Scatter so that it is always visible.
|
|---|
| 59 | * It renders below active dot so that the dot is always visible and shows the current point.
|
|---|
| 60 | * We're also assuming that the active dot is small enough that it does not fully cover the cursor line.
|
|---|
| 61 | *
|
|---|
| 62 | * This also applies to the radial cursor in RadialBarChart.
|
|---|
| 63 | */
|
|---|
| 64 | cursorLine: 1100,
|
|---|
| 65 | /**
|
|---|
| 66 | * Hovering over a Point in Line, Area, Scatter, Radar renders a highlight dot
|
|---|
| 67 | */
|
|---|
| 68 | activeDot: 1200,
|
|---|
| 69 | /**
|
|---|
| 70 | * LabelList and Label, including Axis labels
|
|---|
| 71 | */
|
|---|
| 72 | label: 2000
|
|---|
| 73 | }; |
|---|