@rio-cloud/uikit-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +91 -0
- package/bin/uikit-mcp.mjs +23 -0
- package/data/pages/Components/components/accentbar.json +207 -0
- package/data/pages/Components/components/activity.json +87 -0
- package/data/pages/Components/components/animatednumber.json +99 -0
- package/data/pages/Components/components/animations.json +87 -0
- package/data/pages/Components/components/appheader.json +291 -0
- package/data/pages/Components/components/applayout.json +1198 -0
- package/data/pages/Components/components/appnavigationbar.json +327 -0
- package/data/pages/Components/components/areacharts.json +563 -0
- package/data/pages/Components/components/aspectratioplaceholder.json +75 -0
- package/data/pages/Components/components/assettree.json +3080 -0
- package/data/pages/Components/components/autosuggests.json +710 -0
- package/data/pages/Components/components/avatar.json +157 -0
- package/data/pages/Components/components/banner.json +599 -0
- package/data/pages/Components/components/barcharts.json +1507 -0
- package/data/pages/Components/components/barlist.json +223 -0
- package/data/pages/Components/components/basicmap.json +68 -0
- package/data/pages/Components/components/bottomsheet.json +601 -0
- package/data/pages/Components/components/button.json +583 -0
- package/data/pages/Components/components/buttontoolbar.json +63 -0
- package/data/pages/Components/components/calendarstripe.json +235 -0
- package/data/pages/Components/components/card.json +69 -0
- package/data/pages/Components/components/carousel.json +39 -0
- package/data/pages/Components/components/chartcolors.json +34 -0
- package/data/pages/Components/components/chartsgettingstarted.json +32 -0
- package/data/pages/Components/components/chat.json +39 -0
- package/data/pages/Components/components/checkbox.json +847 -0
- package/data/pages/Components/components/clearableinput.json +789 -0
- package/data/pages/Components/components/collapse.json +175 -0
- package/data/pages/Components/components/composedcharts.json +159 -0
- package/data/pages/Components/components/contentloader.json +233 -0
- package/data/pages/Components/components/datatabs.json +680 -0
- package/data/pages/Components/components/datepickers.json +287 -0
- package/data/pages/Components/components/dialogs.json +1492 -0
- package/data/pages/Components/components/divider.json +93 -0
- package/data/pages/Components/components/dropdowns.json +936 -0
- package/data/pages/Components/components/editablecontent.json +1117 -0
- package/data/pages/Components/components/expander.json +377 -0
- package/data/pages/Components/components/fade.json +403 -0
- package/data/pages/Components/components/fadeexpander.json +75 -0
- package/data/pages/Components/components/fadeup.json +127 -0
- package/data/pages/Components/components/feedback.json +269 -0
- package/data/pages/Components/components/filepickers.json +269 -0
- package/data/pages/Components/components/formlabel.json +115 -0
- package/data/pages/Components/components/fullscreenmap.json +22 -0
- package/data/pages/Components/components/groupeditemlist.json +323 -0
- package/data/pages/Components/components/iconlist.json +45 -0
- package/data/pages/Components/components/imagepreloader.json +81 -0
- package/data/pages/Components/components/labeledelement.json +75 -0
- package/data/pages/Components/components/licenseplate.json +69 -0
- package/data/pages/Components/components/linecharts.json +987 -0
- package/data/pages/Components/components/listmenu.json +313 -0
- package/data/pages/Components/components/loadmore.json +175 -0
- package/data/pages/Components/components/mainnavigation.json +39 -0
- package/data/pages/Components/components/mapcircle.json +34 -0
- package/data/pages/Components/components/mapcluster.json +51 -0
- package/data/pages/Components/components/mapcontext.json +105 -0
- package/data/pages/Components/components/mapdraggablemarker.json +34 -0
- package/data/pages/Components/components/mapgettingstarted.json +27 -0
- package/data/pages/Components/components/mapgroup.json +1198 -0
- package/data/pages/Components/components/mapinfobubble.json +34 -0
- package/data/pages/Components/components/maplayergroup.json +34 -0
- package/data/pages/Components/components/mapmarker.json +700 -0
- package/data/pages/Components/components/mappolygon.json +45 -0
- package/data/pages/Components/components/maproute.json +623 -0
- package/data/pages/Components/components/maproutegenerator.json +16 -0
- package/data/pages/Components/components/mapsettings.json +51 -0
- package/data/pages/Components/components/maputils.json +34 -0
- package/data/pages/Components/components/multiselects.json +1451 -0
- package/data/pages/Components/components/nodata.json +139 -0
- package/data/pages/Components/components/notifications.json +65 -0
- package/data/pages/Components/components/numbercontrol.json +301 -0
- package/data/pages/Components/components/onboarding.json +302 -0
- package/data/pages/Components/components/page.json +197 -0
- package/data/pages/Components/components/pager.json +93 -0
- package/data/pages/Components/components/piecharts.json +731 -0
- package/data/pages/Components/components/popover.json +251 -0
- package/data/pages/Components/components/position.json +69 -0
- package/data/pages/Components/components/radialbarcharts.json +1304 -0
- package/data/pages/Components/components/radiobutton.json +1105 -0
- package/data/pages/Components/components/releasenotes.json +44 -0
- package/data/pages/Components/components/resizer.json +93 -0
- package/data/pages/Components/components/responsivecolumnstripe.json +123 -0
- package/data/pages/Components/components/responsivevideo.json +75 -0
- package/data/pages/Components/components/rioglyph.json +93 -0
- package/data/pages/Components/components/rules.json +410 -0
- package/data/pages/Components/components/saveableinput.json +703 -0
- package/data/pages/Components/components/selects.json +701 -0
- package/data/pages/Components/components/sidebar.json +243 -0
- package/data/pages/Components/components/sliders.json +235 -0
- package/data/pages/Components/components/smoothscrollbars.json +335 -0
- package/data/pages/Components/components/spinners.json +343 -0
- package/data/pages/Components/components/states.json +1705 -0
- package/data/pages/Components/components/statswidgets.json +314 -0
- package/data/pages/Components/components/statusbar.json +177 -0
- package/data/pages/Components/components/stepbutton.json +57 -0
- package/data/pages/Components/components/steppedprogressbars.json +417 -0
- package/data/pages/Components/components/subnavigation.json +107 -0
- package/data/pages/Components/components/supportmarker.json +45 -0
- package/data/pages/Components/components/svgimage.json +81 -0
- package/data/pages/Components/components/switch.json +111 -0
- package/data/pages/Components/components/tables.json +144 -0
- package/data/pages/Components/components/tagmanager.json +86 -0
- package/data/pages/Components/components/tags.json +146 -0
- package/data/pages/Components/components/teaser.json +188 -0
- package/data/pages/Components/components/timeline.json +45 -0
- package/data/pages/Components/components/timepicker.json +163 -0
- package/data/pages/Components/components/togglebutton.json +247 -0
- package/data/pages/Components/components/tooltip.json +270 -0
- package/data/pages/Components/components/virtuallist.json +175 -0
- package/data/pages/Foundations/foundations.json +2475 -0
- package/data/pages/Getting-started/start/changelog.json +22 -0
- package/data/pages/Getting-started/start/goodtoknow.json +32 -0
- package/data/pages/Getting-started/start/guidelines/color-combinations.json +58 -0
- package/data/pages/Getting-started/start/guidelines/custom-css.json +27 -0
- package/data/pages/Getting-started/start/guidelines/custom-rioglyph.json +22 -0
- package/data/pages/Getting-started/start/guidelines/formatting.json +97 -0
- package/data/pages/Getting-started/start/guidelines/iframe.json +93 -0
- package/data/pages/Getting-started/start/guidelines/obfuscate-data.json +22 -0
- package/data/pages/Getting-started/start/guidelines/print-css.json +37 -0
- package/data/pages/Getting-started/start/guidelines/spinner.json +144 -0
- package/data/pages/Getting-started/start/guidelines/supported-browsers.json +22 -0
- package/data/pages/Getting-started/start/guidelines/writing.json +242 -0
- package/data/pages/Getting-started/start/howto.json +72 -0
- package/data/pages/Getting-started/start/intro.json +37 -0
- package/data/pages/Getting-started/start/responsiveness.json +52 -0
- package/data/pages/Templates/templates/common-table.json +39 -0
- package/data/pages/Templates/templates/detail-views.json +71 -0
- package/data/pages/Templates/templates/expandable-details.json +39 -0
- package/data/pages/Templates/templates/feature-cards.json +103 -0
- package/data/pages/Templates/templates/form-summary.json +39 -0
- package/data/pages/Templates/templates/form-toggle.json +39 -0
- package/data/pages/Templates/templates/list-blocks.json +119 -0
- package/data/pages/Templates/templates/loading-progress.json +39 -0
- package/data/pages/Templates/templates/options-panel.json +39 -0
- package/data/pages/Templates/templates/panel-variants.json +39 -0
- package/data/pages/Templates/templates/progress-cards.json +71 -0
- package/data/pages/Templates/templates/progress-success.json +39 -0
- package/data/pages/Templates/templates/settings-form.json +39 -0
- package/data/pages/Templates/templates/stats-blocks.json +135 -0
- package/data/pages/Templates/templates/table-panel.json +39 -0
- package/data/pages/Templates/templates/table-row-animation.json +39 -0
- package/data/pages/Templates/templates/usage-cards.json +39 -0
- package/data/pages/Utilities/utilities/deviceutils.json +39 -0
- package/data/pages/Utilities/utilities/featuretoggles.json +42 -0
- package/data/pages/Utilities/utilities/fueltypeutils.json +118 -0
- package/data/pages/Utilities/utilities/routeutils.json +34 -0
- package/data/pages/Utilities/utilities/useaftermount.json +63 -0
- package/data/pages/Utilities/utilities/useaverage.json +86 -0
- package/data/pages/Utilities/utilities/useclickoutside.json +69 -0
- package/data/pages/Utilities/utilities/useclipboard.json +57 -0
- package/data/pages/Utilities/utilities/usecount.json +92 -0
- package/data/pages/Utilities/utilities/usedarkmode.json +50 -0
- package/data/pages/Utilities/utilities/usedebuginfo.json +63 -0
- package/data/pages/Utilities/utilities/useeffectonce.json +57 -0
- package/data/pages/Utilities/utilities/useelapsedtime.json +57 -0
- package/data/pages/Utilities/utilities/useelementsize.json +63 -0
- package/data/pages/Utilities/utilities/useesc.json +57 -0
- package/data/pages/Utilities/utilities/useevent.json +75 -0
- package/data/pages/Utilities/utilities/usefocustrap.json +57 -0
- package/data/pages/Utilities/utilities/usefullscreen.json +197 -0
- package/data/pages/Utilities/utilities/usehover.json +57 -0
- package/data/pages/Utilities/utilities/useinterval.json +63 -0
- package/data/pages/Utilities/utilities/useisfocuswithin.json +75 -0
- package/data/pages/Utilities/utilities/usekey.json +75 -0
- package/data/pages/Utilities/utilities/uselocalstorage.json +69 -0
- package/data/pages/Utilities/utilities/uselocationsuggestions.json +110 -0
- package/data/pages/Utilities/utilities/usemax.json +86 -0
- package/data/pages/Utilities/utilities/usemin.json +86 -0
- package/data/pages/Utilities/utilities/usemutationobserver.json +69 -0
- package/data/pages/Utilities/utilities/useonlinestatus.json +39 -0
- package/data/pages/Utilities/utilities/useonscreen.json +63 -0
- package/data/pages/Utilities/utilities/usepostmessage.json +80 -0
- package/data/pages/Utilities/utilities/useprevious.json +63 -0
- package/data/pages/Utilities/utilities/useresizeobserver.json +65 -0
- package/data/pages/Utilities/utilities/usescrollposition.json +103 -0
- package/data/pages/Utilities/utilities/usesearch.json +197 -0
- package/data/pages/Utilities/utilities/usesorting.json +139 -0
- package/data/pages/Utilities/utilities/usestatewithvalidation.json +69 -0
- package/data/pages/Utilities/utilities/usesum.json +86 -0
- package/data/pages/Utilities/utilities/usetableexport.json +87 -0
- package/data/pages/Utilities/utilities/usetableselection.json +311 -0
- package/data/pages/Utilities/utilities/usetimeout.json +63 -0
- package/data/pages/Utilities/utilities/usetoggle.json +75 -0
- package/data/pages/Utilities/utilities/usewindowresize.json +63 -0
- package/data/version.json +4 -0
- package/docs/content-schema.md +147 -0
- package/docs/navigation-inventory.json +1310 -0
- package/docs/search-synonyms.json +43 -0
- package/package.json +38 -0
- package/server/index.mjs +268 -0
- package/server/lib/load-docs.mjs +48 -0
- package/server/lib/normalise-doc.mjs +220 -0
- package/server/lib/render-markdown.mjs +82 -0
- package/server/lib/search-index.mjs +49 -0
- package/server/lib/types.js +99 -0
|
@@ -0,0 +1,1507 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"captured_at": "2025-11-21T12:08:24.680Z",
|
|
4
|
+
"source": "https://uikit.developers.rio.cloud/#components/barCharts",
|
|
5
|
+
"category": "Components",
|
|
6
|
+
"section": "Charts",
|
|
7
|
+
"slug": "components/barcharts",
|
|
8
|
+
"version": "v1.13.2",
|
|
9
|
+
"hash_algorithm": "sha256",
|
|
10
|
+
"hash": "eb0e4ec7499c92b26563759b70a299394485e3bea7adab0085c701fb3af70504"
|
|
11
|
+
},
|
|
12
|
+
"title": "BarChart",
|
|
13
|
+
"lead": null,
|
|
14
|
+
"content": [
|
|
15
|
+
{
|
|
16
|
+
"heading": "BarChart",
|
|
17
|
+
"body": "> Note: When using a chart in your application, do not get fancy and try to stick to the proposed examples or at least base your chart upon them. That will save time and money and, equally important, gives the user a coherent look and feel across the different services.",
|
|
18
|
+
"examples": [
|
|
19
|
+
{
|
|
20
|
+
"caption": "Simple horizontal BarChart",
|
|
21
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Simple horizontal BarChart</div><div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\"><div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\"><div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\"><svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\"><title></title><desc></desc><defs><clipPath id=\"recharts1-clip\"><rect x=\"0\" y=\"0\" height=\"223\" width=\"468\"></rect></clipPath></defs><g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\"><line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"0\" y1=\"223\" x2=\"468\" y2=\"223\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"229\" x2=\"39\" y2=\"223\"></line><text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"39\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"39\" dy=\"0.71em\">January</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"117\" y1=\"229\" x2=\"117\" y2=\"223\"></line><text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"117\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"117\" dy=\"0.71em\">February</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"195\" y1=\"229\" x2=\"195\" y2=\"223\"></line><text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"195\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"195\" dy=\"0.71em\">March</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"273\" y1=\"229\" x2=\"273\" y2=\"223\"></line><text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"273\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"273\" dy=\"0.71em\">April</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"351\" y1=\"229\" x2=\"351\" y2=\"223\"></line><text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"351\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"351\" dy=\"0.71em\">May</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"429\" y1=\"229\" x2=\"429\" y2=\"223\"></line><text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"429\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"429\" dy=\"0.71em\">June</tspan></text></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g></svg><div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(10px, 10px);\"><div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\"><p class=\"recharts-tooltip-label\" style=\"margin: 0px;\"></p></div></div></div></div></div></div>",
|
|
22
|
+
"tabs": [
|
|
23
|
+
{
|
|
24
|
+
"label": "React",
|
|
25
|
+
"language": "tsx",
|
|
26
|
+
"code": "import BarChart from '@rio-cloud/rio-uikit/BarChart';\nimport Bar from '@rio-cloud/rio-uikit/Bar';\nimport FormLabel from '@rio-cloud/rio-uikit/FormLabel';\n\nexport default () => {\n return (\n <>\n <FormLabel>Simple horizontal BarChart</FormLabel>\n <div className='panel panel-default panel-body margin-bottom-0 height-300 max-width-500'>\n <BarChart\n data={data}\n dataKey='label'\n xAxisOptions={{ dataKey: 'label' }}\n showYAxis={false}\n margin={{ bottom: 15 }}\n bars={[\n <Bar\n key='myBar'\n dataKey='costs'\n unit='€'\n color='brand-primary'\n radius={[3, 3, 0, 0]}\n label={{\n position: 'top',\n formatter: (value: number) => `${value} €`,\n }}\n />,\n ]}\n />\n </div>\n </>\n );\n};\n\nconst data = [\n {\n label: 'January',\n costs: 46.8,\n },\n {\n label: 'February',\n costs: 22.0,\n },\n {\n label: 'March',\n costs: 12.4,\n },\n {\n label: 'April',\n costs: 3.88,\n },\n {\n label: 'May',\n costs: 3.23,\n },\n {\n label: 'June',\n costs: 4.67,\n },\n];"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"label": "HTML",
|
|
30
|
+
"language": "html",
|
|
31
|
+
"code": "<div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Simple horizontal BarChart</div>\n<div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\">\n <div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\">\n <div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\">\n <svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\">\n <title>\n </title>\n <desc>\n </desc>\n <defs>\n <clipPath id=\"recharts1-clip\">\n <rect x=\"0\" y=\"0\" height=\"223\" width=\"468\">\n </rect>\n </clipPath>\n </defs>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\">\n <line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"0\" y1=\"223\" x2=\"468\" y2=\"223\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"229\" x2=\"39\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"39\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"39\" dy=\"0.71em\">January</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"117\" y1=\"229\" x2=\"117\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"117\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"117\" dy=\"0.71em\">February</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"195\" y1=\"229\" x2=\"195\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"195\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"195\" dy=\"0.71em\">March</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"273\" y1=\"229\" x2=\"273\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"273\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"273\" dy=\"0.71em\">April</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"351\" y1=\"229\" x2=\"351\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"351\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"351\" dy=\"0.71em\">May</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"468\" height=\"30\" x=\"0\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"429\" y1=\"229\" x2=\"429\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"468\" height=\"30\" stroke=\"none\" x=\"429\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"429\" dy=\"0.71em\">June</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"7.8\" y=\"71.0355991202002\" width=\"62\" height=\"151.9644008797998\" radius=\"3,3,0,0\" fill=\"#30b4c0 \" class=\"recharts-rectangle\" d=\"M7.8,74.0355991202002A 3,3,0,0,1,10.8,71.0355991202002L 66.8,71.0355991202002A 3,3,0,0,1,\n 69.8,74.0355991202002L 69.8,223L 7.8,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"85.8\" y=\"151.56374317616246\" width=\"62\" height=\"71.43625682383752\" radius=\"3,3,0,0\" fill=\"#30b4c0 \" class=\"recharts-rectangle\" d=\"M85.8,154.56374317616246A 3,3,0,0,1,88.8,151.56374317616246L 144.8,151.56374317616246A 3,3,0,0,1,\n 147.8,154.56374317616246L 147.8,223L 85.8,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"163.8\" y=\"182.73592797201886\" width=\"62\" height=\"40.26407202798115\" radius=\"3,3,0,0\" fill=\"#30b4c0 \" class=\"recharts-rectangle\" d=\"M163.8,185.73592797201886A 3,3,0,0,1,166.8,182.73592797201886L 222.8,182.73592797201886A 3,3,0,0,1,\n 225.8,185.73592797201886L 225.8,223L 163.8,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"241.8\" y=\"210.40124197834137\" width=\"62\" height=\"12.598758021658625\" radius=\"3,3,0,0\" fill=\"#30b4c0 \" class=\"recharts-rectangle\" d=\"M241.8,213.40124197834137A 3,3,0,0,1,244.8,210.40124197834137L 300.8,210.40124197834137A 3,3,0,0,1,\n 303.8,213.40124197834137L 303.8,223L 241.8,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"319.8\" y=\"212.5118586572275\" width=\"62\" height=\"10.488141342772499\" radius=\"3,3,0,0\" fill=\"#30b4c0 \" class=\"recharts-rectangle\" d=\"M319.8,215.5118586572275A 3,3,0,0,1,322.8,212.5118586572275L 378.8,212.5118586572275A 3,3,0,0,1,\n 381.8,215.5118586572275L 381.8,223L 319.8,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"397.8\" y=\"207.83603093784905\" width=\"62\" height=\"15.163969062150958\" radius=\"3,3,0,0\" fill=\"#30b4c0 \" class=\"recharts-rectangle\" d=\"M397.8,210.83603093784905A 3,3,0,0,1,400.8,207.83603093784905L 456.8,207.83603093784905A 3,3,0,0,1,\n 459.8,210.83603093784905L 459.8,223L 397.8,223Z\">\n </path>\n </g>\n </g>\n </g>\n </g>\n </svg>\n <div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(10px, 10px);\">\n <div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\">\n <p class=\"recharts-tooltip-label\" style=\"margin: 0px;\">\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"label": "Props",
|
|
35
|
+
"language": "json",
|
|
36
|
+
"code": null,
|
|
37
|
+
"props": [
|
|
38
|
+
{
|
|
39
|
+
"heading": "BarChart",
|
|
40
|
+
"rows": [
|
|
41
|
+
{
|
|
42
|
+
"name": "width",
|
|
43
|
+
"type": "Number",
|
|
44
|
+
"default": "",
|
|
45
|
+
"description": "The width of chart container."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "height",
|
|
49
|
+
"type": "Number",
|
|
50
|
+
"default": "",
|
|
51
|
+
"description": "The height of chart container."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "data",
|
|
55
|
+
"type": "Array",
|
|
56
|
+
"default": "",
|
|
57
|
+
"description": "The source data, in which each element is an object. It has the following format: [{ name: \"a\", value: 12 }] Note: for some charts, the color of the individual data is taken from the color prop: [{ name: \"a\", value: 12, color: \"color-coldplay-fountain\" }]"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "dataKey",
|
|
61
|
+
"type": "String | Number | Function",
|
|
62
|
+
"default": "value",
|
|
63
|
+
"description": "The key of data displayed in the axis. Also, used as label for the x-axis."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "dataUnit",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"default": "",
|
|
69
|
+
"description": "The unit of data displayed in the chart."
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "layout",
|
|
73
|
+
"type": "String",
|
|
74
|
+
"default": "horizontal",
|
|
75
|
+
"description": "The layout of the chart. Possible values are: horizontal, vertical"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "showGrid",
|
|
79
|
+
"type": "Boolean",
|
|
80
|
+
"default": "false",
|
|
81
|
+
"description": "Defines whether or not the grid shall be rendered."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "showXAxis",
|
|
85
|
+
"type": "Boolean",
|
|
86
|
+
"default": "true",
|
|
87
|
+
"description": "Defines whether or not the x-axis shall be rendered."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "showYAxis",
|
|
91
|
+
"type": "Boolean",
|
|
92
|
+
"default": "true",
|
|
93
|
+
"description": "Defines whether or not the y-axis shall be rendered."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "xAxisOptions",
|
|
97
|
+
"type": "Object",
|
|
98
|
+
"default": "",
|
|
99
|
+
"description": "Detailed options passed to the underlying XAxis component. Details can be found here: https://recharts.org/en-US/api/XAxis"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "yAxisOptions",
|
|
103
|
+
"type": "Object",
|
|
104
|
+
"default": "",
|
|
105
|
+
"description": "Detailed options passed to the underlying YAxis component. Details can be found here: https://recharts.org/en-US/api/YAxis"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "additionalAxes",
|
|
109
|
+
"type": "React.ReactElement<XAxisProps | YAxisProps>[]",
|
|
110
|
+
"default": "",
|
|
111
|
+
"description": "Render a list of additional axes. This includes YAxis and XAxis."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "gridOptions",
|
|
115
|
+
"type": "Object",
|
|
116
|
+
"default": "",
|
|
117
|
+
"description": "Detailed options passed to the underlying Grid component. Details can be found here: https://recharts.org/en-US/api/CartesianGrid"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "useDataColors",
|
|
121
|
+
"type": "Boolean",
|
|
122
|
+
"default": "false",
|
|
123
|
+
"description": "Defines whether or not the color information shall be taken from the data input to use different colors for different entries."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "brush",
|
|
127
|
+
"type": "Boolean",
|
|
128
|
+
"default": "false",
|
|
129
|
+
"description": "Defines whether or not the brush component shall be used."
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "tooltip",
|
|
133
|
+
"type": "ChartTooltip | Boolean",
|
|
134
|
+
"default": "",
|
|
135
|
+
"description": "Defines whether or not the tooltip component shall be used. You can customize the tooltip by providing a custom ChartTooltip. Prop details can be found here: https://recharts.org/en-US/api/Tooltip. You can also customize the cursor color by setting a stroke or fill color in the cursor props. Details can be found here: https://recharts.org/en-US/api/Tooltip#cursor"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "legend",
|
|
139
|
+
"type": "Legend | Boolean",
|
|
140
|
+
"default": "false",
|
|
141
|
+
"description": "Shows the provided Legend component otherwise shows nothing."
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "bars",
|
|
145
|
+
"type": "Array of Bar",
|
|
146
|
+
"default": "[]",
|
|
147
|
+
"description": "Renders the provided Bar components."
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "...",
|
|
151
|
+
"type": "",
|
|
152
|
+
"default": "",
|
|
153
|
+
"description": "Additional props are passed to the underlying BarChart component. Details can be found here: https://recharts.org/en-US/api/BarChart"
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"heading": "Bar",
|
|
159
|
+
"rows": [
|
|
160
|
+
{
|
|
161
|
+
"name": "color",
|
|
162
|
+
"type": "String",
|
|
163
|
+
"default": "color-coldplay-fountain",
|
|
164
|
+
"description": "Defines the color for the whole bar component instead of individual colors from the data. Take the color name from the charts colors page."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "dataKey",
|
|
168
|
+
"type": "string | number | ((obj: T) => any)",
|
|
169
|
+
"default": "value",
|
|
170
|
+
"description": "The key of data used for the bar."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "dataUnit",
|
|
174
|
+
"type": "String | Number",
|
|
175
|
+
"default": "",
|
|
176
|
+
"description": "The unit of data displayed for the bar."
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "...",
|
|
180
|
+
"type": "",
|
|
181
|
+
"default": "",
|
|
182
|
+
"description": "Additional props are passed to the underlying Bar component. Details can be found here: https://recharts.org/en-US/api/Bar"
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"heading": "Legend",
|
|
188
|
+
"rows": [
|
|
189
|
+
{
|
|
190
|
+
"name": "iconType",
|
|
191
|
+
"type": "String",
|
|
192
|
+
"default": "square",
|
|
193
|
+
"description": "Defines the type of the leading icon."
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "iconSize",
|
|
197
|
+
"type": "String",
|
|
198
|
+
"default": "12",
|
|
199
|
+
"description": "Defines the size of the leading icon."
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "layout",
|
|
203
|
+
"type": "String",
|
|
204
|
+
"default": "vertical",
|
|
205
|
+
"description": "Defines the layout of the legend."
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "align",
|
|
209
|
+
"type": "String",
|
|
210
|
+
"default": "right",
|
|
211
|
+
"description": "Defines the alignment of the legend relative to the chart."
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "verticalAlign",
|
|
215
|
+
"type": "String",
|
|
216
|
+
"default": "top",
|
|
217
|
+
"description": "Defines the vertical alignment of the legend relative to the chart."
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "...",
|
|
221
|
+
"type": "",
|
|
222
|
+
"default": "",
|
|
223
|
+
"description": "Additional props are passed to the underlying legend component. Details can be found here: https://recharts.org/en-US/api/Legend"
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"caption": "Horizontal BarChart",
|
|
233
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Horizontal BarChart</div><div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\"><div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\"><div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\"><svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\"><title></title><desc></desc><defs><clipPath id=\"recharts4-clip\"><rect x=\"60\" y=\"0\" height=\"223\" width=\"408\"></rect></clipPath></defs><g class=\"recharts-cartesian-grid\"><g class=\"recharts-cartesian-grid-horizontal\"><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"223\" x2=\"468\" y2=\"223\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"167.25\" x2=\"468\" y2=\"167.25\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"111.5\" x2=\"468\" y2=\"111.5\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"55.75\" x2=\"468\" y2=\"55.75\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"0\" x2=\"468\" y2=\"0\"></line></g><g class=\"recharts-cartesian-grid-vertical\"><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"94\" y1=\"0\" x2=\"94\" y2=\"223\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"162\" y1=\"0\" x2=\"162\" y2=\"223\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"230\" y1=\"0\" x2=\"230\" y2=\"223\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"298\" y1=\"0\" x2=\"298\" y2=\"223\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"366\" y1=\"0\" x2=\"366\" y2=\"223\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"434\" y1=\"0\" x2=\"434\" y2=\"223\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"0\" x2=\"60\" y2=\"223\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"468\" y1=\"0\" x2=\"468\" y2=\"223\"></line></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"223\" x2=\"468\" y2=\"223\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"94\" y1=\"229\" x2=\"94\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"94\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"94\" dy=\"0.71em\">January</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"162\" y1=\"229\" x2=\"162\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"162\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"162\" dy=\"0.71em\">February</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"230\" y1=\"229\" x2=\"230\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"230\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"230\" dy=\"0.71em\">March</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"298\" y1=\"229\" x2=\"298\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"298\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"298\" dy=\"0.71em\">April</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"366\" y1=\"229\" x2=\"366\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"366\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"366\" dy=\"0.71em\">May</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"434\" y1=\"229\" x2=\"434\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"434\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"434\" dy=\"0.71em\">June</tspan></text></g></g><text offset=\"0\" x=\"264\" y=\"253\" class=\"recharts-text recharts-label\" text-anchor=\"middle\" fill=\"#808080\"><tspan x=\"264\" dy=\"0.71em\">Timerange</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\"><line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"0\" x2=\"60\" y2=\"223\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"223\" x2=\"60\" y2=\"223\"></line><text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"223\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">0 €</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"167.25\" x2=\"60\" y2=\"167.25\"></line><text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"167.25\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">15 €</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"111.5\" x2=\"60\" y2=\"111.5\"></line><text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"111.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">30 €</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"55.75\" x2=\"60\" y2=\"55.75\"></line><text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"55.75\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">45 €</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"0\" x2=\"60\" y2=\"0\"></line><text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">60 €</tspan></text></g></g><text offset=\"5\" transform=\"rotate(-90, 5, 111.5)\" x=\"5\" y=\"111.5\" class=\"recharts-text recharts-label\" text-anchor=\"start\" fill=\"#808080\"><tspan x=\"5\" dy=\"0.355em\">Costs</tspan></text></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g></svg><div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(60px, 10px);\"><div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\"><p class=\"recharts-tooltip-label\" style=\"margin: 0px;\"></p></div></div></div></div></div></div>",
|
|
234
|
+
"tabs": [
|
|
235
|
+
{
|
|
236
|
+
"label": "React",
|
|
237
|
+
"language": "tsx",
|
|
238
|
+
"code": "import BarChart from '@rio-cloud/rio-uikit/BarChart';\nimport Bar from '@rio-cloud/rio-uikit/Bar';\nimport FormLabel from '@rio-cloud/rio-uikit/FormLabel';\n\nexport default () => {\n return (\n <>\n <FormLabel>Horizontal BarChart</FormLabel>\n <div className='panel panel-default panel-body margin-bottom-0 height-300 max-width-500'>\n <BarChart\n data={data}\n dataKey='label'\n showGrid\n xAxisOptions={{\n dataKey: 'label',\n label: { value: 'Timerange', offset: 0, position: 'bottom' },\n }}\n yAxisOptions={{\n unit: ' €',\n label: { value: 'Costs', angle: -90, position: 'insideLeft' },\n }}\n margin={{ bottom: 15 }}\n bars={[<Bar key='myBar' dataKey='costs' unit='€' radius={[3, 3, 0, 0]} barSize={20} />]}\n />\n </div>\n </>\n );\n};\n\nconst data = [\n {\n label: 'January',\n costs: 46.8,\n },\n {\n label: 'February',\n costs: 22.0,\n },\n {\n label: 'March',\n costs: 12.4,\n },\n {\n label: 'April',\n costs: 3.88,\n },\n {\n label: 'May',\n costs: 3.23,\n },\n {\n label: 'June',\n costs: 4.67,\n },\n];"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"label": "HTML",
|
|
242
|
+
"language": "html",
|
|
243
|
+
"code": "<div class=\"text-color-dark max-width-100pct text-size-12 display-inline-block margin-bottom-5\">Horizontal BarChart</div>\n<div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\">\n <div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\">\n <div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\">\n <svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\">\n <title>\n </title>\n <desc>\n </desc>\n <defs>\n <clipPath id=\"recharts4-clip\">\n <rect x=\"60\" y=\"0\" height=\"223\" width=\"408\">\n </rect>\n </clipPath>\n </defs>\n <g class=\"recharts-cartesian-grid\">\n <g class=\"recharts-cartesian-grid-horizontal\">\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"223\" x2=\"468\" y2=\"223\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"167.25\" x2=\"468\" y2=\"167.25\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"111.5\" x2=\"468\" y2=\"111.5\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"55.75\" x2=\"468\" y2=\"55.75\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"0\" x2=\"468\" y2=\"0\">\n </line>\n </g>\n <g class=\"recharts-cartesian-grid-vertical\">\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"94\" y1=\"0\" x2=\"94\" y2=\"223\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"162\" y1=\"0\" x2=\"162\" y2=\"223\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"230\" y1=\"0\" x2=\"230\" y2=\"223\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"298\" y1=\"0\" x2=\"298\" y2=\"223\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"366\" y1=\"0\" x2=\"366\" y2=\"223\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"434\" y1=\"0\" x2=\"434\" y2=\"223\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"60\" y1=\"0\" x2=\"60\" y2=\"223\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"223\" x1=\"468\" y1=\"0\" x2=\"468\" y2=\"223\">\n </line>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"223\" x2=\"468\" y2=\"223\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"94\" y1=\"229\" x2=\"94\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"94\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"94\" dy=\"0.71em\">January</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"162\" y1=\"229\" x2=\"162\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"162\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"162\" dy=\"0.71em\">February</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"230\" y1=\"229\" x2=\"230\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"230\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"230\" dy=\"0.71em\">March</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"298\" y1=\"229\" x2=\"298\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"298\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"298\" dy=\"0.71em\">April</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"366\" y1=\"229\" x2=\"366\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"366\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"366\" dy=\"0.71em\">May</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"434\" y1=\"229\" x2=\"434\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"434\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"434\" dy=\"0.71em\">June</tspan>\n </text>\n </g>\n </g>\n <text offset=\"0\" x=\"264\" y=\"253\" class=\"recharts-text recharts-label\" text-anchor=\"middle\" fill=\"#808080\">\n <tspan x=\"264\" dy=\"0.71em\">Timerange</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\">\n <line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"0\" x2=\"60\" y2=\"223\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"223\" x2=\"60\" y2=\"223\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"223\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">0 €</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"167.25\" x2=\"60\" y2=\"167.25\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"167.25\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">15 €</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"111.5\" x2=\"60\" y2=\"111.5\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"111.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">30 €</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"55.75\" x2=\"60\" y2=\"55.75\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"55.75\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">45 €</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"223\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"0\" x2=\"60\" y2=\"0\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"223\" stroke=\"none\" x=\"52\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">60 €</tspan>\n </text>\n </g>\n </g>\n <text offset=\"5\" transform=\"rotate(-90, 5, 111.5)\" x=\"5\" y=\"111.5\" class=\"recharts-text recharts-label\" text-anchor=\"start\" fill=\"#808080\">\n <tspan x=\"5\" dy=\"0.355em\">Costs</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"84\" y=\"49.06\" width=\"20\" height=\"173.94\" radius=\"3,3,0,0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M84,52.06A 3,3,0,0,1,87,49.06L 101,49.06A 3,3,0,0,1,\n 104,52.06L 104,223L 84,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"152\" y=\"141.23333333333332\" width=\"20\" height=\"81.76666666666668\" radius=\"3,3,0,0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M152,144.23333333333332A 3,3,0,0,1,155,141.23333333333332L 169,141.23333333333332A 3,3,0,0,1,\n 172,144.23333333333332L 172,223L 152,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"220\" y=\"176.91333333333333\" width=\"20\" height=\"46.08666666666667\" radius=\"3,3,0,0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M220,179.91333333333333A 3,3,0,0,1,223,176.91333333333333L 237,176.91333333333333A 3,3,0,0,1,\n 240,179.91333333333333L 240,223L 220,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"288\" y=\"208.57933333333332\" width=\"20\" height=\"14.420666666666676\" radius=\"3,3,0,0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M288,211.57933333333332A 3,3,0,0,1,291,208.57933333333332L 305,208.57933333333332A 3,3,0,0,1,\n 308,211.57933333333332L 308,223L 288,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"356\" y=\"210.99516666666668\" width=\"20\" height=\"12.004833333333323\" radius=\"3,3,0,0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M356,213.99516666666668A 3,3,0,0,1,359,210.99516666666668L 373,210.99516666666668A 3,3,0,0,1,\n 376,213.99516666666668L 376,223L 356,223Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"424\" y=\"205.64316666666667\" width=\"20\" height=\"17.356833333333327\" radius=\"3,3,0,0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M424,208.64316666666667A 3,3,0,0,1,427,205.64316666666667L 441,205.64316666666667A 3,3,0,0,1,\n 444,208.64316666666667L 444,223L 424,223Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n </g>\n </svg>\n <div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(60px, 10px);\">\n <div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\">\n <p class=\"recharts-tooltip-label\" style=\"margin: 0px;\">\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"label": "Props",
|
|
247
|
+
"language": "json",
|
|
248
|
+
"code": null,
|
|
249
|
+
"props": [
|
|
250
|
+
{
|
|
251
|
+
"heading": "BarChart",
|
|
252
|
+
"rows": [
|
|
253
|
+
{
|
|
254
|
+
"name": "width",
|
|
255
|
+
"type": "Number",
|
|
256
|
+
"default": "",
|
|
257
|
+
"description": "The width of chart container."
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "height",
|
|
261
|
+
"type": "Number",
|
|
262
|
+
"default": "",
|
|
263
|
+
"description": "The height of chart container."
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"name": "data",
|
|
267
|
+
"type": "Array",
|
|
268
|
+
"default": "",
|
|
269
|
+
"description": "The source data, in which each element is an object. It has the following format: [{ name: \"a\", value: 12 }] Note: for some charts, the color of the individual data is taken from the color prop: [{ name: \"a\", value: 12, color: \"color-coldplay-fountain\" }]"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "dataKey",
|
|
273
|
+
"type": "String | Number | Function",
|
|
274
|
+
"default": "value",
|
|
275
|
+
"description": "The key of data displayed in the axis. Also, used as label for the x-axis."
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "dataUnit",
|
|
279
|
+
"type": "string",
|
|
280
|
+
"default": "",
|
|
281
|
+
"description": "The unit of data displayed in the chart."
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "layout",
|
|
285
|
+
"type": "String",
|
|
286
|
+
"default": "horizontal",
|
|
287
|
+
"description": "The layout of the chart. Possible values are: horizontal, vertical"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "showGrid",
|
|
291
|
+
"type": "Boolean",
|
|
292
|
+
"default": "false",
|
|
293
|
+
"description": "Defines whether or not the grid shall be rendered."
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "showXAxis",
|
|
297
|
+
"type": "Boolean",
|
|
298
|
+
"default": "true",
|
|
299
|
+
"description": "Defines whether or not the x-axis shall be rendered."
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "showYAxis",
|
|
303
|
+
"type": "Boolean",
|
|
304
|
+
"default": "true",
|
|
305
|
+
"description": "Defines whether or not the y-axis shall be rendered."
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "xAxisOptions",
|
|
309
|
+
"type": "Object",
|
|
310
|
+
"default": "",
|
|
311
|
+
"description": "Detailed options passed to the underlying XAxis component. Details can be found here: https://recharts.org/en-US/api/XAxis"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"name": "yAxisOptions",
|
|
315
|
+
"type": "Object",
|
|
316
|
+
"default": "",
|
|
317
|
+
"description": "Detailed options passed to the underlying YAxis component. Details can be found here: https://recharts.org/en-US/api/YAxis"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "additionalAxes",
|
|
321
|
+
"type": "React.ReactElement<XAxisProps | YAxisProps>[]",
|
|
322
|
+
"default": "",
|
|
323
|
+
"description": "Render a list of additional axes. This includes YAxis and XAxis."
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"name": "gridOptions",
|
|
327
|
+
"type": "Object",
|
|
328
|
+
"default": "",
|
|
329
|
+
"description": "Detailed options passed to the underlying Grid component. Details can be found here: https://recharts.org/en-US/api/CartesianGrid"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "useDataColors",
|
|
333
|
+
"type": "Boolean",
|
|
334
|
+
"default": "false",
|
|
335
|
+
"description": "Defines whether or not the color information shall be taken from the data input to use different colors for different entries."
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "brush",
|
|
339
|
+
"type": "Boolean",
|
|
340
|
+
"default": "false",
|
|
341
|
+
"description": "Defines whether or not the brush component shall be used."
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "tooltip",
|
|
345
|
+
"type": "ChartTooltip | Boolean",
|
|
346
|
+
"default": "",
|
|
347
|
+
"description": "Defines whether or not the tooltip component shall be used. You can customize the tooltip by providing a custom ChartTooltip. Prop details can be found here: https://recharts.org/en-US/api/Tooltip. You can also customize the cursor color by setting a stroke or fill color in the cursor props. Details can be found here: https://recharts.org/en-US/api/Tooltip#cursor"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "legend",
|
|
351
|
+
"type": "Legend | Boolean",
|
|
352
|
+
"default": "false",
|
|
353
|
+
"description": "Shows the provided Legend component otherwise shows nothing."
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "bars",
|
|
357
|
+
"type": "Array of Bar",
|
|
358
|
+
"default": "[]",
|
|
359
|
+
"description": "Renders the provided Bar components."
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "...",
|
|
363
|
+
"type": "",
|
|
364
|
+
"default": "",
|
|
365
|
+
"description": "Additional props are passed to the underlying BarChart component. Details can be found here: https://recharts.org/en-US/api/BarChart"
|
|
366
|
+
}
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"heading": "Bar",
|
|
371
|
+
"rows": [
|
|
372
|
+
{
|
|
373
|
+
"name": "color",
|
|
374
|
+
"type": "String",
|
|
375
|
+
"default": "color-coldplay-fountain",
|
|
376
|
+
"description": "Defines the color for the whole bar component instead of individual colors from the data. Take the color name from the charts colors page."
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "dataKey",
|
|
380
|
+
"type": "string | number | ((obj: T) => any)",
|
|
381
|
+
"default": "value",
|
|
382
|
+
"description": "The key of data used for the bar."
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "dataUnit",
|
|
386
|
+
"type": "String | Number",
|
|
387
|
+
"default": "",
|
|
388
|
+
"description": "The unit of data displayed for the bar."
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"name": "...",
|
|
392
|
+
"type": "",
|
|
393
|
+
"default": "",
|
|
394
|
+
"description": "Additional props are passed to the underlying Bar component. Details can be found here: https://recharts.org/en-US/api/Bar"
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"heading": "Legend",
|
|
400
|
+
"rows": [
|
|
401
|
+
{
|
|
402
|
+
"name": "iconType",
|
|
403
|
+
"type": "String",
|
|
404
|
+
"default": "square",
|
|
405
|
+
"description": "Defines the type of the leading icon."
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "iconSize",
|
|
409
|
+
"type": "String",
|
|
410
|
+
"default": "12",
|
|
411
|
+
"description": "Defines the size of the leading icon."
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"name": "layout",
|
|
415
|
+
"type": "String",
|
|
416
|
+
"default": "vertical",
|
|
417
|
+
"description": "Defines the layout of the legend."
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "align",
|
|
421
|
+
"type": "String",
|
|
422
|
+
"default": "right",
|
|
423
|
+
"description": "Defines the alignment of the legend relative to the chart."
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "verticalAlign",
|
|
427
|
+
"type": "String",
|
|
428
|
+
"default": "top",
|
|
429
|
+
"description": "Defines the vertical alignment of the legend relative to the chart."
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"name": "...",
|
|
433
|
+
"type": "",
|
|
434
|
+
"default": "",
|
|
435
|
+
"description": "Additional props are passed to the underlying legend component. Details can be found here: https://recharts.org/en-US/api/Legend"
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"caption": "Example 3",
|
|
445
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><label>Multiple Bars BarChart</label><div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\"><div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\"><div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\"><svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\"><title></title><desc></desc><defs><clipPath id=\"recharts7-clip\"><rect x=\"45\" y=\"5\" height=\"208\" width=\"418\"></rect></clipPath></defs><g class=\"recharts-cartesian-grid\"><g class=\"recharts-cartesian-grid-horizontal\"><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"161\" x2=\"463\" y2=\"161\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"109\" x2=\"463\" y2=\"109\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"57\" x2=\"463\" y2=\"57\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"5\" x2=\"463\" y2=\"5\"></line></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"74.85714285714286\" y1=\"219\" x2=\"74.85714285714286\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"74.85714285714286\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"74.85714285714286\" dy=\"0.71em\">Page A</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"134.57142857142858\" y1=\"219\" x2=\"134.57142857142858\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"134.57142857142858\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"134.57142857142858\" dy=\"0.71em\">Page B</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"194.2857142857143\" y1=\"219\" x2=\"194.2857142857143\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"194.2857142857143\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"194.2857142857143\" dy=\"0.71em\">Page C</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"254\" y1=\"219\" x2=\"254\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"254\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"254\" dy=\"0.71em\">Page D</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"313.7142857142857\" y1=\"219\" x2=\"313.7142857142857\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"313.7142857142857\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"313.7142857142857\" dy=\"0.71em\">Page E</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"373.4285714285714\" y1=\"219\" x2=\"373.4285714285714\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"373.4285714285714\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"373.4285714285714\" dy=\"0.71em\">Page F</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"433.1428571428571\" y1=\"219\" x2=\"433.1428571428571\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"433.1428571428571\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"433.1428571428571\" dy=\"0.71em\">Page G</tspan></text></g></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"5\" x2=\"45\" y2=\"213\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"213\" x2=\"45\" y2=\"213\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"213\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">0</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"161\" x2=\"45\" y2=\"161\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"161\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">2500</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"109\" x2=\"45\" y2=\"109\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"109\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">5000</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"57\" x2=\"45\" y2=\"57\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"57\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">7500</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"5\" x2=\"45\" y2=\"5\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">10000</tspan></text></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g></svg><div class=\"recharts-legend-wrapper\" style=\"position: absolute; width: 458px; height: auto; left: 5px; bottom: 5px;\"><ul class=\"recharts-default-legend\" style=\"padding: 0px; margin: 0px; text-align: center;\"><li class=\"recharts-legend-item legend-item-0\" style=\"display: inline-block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#a1daa3 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(161, 218, 163);\">pv</span></li><li class=\"recharts-legend-item legend-item-1\" style=\"display: inline-block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#31144f \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(49, 20, 79);\">uv</span></li></ul></div><div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(45px, 10px);\"><div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\"><p class=\"recharts-tooltip-label\" style=\"margin: 0px;\"></p></div></div></div></div></div></div>",
|
|
446
|
+
"tabs": [
|
|
447
|
+
{
|
|
448
|
+
"label": "React",
|
|
449
|
+
"language": "tsx",
|
|
450
|
+
"code": "import BarChart from '@rio-cloud/rio-uikit/BarChart';\nimport Bar from '@rio-cloud/rio-uikit/Bar';\nimport Legend from '@rio-cloud/rio-uikit/Legend';\n\nexport default () => {\n return (\n <>\n <label>Multiple Bars BarChart</label>\n <div className='panel panel-default panel-body margin-bottom-0 height-300 max-width-500'>\n <BarChart\n data={data}\n dataKey='name'\n legend={<Legend layout='horizontal' verticalAlign='bottom' align='center' />}\n showGrid\n gridOptions={{ vertical: false }}\n xAxisOptions={{ dataKey: 'name' }}\n yAxisOptions={{ width: 40 }}\n bars={[\n <Bar key='pv' dataKey='pv' color='color-coldplay-moos' />,\n <Bar key='uv' dataKey='uv' color='color-warmup-crimson' />,\n ]}\n />\n </div>\n </>\n );\n};\n\nconst data = [\n { name: 'Page A', uv: 4000, pv: 2400 },\n { name: 'Page B', uv: 3000, pv: 1398 },\n { name: 'Page C', uv: 2000, pv: 9800 },\n { name: 'Page D', uv: 2780, pv: 3908 },\n { name: 'Page E', uv: 1890, pv: 4800 },\n { name: 'Page F', uv: 2390, pv: 3800 },\n { name: 'Page G', uv: 3490, pv: 4300 },\n];"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"label": "HTML",
|
|
454
|
+
"language": "html",
|
|
455
|
+
"code": "<label>Multiple Bars BarChart</label>\n<div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\">\n <div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\">\n <div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\">\n <svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\">\n <title>\n </title>\n <desc>\n </desc>\n <defs>\n <clipPath id=\"recharts7-clip\">\n <rect x=\"45\" y=\"5\" height=\"208\" width=\"418\">\n </rect>\n </clipPath>\n </defs>\n <g class=\"recharts-cartesian-grid\">\n <g class=\"recharts-cartesian-grid-horizontal\">\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"161\" x2=\"463\" y2=\"161\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"109\" x2=\"463\" y2=\"109\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"57\" x2=\"463\" y2=\"57\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"5\" x2=\"463\" y2=\"5\">\n </line>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"74.85714285714286\" y1=\"219\" x2=\"74.85714285714286\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"74.85714285714286\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"74.85714285714286\" dy=\"0.71em\">Page A</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"134.57142857142858\" y1=\"219\" x2=\"134.57142857142858\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"134.57142857142858\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"134.57142857142858\" dy=\"0.71em\">Page B</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"194.2857142857143\" y1=\"219\" x2=\"194.2857142857143\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"194.2857142857143\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"194.2857142857143\" dy=\"0.71em\">Page C</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"254\" y1=\"219\" x2=\"254\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"254\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"254\" dy=\"0.71em\">Page D</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"313.7142857142857\" y1=\"219\" x2=\"313.7142857142857\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"313.7142857142857\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"313.7142857142857\" dy=\"0.71em\">Page E</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"373.4285714285714\" y1=\"219\" x2=\"373.4285714285714\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"373.4285714285714\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"373.4285714285714\" dy=\"0.71em\">Page F</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"433.1428571428571\" y1=\"219\" x2=\"433.1428571428571\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"433.1428571428571\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"433.1428571428571\" dy=\"0.71em\">Page G</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"5\" x2=\"45\" y2=\"213\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"213\" x2=\"45\" y2=\"213\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"213\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">0</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"161\" x2=\"45\" y2=\"161\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"161\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">2500</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"109\" x2=\"45\" y2=\"109\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"109\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">5000</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"57\" x2=\"45\" y2=\"57\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"57\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">7500</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"5\" x2=\"45\" y2=\"5\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">10000</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"50.971428571428575\" y=\"163.07999999999998\" width=\"21\" height=\"49.920000000000016\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page A\" class=\"recharts-rectangle\" d=\"M 50.971428571428575,163.07999999999998 h 21 v 49.920000000000016 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"110.6857142857143\" y=\"183.9216\" width=\"21\" height=\"29.078399999999988\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page B\" class=\"recharts-rectangle\" d=\"M 110.6857142857143,183.9216 h 21 v 29.078399999999988 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"170.4\" y=\"9.159999999999997\" width=\"21\" height=\"203.84\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page C\" class=\"recharts-rectangle\" d=\"M 170.4,9.159999999999997 h 21 v 203.84 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"230.1142857142857\" y=\"131.7136\" width=\"21\" height=\"81.28639999999999\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page D\" class=\"recharts-rectangle\" d=\"M 230.1142857142857,131.7136 h 21 v 81.28639999999999 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"289.8285714285715\" y=\"113.16000000000001\" width=\"21\" height=\"99.83999999999999\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page E\" class=\"recharts-rectangle\" d=\"M 289.8285714285715,113.16000000000001 h 21 v 99.83999999999999 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"349.54285714285714\" y=\"133.96\" width=\"21\" height=\"79.03999999999999\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page F\" class=\"recharts-rectangle\" d=\"M 349.54285714285714,133.96 h 21 v 79.03999999999999 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"409.25714285714287\" y=\"123.56000000000002\" width=\"21\" height=\"89.43999999999998\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page G\" class=\"recharts-rectangle\" d=\"M 409.25714285714287,123.56000000000002 h 21 v 89.43999999999998 h -21 Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"75.97142857142858\" y=\"129.8\" width=\"21\" height=\"83.19999999999999\" radius=\"0\" fill=\"#31144f \" name=\"Page A\" class=\"recharts-rectangle\" d=\"M 75.97142857142858,129.8 h 21 v 83.19999999999999 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"135.68571428571428\" y=\"150.6\" width=\"21\" height=\"62.400000000000006\" radius=\"0\" fill=\"#31144f \" name=\"Page B\" class=\"recharts-rectangle\" d=\"M 135.68571428571428,150.6 h 21 v 62.400000000000006 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"195.4\" y=\"171.4\" width=\"21\" height=\"41.599999999999994\" radius=\"0\" fill=\"#31144f \" name=\"Page C\" class=\"recharts-rectangle\" d=\"M 195.4,171.4 h 21 v 41.599999999999994 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"255.1142857142857\" y=\"155.176\" width=\"21\" height=\"57.82400000000001\" radius=\"0\" fill=\"#31144f \" name=\"Page D\" class=\"recharts-rectangle\" d=\"M 255.1142857142857,155.176 h 21 v 57.82400000000001 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"314.8285714285715\" y=\"173.688\" width=\"21\" height=\"39.31200000000001\" radius=\"0\" fill=\"#31144f \" name=\"Page E\" class=\"recharts-rectangle\" d=\"M 314.8285714285715,173.688 h 21 v 39.31200000000001 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"374.54285714285714\" y=\"163.28799999999998\" width=\"21\" height=\"49.71200000000002\" radius=\"0\" fill=\"#31144f \" name=\"Page F\" class=\"recharts-rectangle\" d=\"M 374.54285714285714,163.28799999999998 h 21 v 49.71200000000002 h -21 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"434.25714285714287\" y=\"140.40800000000002\" width=\"21\" height=\"72.59199999999998\" radius=\"0\" fill=\"#31144f \" name=\"Page G\" class=\"recharts-rectangle\" d=\"M 434.25714285714287,140.40800000000002 h 21 v 72.59199999999998 h -21 Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n </g>\n </svg>\n <div class=\"recharts-legend-wrapper\" style=\"position: absolute; width: 458px; height: auto; left: 5px; bottom: 5px;\">\n <ul class=\"recharts-default-legend\" style=\"padding: 0px; margin: 0px; text-align: center;\">\n <li class=\"recharts-legend-item legend-item-0\" style=\"display: inline-block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#a1daa3 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(161, 218, 163);\">pv</span>\n </li>\n <li class=\"recharts-legend-item legend-item-1\" style=\"display: inline-block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#31144f \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(49, 20, 79);\">uv</span>\n </li>\n </ul>\n </div>\n <div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(45px, 10px);\">\n <div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\">\n <p class=\"recharts-tooltip-label\" style=\"margin: 0px;\">\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"label": "Props",
|
|
459
|
+
"language": "json",
|
|
460
|
+
"code": null,
|
|
461
|
+
"props": [
|
|
462
|
+
{
|
|
463
|
+
"heading": "BarChart",
|
|
464
|
+
"rows": [
|
|
465
|
+
{
|
|
466
|
+
"name": "width",
|
|
467
|
+
"type": "Number",
|
|
468
|
+
"default": "",
|
|
469
|
+
"description": "The width of chart container."
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"name": "height",
|
|
473
|
+
"type": "Number",
|
|
474
|
+
"default": "",
|
|
475
|
+
"description": "The height of chart container."
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"name": "data",
|
|
479
|
+
"type": "Array",
|
|
480
|
+
"default": "",
|
|
481
|
+
"description": "The source data, in which each element is an object. It has the following format: [{ name: \"a\", value: 12 }] Note: for some charts, the color of the individual data is taken from the color prop: [{ name: \"a\", value: 12, color: \"color-coldplay-fountain\" }]"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"name": "dataKey",
|
|
485
|
+
"type": "String | Number | Function",
|
|
486
|
+
"default": "value",
|
|
487
|
+
"description": "The key of data displayed in the axis. Also, used as label for the x-axis."
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "dataUnit",
|
|
491
|
+
"type": "string",
|
|
492
|
+
"default": "",
|
|
493
|
+
"description": "The unit of data displayed in the chart."
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"name": "layout",
|
|
497
|
+
"type": "String",
|
|
498
|
+
"default": "horizontal",
|
|
499
|
+
"description": "The layout of the chart. Possible values are: horizontal, vertical"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "showGrid",
|
|
503
|
+
"type": "Boolean",
|
|
504
|
+
"default": "false",
|
|
505
|
+
"description": "Defines whether or not the grid shall be rendered."
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"name": "showXAxis",
|
|
509
|
+
"type": "Boolean",
|
|
510
|
+
"default": "true",
|
|
511
|
+
"description": "Defines whether or not the x-axis shall be rendered."
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"name": "showYAxis",
|
|
515
|
+
"type": "Boolean",
|
|
516
|
+
"default": "true",
|
|
517
|
+
"description": "Defines whether or not the y-axis shall be rendered."
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "xAxisOptions",
|
|
521
|
+
"type": "Object",
|
|
522
|
+
"default": "",
|
|
523
|
+
"description": "Detailed options passed to the underlying XAxis component. Details can be found here: https://recharts.org/en-US/api/XAxis"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "yAxisOptions",
|
|
527
|
+
"type": "Object",
|
|
528
|
+
"default": "",
|
|
529
|
+
"description": "Detailed options passed to the underlying YAxis component. Details can be found here: https://recharts.org/en-US/api/YAxis"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "additionalAxes",
|
|
533
|
+
"type": "React.ReactElement<XAxisProps | YAxisProps>[]",
|
|
534
|
+
"default": "",
|
|
535
|
+
"description": "Render a list of additional axes. This includes YAxis and XAxis."
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "gridOptions",
|
|
539
|
+
"type": "Object",
|
|
540
|
+
"default": "",
|
|
541
|
+
"description": "Detailed options passed to the underlying Grid component. Details can be found here: https://recharts.org/en-US/api/CartesianGrid"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"name": "useDataColors",
|
|
545
|
+
"type": "Boolean",
|
|
546
|
+
"default": "false",
|
|
547
|
+
"description": "Defines whether or not the color information shall be taken from the data input to use different colors for different entries."
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"name": "brush",
|
|
551
|
+
"type": "Boolean",
|
|
552
|
+
"default": "false",
|
|
553
|
+
"description": "Defines whether or not the brush component shall be used."
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"name": "tooltip",
|
|
557
|
+
"type": "ChartTooltip | Boolean",
|
|
558
|
+
"default": "",
|
|
559
|
+
"description": "Defines whether or not the tooltip component shall be used. You can customize the tooltip by providing a custom ChartTooltip. Prop details can be found here: https://recharts.org/en-US/api/Tooltip. You can also customize the cursor color by setting a stroke or fill color in the cursor props. Details can be found here: https://recharts.org/en-US/api/Tooltip#cursor"
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"name": "legend",
|
|
563
|
+
"type": "Legend | Boolean",
|
|
564
|
+
"default": "false",
|
|
565
|
+
"description": "Shows the provided Legend component otherwise shows nothing."
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "bars",
|
|
569
|
+
"type": "Array of Bar",
|
|
570
|
+
"default": "[]",
|
|
571
|
+
"description": "Renders the provided Bar components."
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "...",
|
|
575
|
+
"type": "",
|
|
576
|
+
"default": "",
|
|
577
|
+
"description": "Additional props are passed to the underlying BarChart component. Details can be found here: https://recharts.org/en-US/api/BarChart"
|
|
578
|
+
}
|
|
579
|
+
]
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"heading": "Bar",
|
|
583
|
+
"rows": [
|
|
584
|
+
{
|
|
585
|
+
"name": "color",
|
|
586
|
+
"type": "String",
|
|
587
|
+
"default": "color-coldplay-fountain",
|
|
588
|
+
"description": "Defines the color for the whole bar component instead of individual colors from the data. Take the color name from the charts colors page."
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "dataKey",
|
|
592
|
+
"type": "string | number | ((obj: T) => any)",
|
|
593
|
+
"default": "value",
|
|
594
|
+
"description": "The key of data used for the bar."
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "dataUnit",
|
|
598
|
+
"type": "String | Number",
|
|
599
|
+
"default": "",
|
|
600
|
+
"description": "The unit of data displayed for the bar."
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"name": "...",
|
|
604
|
+
"type": "",
|
|
605
|
+
"default": "",
|
|
606
|
+
"description": "Additional props are passed to the underlying Bar component. Details can be found here: https://recharts.org/en-US/api/Bar"
|
|
607
|
+
}
|
|
608
|
+
]
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"heading": "Legend",
|
|
612
|
+
"rows": [
|
|
613
|
+
{
|
|
614
|
+
"name": "iconType",
|
|
615
|
+
"type": "String",
|
|
616
|
+
"default": "square",
|
|
617
|
+
"description": "Defines the type of the leading icon."
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"name": "iconSize",
|
|
621
|
+
"type": "String",
|
|
622
|
+
"default": "12",
|
|
623
|
+
"description": "Defines the size of the leading icon."
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "layout",
|
|
627
|
+
"type": "String",
|
|
628
|
+
"default": "vertical",
|
|
629
|
+
"description": "Defines the layout of the legend."
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"name": "align",
|
|
633
|
+
"type": "String",
|
|
634
|
+
"default": "right",
|
|
635
|
+
"description": "Defines the alignment of the legend relative to the chart."
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "verticalAlign",
|
|
639
|
+
"type": "String",
|
|
640
|
+
"default": "top",
|
|
641
|
+
"description": "Defines the vertical alignment of the legend relative to the chart."
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "...",
|
|
645
|
+
"type": "",
|
|
646
|
+
"default": "",
|
|
647
|
+
"description": "Additional props are passed to the underlying legend component. Details can be found here: https://recharts.org/en-US/api/Legend"
|
|
648
|
+
}
|
|
649
|
+
]
|
|
650
|
+
}
|
|
651
|
+
]
|
|
652
|
+
}
|
|
653
|
+
]
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"caption": "Example 4",
|
|
657
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><label>Stacked BarChart</label><div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\"><div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\"><div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\"><svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\"><title></title><desc></desc><defs><clipPath id=\"recharts12-clip\"><rect x=\"45\" y=\"5\" height=\"208\" width=\"418\"></rect></clipPath></defs><g class=\"recharts-cartesian-grid\"><g class=\"recharts-cartesian-grid-horizontal\"><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"161\" x2=\"463\" y2=\"161\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"109\" x2=\"463\" y2=\"109\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"57\" x2=\"463\" y2=\"57\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"5\" x2=\"463\" y2=\"5\"></line></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"74.85714285714286\" y1=\"219\" x2=\"74.85714285714286\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"74.85714285714286\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"74.85714285714286\" dy=\"0.71em\">Page A</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"134.57142857142858\" y1=\"219\" x2=\"134.57142857142858\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"134.57142857142858\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"134.57142857142858\" dy=\"0.71em\">Page B</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"194.2857142857143\" y1=\"219\" x2=\"194.2857142857143\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"194.2857142857143\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"194.2857142857143\" dy=\"0.71em\">Page C</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"254\" y1=\"219\" x2=\"254\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"254\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"254\" dy=\"0.71em\">Page D</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"313.7142857142857\" y1=\"219\" x2=\"313.7142857142857\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"313.7142857142857\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"313.7142857142857\" dy=\"0.71em\">Page E</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"373.4285714285714\" y1=\"219\" x2=\"373.4285714285714\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"373.4285714285714\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"373.4285714285714\" dy=\"0.71em\">Page F</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"433.1428571428571\" y1=\"219\" x2=\"433.1428571428571\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"433.1428571428571\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"433.1428571428571\" dy=\"0.71em\">Page G</tspan></text></g></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"5\" x2=\"45\" y2=\"213\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"213\" x2=\"45\" y2=\"213\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"213\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">0</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"161\" x2=\"45\" y2=\"161\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"161\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">3000</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"109\" x2=\"45\" y2=\"109\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"109\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">6000</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"57\" x2=\"45\" y2=\"57\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"57\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">9000</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"5\" x2=\"45\" y2=\"5\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">12000</tspan></text></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g></svg><div class=\"recharts-legend-wrapper\" style=\"position: absolute; width: 458px; height: auto; left: 5px; bottom: 5px;\"><ul class=\"recharts-default-legend\" style=\"padding: 0px; margin: 0px; text-align: center;\"><li class=\"recharts-legend-item legend-item-0\" style=\"display: inline-block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#a1daa3 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(161, 218, 163);\">pv</span></li><li class=\"recharts-legend-item legend-item-1\" style=\"display: inline-block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#67abc5 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(103, 171, 197);\">uv</span></li></ul></div><div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(45px, 10px);\"><div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\"><p class=\"recharts-tooltip-label\" style=\"margin: 0px;\"></p></div></div></div></div></div></div>",
|
|
658
|
+
"tabs": [
|
|
659
|
+
{
|
|
660
|
+
"label": "React",
|
|
661
|
+
"language": "tsx",
|
|
662
|
+
"code": "import BarChart from '@rio-cloud/rio-uikit/BarChart';\nimport Bar from '@rio-cloud/rio-uikit/Bar';\nimport Legend from '@rio-cloud/rio-uikit/Legend';\n\nexport default () => {\n return (\n <>\n <label>Stacked BarChart</label>\n <div className='panel panel-default panel-body margin-bottom-0 height-300 max-width-500'>\n <BarChart\n data={data}\n dataKey='name'\n legend={<Legend layout='horizontal' verticalAlign='bottom' align='center' />}\n showGrid\n gridOptions={{ vertical: false }}\n xAxisOptions={{ dataKey: 'name' }}\n yAxisOptions={{ width: 40 }}\n bars={[\n <Bar key='pv' dataKey='pv' stackId='a' barSize={26} color='color-coldplay-moos' />,\n <Bar key='uv' dataKey='uv' stackId='a' barSize={26} color='color-coldplay-fountain' />,\n ]}\n />\n </div>\n </>\n );\n};\n\nconst data = [\n {\n name: 'Page A',\n uv: 4000,\n pv: 2400,\n },\n {\n name: 'Page B',\n uv: 3000,\n pv: 1398,\n },\n {\n name: 'Page C',\n uv: 2000,\n pv: 9800,\n },\n {\n name: 'Page D',\n uv: 2780,\n pv: 3908,\n },\n {\n name: 'Page E',\n uv: 1890,\n pv: 4800,\n },\n {\n name: 'Page F',\n uv: 2390,\n pv: 3800,\n },\n {\n name: 'Page G',\n uv: 3490,\n pv: 4300,\n },\n];"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"label": "HTML",
|
|
666
|
+
"language": "html",
|
|
667
|
+
"code": "<label>Stacked BarChart</label>\n<div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\">\n <div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\">\n <div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\">\n <svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\">\n <title>\n </title>\n <desc>\n </desc>\n <defs>\n <clipPath id=\"recharts12-clip\">\n <rect x=\"45\" y=\"5\" height=\"208\" width=\"418\">\n </rect>\n </clipPath>\n </defs>\n <g class=\"recharts-cartesian-grid\">\n <g class=\"recharts-cartesian-grid-horizontal\">\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"161\" x2=\"463\" y2=\"161\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"109\" x2=\"463\" y2=\"109\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"57\" x2=\"463\" y2=\"57\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"5\" x2=\"463\" y2=\"5\">\n </line>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"74.85714285714286\" y1=\"219\" x2=\"74.85714285714286\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"74.85714285714286\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"74.85714285714286\" dy=\"0.71em\">Page A</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"134.57142857142858\" y1=\"219\" x2=\"134.57142857142858\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"134.57142857142858\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"134.57142857142858\" dy=\"0.71em\">Page B</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"194.2857142857143\" y1=\"219\" x2=\"194.2857142857143\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"194.2857142857143\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"194.2857142857143\" dy=\"0.71em\">Page C</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"254\" y1=\"219\" x2=\"254\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"254\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"254\" dy=\"0.71em\">Page D</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"313.7142857142857\" y1=\"219\" x2=\"313.7142857142857\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"313.7142857142857\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"313.7142857142857\" dy=\"0.71em\">Page E</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"373.4285714285714\" y1=\"219\" x2=\"373.4285714285714\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"373.4285714285714\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"373.4285714285714\" dy=\"0.71em\">Page F</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"433.1428571428571\" y1=\"219\" x2=\"433.1428571428571\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"433.1428571428571\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"433.1428571428571\" dy=\"0.71em\">Page G</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"5\" x2=\"45\" y2=\"213\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"213\" x2=\"45\" y2=\"213\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"213\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">0</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"161\" x2=\"45\" y2=\"161\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"161\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">3000</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"109\" x2=\"45\" y2=\"109\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"109\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">6000</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"57\" x2=\"45\" y2=\"57\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"57\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">9000</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"5\" x2=\"45\" y2=\"5\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">12000</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"61\" y=\"171.4\" width=\"26\" height=\"41.599999999999994\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page A\" class=\"recharts-rectangle\" d=\"M 61,171.4 h 26 v 41.599999999999994 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"120.71428571428572\" y=\"188.768\" width=\"26\" height=\"24.232\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page B\" class=\"recharts-rectangle\" d=\"M 120.71428571428572,188.768 h 26 v 24.232 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"180.42857142857144\" y=\"43.133333333333326\" width=\"26\" height=\"169.86666666666667\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page C\" class=\"recharts-rectangle\" d=\"M 180.42857142857144,43.133333333333326 h 26 v 169.86666666666667 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"240.14285714285714\" y=\"145.26133333333334\" width=\"26\" height=\"67.73866666666666\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page D\" class=\"recharts-rectangle\" d=\"M 240.14285714285714,145.26133333333334 h 26 v 67.73866666666666 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"299.8571428571429\" y=\"129.8\" width=\"26\" height=\"83.19999999999999\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page E\" class=\"recharts-rectangle\" d=\"M 299.8571428571429,129.8 h 26 v 83.19999999999999 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"359.57142857142856\" y=\"147.13333333333335\" width=\"26\" height=\"65.86666666666665\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page F\" class=\"recharts-rectangle\" d=\"M 359.57142857142856,147.13333333333335 h 26 v 65.86666666666665 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"419.2857142857143\" y=\"138.46666666666664\" width=\"26\" height=\"74.53333333333336\" radius=\"0\" fill=\"#a1daa3 \" name=\"Page G\" class=\"recharts-rectangle\" d=\"M 419.2857142857143,138.46666666666664 h 26 v 74.53333333333336 h -26 Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"61\" y=\"102.06666666666668\" width=\"26\" height=\"69.33333333333333\" radius=\"0\" fill=\"#67abc5 \" name=\"Page A\" class=\"recharts-rectangle\" d=\"M 61,102.06666666666668 h 26 v 69.33333333333333 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"120.71428571428572\" y=\"136.768\" width=\"26\" height=\"52\" radius=\"0\" fill=\"#67abc5 \" name=\"Page B\" class=\"recharts-rectangle\" d=\"M 120.71428571428572,136.768 h 26 v 52 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"180.42857142857144\" y=\"8.466666666666676\" width=\"26\" height=\"34.666666666666664\" radius=\"0\" fill=\"#67abc5 \" name=\"Page C\" class=\"recharts-rectangle\" d=\"M 180.42857142857144,8.466666666666676 h 26 v 34.666666666666664 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"240.14285714285714\" y=\"97.07466666666666\" width=\"26\" height=\"48.18666666666668\" radius=\"0\" fill=\"#67abc5 \" name=\"Page D\" class=\"recharts-rectangle\" d=\"M 240.14285714285714,97.07466666666666 h 26 v 48.18666666666668 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"299.8571428571429\" y=\"97.03999999999999\" width=\"26\" height=\"32.76000000000002\" radius=\"0\" fill=\"#67abc5 \" name=\"Page E\" class=\"recharts-rectangle\" d=\"M 299.8571428571429,97.03999999999999 h 26 v 32.76000000000002 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"359.57142857142856\" y=\"105.70666666666666\" width=\"26\" height=\"41.42666666666669\" radius=\"0\" fill=\"#67abc5 \" name=\"Page F\" class=\"recharts-rectangle\" d=\"M 359.57142857142856,105.70666666666666 h 26 v 41.42666666666669 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"419.2857142857143\" y=\"77.97333333333334\" width=\"26\" height=\"60.4933333333333\" radius=\"0\" fill=\"#67abc5 \" name=\"Page G\" class=\"recharts-rectangle\" d=\"M 419.2857142857143,77.97333333333334 h 26 v 60.4933333333333 h -26 Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n </g>\n </svg>\n <div class=\"recharts-legend-wrapper\" style=\"position: absolute; width: 458px; height: auto; left: 5px; bottom: 5px;\">\n <ul class=\"recharts-default-legend\" style=\"padding: 0px; margin: 0px; text-align: center;\">\n <li class=\"recharts-legend-item legend-item-0\" style=\"display: inline-block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#a1daa3 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(161, 218, 163);\">pv</span>\n </li>\n <li class=\"recharts-legend-item legend-item-1\" style=\"display: inline-block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#67abc5 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(103, 171, 197);\">uv</span>\n </li>\n </ul>\n </div>\n <div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(45px, 10px);\">\n <div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\">\n <p class=\"recharts-tooltip-label\" style=\"margin: 0px;\">\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"label": "Props",
|
|
671
|
+
"language": "json",
|
|
672
|
+
"code": null,
|
|
673
|
+
"props": [
|
|
674
|
+
{
|
|
675
|
+
"heading": "BarChart",
|
|
676
|
+
"rows": [
|
|
677
|
+
{
|
|
678
|
+
"name": "width",
|
|
679
|
+
"type": "Number",
|
|
680
|
+
"default": "",
|
|
681
|
+
"description": "The width of chart container."
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"name": "height",
|
|
685
|
+
"type": "Number",
|
|
686
|
+
"default": "",
|
|
687
|
+
"description": "The height of chart container."
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"name": "data",
|
|
691
|
+
"type": "Array",
|
|
692
|
+
"default": "",
|
|
693
|
+
"description": "The source data, in which each element is an object. It has the following format: [{ name: \"a\", value: 12 }] Note: for some charts, the color of the individual data is taken from the color prop: [{ name: \"a\", value: 12, color: \"color-coldplay-fountain\" }]"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"name": "dataKey",
|
|
697
|
+
"type": "String | Number | Function",
|
|
698
|
+
"default": "value",
|
|
699
|
+
"description": "The key of data displayed in the axis. Also, used as label for the x-axis."
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"name": "dataUnit",
|
|
703
|
+
"type": "string",
|
|
704
|
+
"default": "",
|
|
705
|
+
"description": "The unit of data displayed in the chart."
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"name": "layout",
|
|
709
|
+
"type": "String",
|
|
710
|
+
"default": "horizontal",
|
|
711
|
+
"description": "The layout of the chart. Possible values are: horizontal, vertical"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
"name": "showGrid",
|
|
715
|
+
"type": "Boolean",
|
|
716
|
+
"default": "false",
|
|
717
|
+
"description": "Defines whether or not the grid shall be rendered."
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"name": "showXAxis",
|
|
721
|
+
"type": "Boolean",
|
|
722
|
+
"default": "true",
|
|
723
|
+
"description": "Defines whether or not the x-axis shall be rendered."
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"name": "showYAxis",
|
|
727
|
+
"type": "Boolean",
|
|
728
|
+
"default": "true",
|
|
729
|
+
"description": "Defines whether or not the y-axis shall be rendered."
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"name": "xAxisOptions",
|
|
733
|
+
"type": "Object",
|
|
734
|
+
"default": "",
|
|
735
|
+
"description": "Detailed options passed to the underlying XAxis component. Details can be found here: https://recharts.org/en-US/api/XAxis"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"name": "yAxisOptions",
|
|
739
|
+
"type": "Object",
|
|
740
|
+
"default": "",
|
|
741
|
+
"description": "Detailed options passed to the underlying YAxis component. Details can be found here: https://recharts.org/en-US/api/YAxis"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"name": "additionalAxes",
|
|
745
|
+
"type": "React.ReactElement<XAxisProps | YAxisProps>[]",
|
|
746
|
+
"default": "",
|
|
747
|
+
"description": "Render a list of additional axes. This includes YAxis and XAxis."
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"name": "gridOptions",
|
|
751
|
+
"type": "Object",
|
|
752
|
+
"default": "",
|
|
753
|
+
"description": "Detailed options passed to the underlying Grid component. Details can be found here: https://recharts.org/en-US/api/CartesianGrid"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"name": "useDataColors",
|
|
757
|
+
"type": "Boolean",
|
|
758
|
+
"default": "false",
|
|
759
|
+
"description": "Defines whether or not the color information shall be taken from the data input to use different colors for different entries."
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"name": "brush",
|
|
763
|
+
"type": "Boolean",
|
|
764
|
+
"default": "false",
|
|
765
|
+
"description": "Defines whether or not the brush component shall be used."
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"name": "tooltip",
|
|
769
|
+
"type": "ChartTooltip | Boolean",
|
|
770
|
+
"default": "",
|
|
771
|
+
"description": "Defines whether or not the tooltip component shall be used. You can customize the tooltip by providing a custom ChartTooltip. Prop details can be found here: https://recharts.org/en-US/api/Tooltip. You can also customize the cursor color by setting a stroke or fill color in the cursor props. Details can be found here: https://recharts.org/en-US/api/Tooltip#cursor"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"name": "legend",
|
|
775
|
+
"type": "Legend | Boolean",
|
|
776
|
+
"default": "false",
|
|
777
|
+
"description": "Shows the provided Legend component otherwise shows nothing."
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"name": "bars",
|
|
781
|
+
"type": "Array of Bar",
|
|
782
|
+
"default": "[]",
|
|
783
|
+
"description": "Renders the provided Bar components."
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"name": "...",
|
|
787
|
+
"type": "",
|
|
788
|
+
"default": "",
|
|
789
|
+
"description": "Additional props are passed to the underlying BarChart component. Details can be found here: https://recharts.org/en-US/api/BarChart"
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
"heading": "Bar",
|
|
795
|
+
"rows": [
|
|
796
|
+
{
|
|
797
|
+
"name": "color",
|
|
798
|
+
"type": "String",
|
|
799
|
+
"default": "color-coldplay-fountain",
|
|
800
|
+
"description": "Defines the color for the whole bar component instead of individual colors from the data. Take the color name from the charts colors page."
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"name": "dataKey",
|
|
804
|
+
"type": "string | number | ((obj: T) => any)",
|
|
805
|
+
"default": "value",
|
|
806
|
+
"description": "The key of data used for the bar."
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"name": "dataUnit",
|
|
810
|
+
"type": "String | Number",
|
|
811
|
+
"default": "",
|
|
812
|
+
"description": "The unit of data displayed for the bar."
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"name": "...",
|
|
816
|
+
"type": "",
|
|
817
|
+
"default": "",
|
|
818
|
+
"description": "Additional props are passed to the underlying Bar component. Details can be found here: https://recharts.org/en-US/api/Bar"
|
|
819
|
+
}
|
|
820
|
+
]
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"heading": "Legend",
|
|
824
|
+
"rows": [
|
|
825
|
+
{
|
|
826
|
+
"name": "iconType",
|
|
827
|
+
"type": "String",
|
|
828
|
+
"default": "square",
|
|
829
|
+
"description": "Defines the type of the leading icon."
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"name": "iconSize",
|
|
833
|
+
"type": "String",
|
|
834
|
+
"default": "12",
|
|
835
|
+
"description": "Defines the size of the leading icon."
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "layout",
|
|
839
|
+
"type": "String",
|
|
840
|
+
"default": "vertical",
|
|
841
|
+
"description": "Defines the layout of the legend."
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"name": "align",
|
|
845
|
+
"type": "String",
|
|
846
|
+
"default": "right",
|
|
847
|
+
"description": "Defines the alignment of the legend relative to the chart."
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"name": "verticalAlign",
|
|
851
|
+
"type": "String",
|
|
852
|
+
"default": "top",
|
|
853
|
+
"description": "Defines the vertical alignment of the legend relative to the chart."
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"name": "...",
|
|
857
|
+
"type": "",
|
|
858
|
+
"default": "",
|
|
859
|
+
"description": "Additional props are passed to the underlying legend component. Details can be found here: https://recharts.org/en-US/api/Legend"
|
|
860
|
+
}
|
|
861
|
+
]
|
|
862
|
+
}
|
|
863
|
+
]
|
|
864
|
+
}
|
|
865
|
+
]
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
"caption": "Basistarif",
|
|
869
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><label>Vertical BarChart</label><div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\"><div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\"><div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\"><svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\"><title></title><desc></desc><defs><clipPath id=\"recharts15-clip\"><rect x=\"15\" y=\"5\" height=\"244\" width=\"363\"></rect></clipPath></defs><g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\"><line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"15\" y1=\"249\" x2=\"378\" y2=\"249\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"15\" y1=\"255\" x2=\"15\" y2=\"249\"></line><text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"15\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"15\" dy=\"0.71em\">0</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"105.75\" y1=\"255\" x2=\"105.75\" y2=\"249\"></line><text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"105.75\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"105.75\" dy=\"0.71em\">15</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"196.5\" y1=\"255\" x2=\"196.5\" y2=\"249\"></line><text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"196.5\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"196.5\" dy=\"0.71em\">30</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"287.25\" y1=\"255\" x2=\"287.25\" y2=\"249\"></line><text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"287.25\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"287.25\" dy=\"0.71em\">45</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"378\" y1=\"255\" x2=\"378\" y2=\"249\"></line><text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"378\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"378\" dy=\"0.71em\">60</tspan></text></g></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\"><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><text orientation=\"left\" width=\"10\" height=\"244\" stroke=\"none\" x=\"-191\" y=\"35.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"-191\" dy=\"0.355em\">Basistarif</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><text orientation=\"left\" width=\"10\" height=\"244\" stroke=\"none\" x=\"-191\" y=\"96.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"-191\" dy=\"0.355em\">Diesel</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><text orientation=\"left\" width=\"10\" height=\"244\" stroke=\"none\" x=\"-191\" y=\"157.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"-191\" dy=\"0.355em\">Maut</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><text orientation=\"left\" width=\"10\" height=\"244\" stroke=\"none\" x=\"-191\" y=\"218.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"-191\" dy=\"0.355em\">Zuschläge</tspan></text></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g></svg><div class=\"recharts-legend-wrapper\" style=\"position: absolute; width: auto; height: auto; right: 5px; top: 5px;\"><ul class=\"recharts-default-legend\" style=\"padding: 0px; margin: 0px; text-align: left;\"><li class=\"recharts-legend-item legend-item-0\" style=\"display: block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#c9778d \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(201, 119, 141);\"><span class=\"text-color-dark\">Basistarif</span></span></li><li class=\"recharts-legend-item legend-item-1\" style=\"display: block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#f19588 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(241, 149, 136);\"><span class=\"text-color-dark\">Diesel</span></span></li><li class=\"recharts-legend-item legend-item-2\" style=\"display: block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#f5bb89 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(245, 187, 137);\"><span class=\"text-color-dark\">Maut</span></span></li><li class=\"recharts-legend-item legend-item-3\" style=\"display: block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#ff8e3c \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(255, 142, 60);\"><span class=\"text-color-dark\">Zuschläge</span></span></li></ul></div><div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(15px, 10px);\"><div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\"><p class=\"recharts-tooltip-label\" style=\"margin: 0px;\"></p></div></div></div></div></div></div>",
|
|
870
|
+
"tabs": [
|
|
871
|
+
{
|
|
872
|
+
"label": "React",
|
|
873
|
+
"language": "tsx",
|
|
874
|
+
"code": "import BarChart from '@rio-cloud/rio-uikit/BarChart';\nimport Bar from '@rio-cloud/rio-uikit/Bar';\nimport Legend from '@rio-cloud/rio-uikit/Legend';\n\ntype CustomData = {\n label: string;\n color: string;\n costs: number;\n};\n\nexport default () => {\n return (\n <>\n <label>Vertical BarChart</label>\n <div className='panel panel-default panel-body margin-bottom-0 height-300 max-width-500'>\n <BarChart\n data={data}\n layout='vertical'\n useDataColors\n legend={\n <Legend\n iconSize={12}\n formatter={(value: string, entry: CustomData) => {\n return <span className='text-color-dark'>{entry.label}</span>;\n }}\n />\n }\n xAxisOptions={{\n dataKey: 'costs',\n type: 'number',\n height: 14,\n }}\n yAxisOptions={{\n dataKey: 'label',\n type: 'category',\n width: 10,\n tickLine: false,\n axisLine: false,\n tickMargin: 200,\n }}\n bars={[\n <Bar\n key='costs'\n dataKey='costs'\n label={{\n position: 'right',\n formatter: (value: number) => `${value}€`,\n }}\n />,\n ]}\n />\n </div>\n </>\n );\n};\n\nconst data: CustomData[] = [\n {\n label: 'Basistarif',\n color: 'color-warmup-charm',\n costs: 46.8,\n },\n {\n label: 'Diesel',\n color: 'color-warmup-salmon',\n costs: 22.0,\n },\n {\n label: 'Maut',\n color: 'color-warmup-cherokee',\n costs: 12.4,\n },\n {\n label: 'Zuschläge',\n color: 'brand-warning',\n costs: 3.88,\n },\n];"
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"label": "HTML",
|
|
878
|
+
"language": "html",
|
|
879
|
+
"code": "<label>Vertical BarChart</label>\n<div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\">\n <div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\">\n <div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\">\n <svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\">\n <title>\n </title>\n <desc>\n </desc>\n <defs>\n <clipPath id=\"recharts15-clip\">\n <rect x=\"15\" y=\"5\" height=\"244\" width=\"363\">\n </rect>\n </clipPath>\n </defs>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\">\n <line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"15\" y1=\"249\" x2=\"378\" y2=\"249\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"15\" y1=\"255\" x2=\"15\" y2=\"249\">\n </line>\n <text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"15\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"15\" dy=\"0.71em\">0</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"105.75\" y1=\"255\" x2=\"105.75\" y2=\"249\">\n </line>\n <text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"105.75\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"105.75\" dy=\"0.71em\">15</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"196.5\" y1=\"255\" x2=\"196.5\" y2=\"249\">\n </line>\n <text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"196.5\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"196.5\" dy=\"0.71em\">30</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"287.25\" y1=\"255\" x2=\"287.25\" y2=\"249\">\n </line>\n <text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"287.25\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"287.25\" dy=\"0.71em\">45</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"363\" height=\"14\" x=\"15\" y=\"249\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"378\" y1=\"255\" x2=\"378\" y2=\"249\">\n </line>\n <text orientation=\"bottom\" width=\"363\" height=\"14\" stroke=\"none\" x=\"378\" y=\"257\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"378\" dy=\"0.71em\">60</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\">\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <text orientation=\"left\" width=\"10\" height=\"244\" stroke=\"none\" x=\"-191\" y=\"35.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"-191\" dy=\"0.355em\">Basistarif</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <text orientation=\"left\" width=\"10\" height=\"244\" stroke=\"none\" x=\"-191\" y=\"96.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"-191\" dy=\"0.355em\">Diesel</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <text orientation=\"left\" width=\"10\" height=\"244\" stroke=\"none\" x=\"-191\" y=\"157.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"-191\" dy=\"0.355em\">Maut</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <text orientation=\"left\" width=\"10\" height=\"244\" stroke=\"none\" x=\"-191\" y=\"218.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"-191\" dy=\"0.355em\">Zuschläge</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"15\" y=\"11.1\" width=\"283.14\" height=\"48\" radius=\"0\" fill=\"#c9778d \" color=\"color-warmup-charm\" class=\"recharts-rectangle\" d=\"M 15,11.1 h 283.14 v 48 h -283.14 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"15\" y=\"72.1\" width=\"133.1\" height=\"48\" radius=\"0\" fill=\"#f19588 \" color=\"color-warmup-salmon\" class=\"recharts-rectangle\" d=\"M 15,72.1 h 133.1 v 48 h -133.1 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"15\" y=\"133.1\" width=\"75.02000000000001\" height=\"48\" radius=\"0\" fill=\"#f5bb89 \" color=\"color-warmup-cherokee\" class=\"recharts-rectangle\" d=\"M 15,133.1 h 75.02000000000001 v 48 h -75.02000000000001 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"15\" y=\"194.1\" width=\"23.474000000000004\" height=\"48\" radius=\"0\" fill=\"#ff8e3c \" color=\"brand-warning\" class=\"recharts-rectangle\" d=\"M 15,194.1 h 23.474000000000004 v 48 h -23.474000000000004 Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n <g class=\"recharts-layer recharts-label-list\">\n <text offset=\"5\" color=\"color-warmup-charm\" width=\"283.14\" height=\"48\" x=\"303.14\" y=\"35.1\" class=\"recharts-text recharts-label\" text-anchor=\"start\" fill=\"#c9778d \">\n <tspan x=\"303.14\" dy=\"0.355em\">46.8€</tspan>\n </text>\n <text offset=\"5\" color=\"color-warmup-salmon\" width=\"133.1\" height=\"48\" x=\"153.1\" y=\"96.1\" class=\"recharts-text recharts-label\" text-anchor=\"start\" fill=\"#f19588 \">\n <tspan x=\"153.1\" dy=\"0.355em\">22€</tspan>\n </text>\n <text offset=\"5\" color=\"color-warmup-cherokee\" width=\"75.02000000000001\" height=\"48\" x=\"95.02000000000001\" y=\"157.1\" class=\"recharts-text recharts-label\" text-anchor=\"start\" fill=\"#f5bb89 \">\n <tspan x=\"95.02000000000001\" dy=\"0.355em\">12.4€</tspan>\n </text>\n <text offset=\"5\" color=\"brand-warning\" width=\"23.474000000000004\" height=\"48\" x=\"43.474000000000004\" y=\"218.1\" class=\"recharts-text recharts-label\" text-anchor=\"start\" fill=\"#ff8e3c \">\n <tspan x=\"43.474000000000004\" dy=\"0.355em\">3.88€</tspan>\n </text>\n </g>\n </g>\n </svg>\n <div class=\"recharts-legend-wrapper\" style=\"position: absolute; width: auto; height: auto; right: 5px; top: 5px;\">\n <ul class=\"recharts-default-legend\" style=\"padding: 0px; margin: 0px; text-align: left;\">\n <li class=\"recharts-legend-item legend-item-0\" style=\"display: block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#c9778d \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(201, 119, 141);\">\n <span class=\"text-color-dark\">Basistarif</span>\n </span>\n </li>\n <li class=\"recharts-legend-item legend-item-1\" style=\"display: block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#f19588 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(241, 149, 136);\">\n <span class=\"text-color-dark\">Diesel</span>\n </span>\n </li>\n <li class=\"recharts-legend-item legend-item-2\" style=\"display: block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#f5bb89 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(245, 187, 137);\">\n <span class=\"text-color-dark\">Maut</span>\n </span>\n </li>\n <li class=\"recharts-legend-item legend-item-3\" style=\"display: block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#ff8e3c \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(255, 142, 60);\">\n <span class=\"text-color-dark\">Zuschläge</span>\n </span>\n </li>\n </ul>\n </div>\n <div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(15px, 10px);\">\n <div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\">\n <p class=\"recharts-tooltip-label\" style=\"margin: 0px;\">\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"label": "Props",
|
|
883
|
+
"language": "json",
|
|
884
|
+
"code": null,
|
|
885
|
+
"props": [
|
|
886
|
+
{
|
|
887
|
+
"heading": "BarChart",
|
|
888
|
+
"rows": [
|
|
889
|
+
{
|
|
890
|
+
"name": "width",
|
|
891
|
+
"type": "Number",
|
|
892
|
+
"default": "",
|
|
893
|
+
"description": "The width of chart container."
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
"name": "height",
|
|
897
|
+
"type": "Number",
|
|
898
|
+
"default": "",
|
|
899
|
+
"description": "The height of chart container."
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"name": "data",
|
|
903
|
+
"type": "Array",
|
|
904
|
+
"default": "",
|
|
905
|
+
"description": "The source data, in which each element is an object. It has the following format: [{ name: \"a\", value: 12 }] Note: for some charts, the color of the individual data is taken from the color prop: [{ name: \"a\", value: 12, color: \"color-coldplay-fountain\" }]"
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"name": "dataKey",
|
|
909
|
+
"type": "String | Number | Function",
|
|
910
|
+
"default": "value",
|
|
911
|
+
"description": "The key of data displayed in the axis. Also, used as label for the x-axis."
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"name": "dataUnit",
|
|
915
|
+
"type": "string",
|
|
916
|
+
"default": "",
|
|
917
|
+
"description": "The unit of data displayed in the chart."
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "layout",
|
|
921
|
+
"type": "String",
|
|
922
|
+
"default": "horizontal",
|
|
923
|
+
"description": "The layout of the chart. Possible values are: horizontal, vertical"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "showGrid",
|
|
927
|
+
"type": "Boolean",
|
|
928
|
+
"default": "false",
|
|
929
|
+
"description": "Defines whether or not the grid shall be rendered."
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"name": "showXAxis",
|
|
933
|
+
"type": "Boolean",
|
|
934
|
+
"default": "true",
|
|
935
|
+
"description": "Defines whether or not the x-axis shall be rendered."
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"name": "showYAxis",
|
|
939
|
+
"type": "Boolean",
|
|
940
|
+
"default": "true",
|
|
941
|
+
"description": "Defines whether or not the y-axis shall be rendered."
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "xAxisOptions",
|
|
945
|
+
"type": "Object",
|
|
946
|
+
"default": "",
|
|
947
|
+
"description": "Detailed options passed to the underlying XAxis component. Details can be found here: https://recharts.org/en-US/api/XAxis"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"name": "yAxisOptions",
|
|
951
|
+
"type": "Object",
|
|
952
|
+
"default": "",
|
|
953
|
+
"description": "Detailed options passed to the underlying YAxis component. Details can be found here: https://recharts.org/en-US/api/YAxis"
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"name": "additionalAxes",
|
|
957
|
+
"type": "React.ReactElement<XAxisProps | YAxisProps>[]",
|
|
958
|
+
"default": "",
|
|
959
|
+
"description": "Render a list of additional axes. This includes YAxis and XAxis."
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"name": "gridOptions",
|
|
963
|
+
"type": "Object",
|
|
964
|
+
"default": "",
|
|
965
|
+
"description": "Detailed options passed to the underlying Grid component. Details can be found here: https://recharts.org/en-US/api/CartesianGrid"
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
"name": "useDataColors",
|
|
969
|
+
"type": "Boolean",
|
|
970
|
+
"default": "false",
|
|
971
|
+
"description": "Defines whether or not the color information shall be taken from the data input to use different colors for different entries."
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"name": "brush",
|
|
975
|
+
"type": "Boolean",
|
|
976
|
+
"default": "false",
|
|
977
|
+
"description": "Defines whether or not the brush component shall be used."
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"name": "tooltip",
|
|
981
|
+
"type": "ChartTooltip | Boolean",
|
|
982
|
+
"default": "",
|
|
983
|
+
"description": "Defines whether or not the tooltip component shall be used. You can customize the tooltip by providing a custom ChartTooltip. Prop details can be found here: https://recharts.org/en-US/api/Tooltip. You can also customize the cursor color by setting a stroke or fill color in the cursor props. Details can be found here: https://recharts.org/en-US/api/Tooltip#cursor"
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"name": "legend",
|
|
987
|
+
"type": "Legend | Boolean",
|
|
988
|
+
"default": "false",
|
|
989
|
+
"description": "Shows the provided Legend component otherwise shows nothing."
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
"name": "bars",
|
|
993
|
+
"type": "Array of Bar",
|
|
994
|
+
"default": "[]",
|
|
995
|
+
"description": "Renders the provided Bar components."
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
"name": "...",
|
|
999
|
+
"type": "",
|
|
1000
|
+
"default": "",
|
|
1001
|
+
"description": "Additional props are passed to the underlying BarChart component. Details can be found here: https://recharts.org/en-US/api/BarChart"
|
|
1002
|
+
}
|
|
1003
|
+
]
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"heading": "Bar",
|
|
1007
|
+
"rows": [
|
|
1008
|
+
{
|
|
1009
|
+
"name": "color",
|
|
1010
|
+
"type": "String",
|
|
1011
|
+
"default": "color-coldplay-fountain",
|
|
1012
|
+
"description": "Defines the color for the whole bar component instead of individual colors from the data. Take the color name from the charts colors page."
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"name": "dataKey",
|
|
1016
|
+
"type": "string | number | ((obj: T) => any)",
|
|
1017
|
+
"default": "value",
|
|
1018
|
+
"description": "The key of data used for the bar."
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"name": "dataUnit",
|
|
1022
|
+
"type": "String | Number",
|
|
1023
|
+
"default": "",
|
|
1024
|
+
"description": "The unit of data displayed for the bar."
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"name": "...",
|
|
1028
|
+
"type": "",
|
|
1029
|
+
"default": "",
|
|
1030
|
+
"description": "Additional props are passed to the underlying Bar component. Details can be found here: https://recharts.org/en-US/api/Bar"
|
|
1031
|
+
}
|
|
1032
|
+
]
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"heading": "Legend",
|
|
1036
|
+
"rows": [
|
|
1037
|
+
{
|
|
1038
|
+
"name": "iconType",
|
|
1039
|
+
"type": "String",
|
|
1040
|
+
"default": "square",
|
|
1041
|
+
"description": "Defines the type of the leading icon."
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"name": "iconSize",
|
|
1045
|
+
"type": "String",
|
|
1046
|
+
"default": "12",
|
|
1047
|
+
"description": "Defines the size of the leading icon."
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"name": "layout",
|
|
1051
|
+
"type": "String",
|
|
1052
|
+
"default": "vertical",
|
|
1053
|
+
"description": "Defines the layout of the legend."
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"name": "align",
|
|
1057
|
+
"type": "String",
|
|
1058
|
+
"default": "right",
|
|
1059
|
+
"description": "Defines the alignment of the legend relative to the chart."
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"name": "verticalAlign",
|
|
1063
|
+
"type": "String",
|
|
1064
|
+
"default": "top",
|
|
1065
|
+
"description": "Defines the vertical alignment of the legend relative to the chart."
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"name": "...",
|
|
1069
|
+
"type": "",
|
|
1070
|
+
"default": "",
|
|
1071
|
+
"description": "Additional props are passed to the underlying legend component. Details can be found here: https://recharts.org/en-US/api/Legend"
|
|
1072
|
+
}
|
|
1073
|
+
]
|
|
1074
|
+
}
|
|
1075
|
+
]
|
|
1076
|
+
}
|
|
1077
|
+
]
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"caption": "Example 6",
|
|
1081
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><label>BarChart with custom Tooltips</label><div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\"><div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\"><div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\"><svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\"><title></title><desc></desc><defs><clipPath id=\"recharts18-clip\"><rect x=\"45\" y=\"5\" height=\"208\" width=\"418\"></rect></clipPath></defs><g class=\"recharts-cartesian-grid\"><g class=\"recharts-cartesian-grid-horizontal\"><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"161\" x2=\"463\" y2=\"161\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"109\" x2=\"463\" y2=\"109\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"57\" x2=\"463\" y2=\"57\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"5\" x2=\"463\" y2=\"5\"></line></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"74.85714285714286\" y1=\"219\" x2=\"74.85714285714286\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"74.85714285714286\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"74.85714285714286\" dy=\"0.71em\">Truck A</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"134.57142857142858\" y1=\"219\" x2=\"134.57142857142858\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"134.57142857142858\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"134.57142857142858\" dy=\"0.71em\">Truck B</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"194.2857142857143\" y1=\"219\" x2=\"194.2857142857143\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"194.2857142857143\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"194.2857142857143\" dy=\"0.71em\">Truck C</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"254\" y1=\"219\" x2=\"254\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"254\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"254\" dy=\"0.71em\">Truck D</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"313.7142857142857\" y1=\"219\" x2=\"313.7142857142857\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"313.7142857142857\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"313.7142857142857\" dy=\"0.71em\">Truck E</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"373.4285714285714\" y1=\"219\" x2=\"373.4285714285714\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"373.4285714285714\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"373.4285714285714\" dy=\"0.71em\">Truck F</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"433.1428571428571\" y1=\"219\" x2=\"433.1428571428571\" y2=\"213\"></line><text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"433.1428571428571\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"433.1428571428571\" dy=\"0.71em\">Truck G</tspan></text></g></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"5\" x2=\"45\" y2=\"213\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"213\" x2=\"45\" y2=\"213\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"213\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">0</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"161\" x2=\"45\" y2=\"161\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"161\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">3000</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"109\" x2=\"45\" y2=\"109\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"109\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">6000</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"57\" x2=\"45\" y2=\"57\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"57\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">9000</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"5\" x2=\"45\" y2=\"5\"></line><text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"37\" dy=\"0.355em\">12000</tspan></text></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g></svg><div class=\"recharts-legend-wrapper\" style=\"position: absolute; width: 458px; height: auto; left: 5px; bottom: 5px;\"><ul class=\"recharts-default-legend\" style=\"padding: 0px; margin: 0px; text-align: center;\"><li class=\"recharts-legend-item legend-item-0\" style=\"display: inline-block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#268897 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(38, 136, 151);\">pv</span></li><li class=\"recharts-legend-item legend-item-1\" style=\"display: inline-block; margin-right: 10px;\"><svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\"><title></title><desc></desc><path fill=\"#30b4c0 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\"></path></svg><span class=\"recharts-legend-item-text\" style=\"color: rgb(48, 180, 192);\">uv</span></li></ul></div><div tabindex=\"-1\" class=\"recharts-tooltip-wrapper\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px;\"></div></div></div></div></div>",
|
|
1082
|
+
"tabs": [
|
|
1083
|
+
{
|
|
1084
|
+
"label": "React",
|
|
1085
|
+
"language": "tsx",
|
|
1086
|
+
"code": "import BarChart from '@rio-cloud/rio-uikit/BarChart';\nimport Bar from '@rio-cloud/rio-uikit/Bar';\nimport Legend from '@rio-cloud/rio-uikit/Legend';\nimport ChartTooltip from '@rio-cloud/rio-uikit/ChartTooltip';\n\n// biome-ignore lint/suspicious/noExplicitAny: <explanation>\nconst CustomTooltip = ({ active, payload }: { active?: boolean; payload?: any }) => {\n if (!active) {\n return null;\n }\n\n const firstValue = payload[0].value;\n const secondValue = payload[1].value;\n const totalValue = firstValue + secondValue;\n\n return (\n <div className='custom-tooltip bg-white border padding-10 min-width-100 rounded shadow-smooth'>\n <div className='display-flex justify-content-between gap-20'>\n <span className='text-color-dark'>20.06.2022</span>\n <span className='display-flex align-items-center text-color-darker line-height-12'>\n <span className='rioglyph rioglyph-truck' />\n <span className='margin-left-2'>{payload.length}</span>\n </span>\n </div>\n <hr className='margin-y-5' />\n <div>\n <div className='display-flex'>\n <span className='width-10' />\n <span className='text-color-highlight-dark'>{`${firstValue} km`}</span>\n </div>\n <div className='display-flex'>\n <span className='width-10 text-center text-color-highlight'>+</span>\n <span className='text-color-highlight'>{`${secondValue} km`}</span>\n </div>\n <div className='display-flex border border-top-only border-color-lightest'>\n <span className='width-10 text-center text-color-highlight-darkest'>=</span>\n <span className='text-color-highlight-darkest'>{`${totalValue} km`}</span>\n </div>\n </div>\n </div>\n );\n};\n\nexport default () => (\n <>\n <label>BarChart with custom Tooltips</label>\n <div className='panel panel-default panel-body margin-bottom-0 height-300 max-width-500'>\n <BarChart\n data={data}\n dataKey='name'\n legend={<Legend layout='horizontal' verticalAlign='bottom' align='center' />}\n showGrid\n gridOptions={{ vertical: false }}\n xAxisOptions={{ dataKey: 'name' }}\n yAxisOptions={{ width: 40 }}\n bars={[\n <Bar key='pv' dataKey='pv' stackId='a' barSize={26} color='color-highlight-dark' />,\n <Bar key='uv' dataKey='uv' stackId='a' barSize={26} color='color-highlight' />,\n ]}\n tooltip={<ChartTooltip content={<CustomTooltip />} cursor={{ fill: '#ebf9fa80' }} />}\n />\n </div>\n </>\n);\n\nconst data = [\n {\n name: 'Truck A',\n uv: 4000,\n pv: 2400,\n },\n {\n name: 'Truck B',\n uv: 3000,\n pv: 1398,\n },\n {\n name: 'Truck C',\n uv: 2000,\n pv: 9800,\n },\n {\n name: 'Truck D',\n uv: 2780,\n pv: 3908,\n },\n {\n name: 'Truck E',\n uv: 1890,\n pv: 4800,\n },\n {\n name: 'Truck F',\n uv: 2390,\n pv: 3800,\n },\n {\n name: 'Truck G',\n uv: 3490,\n pv: 4300,\n },\n];"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"label": "HTML",
|
|
1090
|
+
"language": "html",
|
|
1091
|
+
"code": "<label>BarChart with custom Tooltips</label>\n<div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\">\n <div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\">\n <div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\">\n <svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\">\n <title>\n </title>\n <desc>\n </desc>\n <defs>\n <clipPath id=\"recharts18-clip\">\n <rect x=\"45\" y=\"5\" height=\"208\" width=\"418\">\n </rect>\n </clipPath>\n </defs>\n <g class=\"recharts-cartesian-grid\">\n <g class=\"recharts-cartesian-grid-horizontal\">\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"161\" x2=\"463\" y2=\"161\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"109\" x2=\"463\" y2=\"109\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"57\" x2=\"463\" y2=\"57\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"45\" y=\"5\" width=\"418\" height=\"208\" x1=\"45\" y1=\"5\" x2=\"463\" y2=\"5\">\n </line>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"213\" x2=\"463\" y2=\"213\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"74.85714285714286\" y1=\"219\" x2=\"74.85714285714286\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"74.85714285714286\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"74.85714285714286\" dy=\"0.71em\">Truck A</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"134.57142857142858\" y1=\"219\" x2=\"134.57142857142858\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"134.57142857142858\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"134.57142857142858\" dy=\"0.71em\">Truck B</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"194.2857142857143\" y1=\"219\" x2=\"194.2857142857143\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"194.2857142857143\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"194.2857142857143\" dy=\"0.71em\">Truck C</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"254\" y1=\"219\" x2=\"254\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"254\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"254\" dy=\"0.71em\">Truck D</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"313.7142857142857\" y1=\"219\" x2=\"313.7142857142857\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"313.7142857142857\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"313.7142857142857\" dy=\"0.71em\">Truck E</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"373.4285714285714\" y1=\"219\" x2=\"373.4285714285714\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"373.4285714285714\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"373.4285714285714\" dy=\"0.71em\">Truck F</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"418\" height=\"30\" x=\"45\" y=\"213\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"433.1428571428571\" y1=\"219\" x2=\"433.1428571428571\" y2=\"213\">\n </line>\n <text orientation=\"bottom\" width=\"418\" height=\"30\" stroke=\"none\" x=\"433.1428571428571\" y=\"221\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"433.1428571428571\" dy=\"0.71em\">Truck G</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"45\" y1=\"5\" x2=\"45\" y2=\"213\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"213\" x2=\"45\" y2=\"213\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"213\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">0</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"161\" x2=\"45\" y2=\"161\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"161\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">3000</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"109\" x2=\"45\" y2=\"109\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"109\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">6000</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"57\" x2=\"45\" y2=\"57\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"57\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">9000</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"40\" height=\"208\" x=\"5\" y=\"5\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"39\" y1=\"5\" x2=\"45\" y2=\"5\">\n </line>\n <text orientation=\"left\" width=\"40\" height=\"208\" stroke=\"none\" x=\"37\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"37\" dy=\"0.355em\">12000</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"61\" y=\"171.4\" width=\"26\" height=\"41.599999999999994\" radius=\"0\" fill=\"#268897 \" name=\"Truck A\" class=\"recharts-rectangle\" d=\"M 61,171.4 h 26 v 41.599999999999994 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"120.71428571428572\" y=\"188.768\" width=\"26\" height=\"24.232\" radius=\"0\" fill=\"#268897 \" name=\"Truck B\" class=\"recharts-rectangle\" d=\"M 120.71428571428572,188.768 h 26 v 24.232 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"180.42857142857144\" y=\"43.133333333333326\" width=\"26\" height=\"169.86666666666667\" radius=\"0\" fill=\"#268897 \" name=\"Truck C\" class=\"recharts-rectangle\" d=\"M 180.42857142857144,43.133333333333326 h 26 v 169.86666666666667 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"240.14285714285714\" y=\"145.26133333333334\" width=\"26\" height=\"67.73866666666666\" radius=\"0\" fill=\"#268897 \" name=\"Truck D\" class=\"recharts-rectangle\" d=\"M 240.14285714285714,145.26133333333334 h 26 v 67.73866666666666 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"299.8571428571429\" y=\"129.8\" width=\"26\" height=\"83.19999999999999\" radius=\"0\" fill=\"#268897 \" name=\"Truck E\" class=\"recharts-rectangle\" d=\"M 299.8571428571429,129.8 h 26 v 83.19999999999999 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"359.57142857142856\" y=\"147.13333333333335\" width=\"26\" height=\"65.86666666666665\" radius=\"0\" fill=\"#268897 \" name=\"Truck F\" class=\"recharts-rectangle\" d=\"M 359.57142857142856,147.13333333333335 h 26 v 65.86666666666665 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"419.2857142857143\" y=\"138.46666666666664\" width=\"26\" height=\"74.53333333333336\" radius=\"0\" fill=\"#268897 \" name=\"Truck G\" class=\"recharts-rectangle\" d=\"M 419.2857142857143,138.46666666666664 h 26 v 74.53333333333336 h -26 Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"61\" y=\"102.06666666666668\" width=\"26\" height=\"69.33333333333333\" radius=\"0\" fill=\"#30b4c0 \" name=\"Truck A\" class=\"recharts-rectangle\" d=\"M 61,102.06666666666668 h 26 v 69.33333333333333 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"120.71428571428572\" y=\"136.768\" width=\"26\" height=\"52\" radius=\"0\" fill=\"#30b4c0 \" name=\"Truck B\" class=\"recharts-rectangle\" d=\"M 120.71428571428572,136.768 h 26 v 52 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"180.42857142857144\" y=\"8.466666666666676\" width=\"26\" height=\"34.666666666666664\" radius=\"0\" fill=\"#30b4c0 \" name=\"Truck C\" class=\"recharts-rectangle\" d=\"M 180.42857142857144,8.466666666666676 h 26 v 34.666666666666664 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"240.14285714285714\" y=\"97.07466666666666\" width=\"26\" height=\"48.18666666666668\" radius=\"0\" fill=\"#30b4c0 \" name=\"Truck D\" class=\"recharts-rectangle\" d=\"M 240.14285714285714,97.07466666666666 h 26 v 48.18666666666668 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"299.8571428571429\" y=\"97.03999999999999\" width=\"26\" height=\"32.76000000000002\" radius=\"0\" fill=\"#30b4c0 \" name=\"Truck E\" class=\"recharts-rectangle\" d=\"M 299.8571428571429,97.03999999999999 h 26 v 32.76000000000002 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"359.57142857142856\" y=\"105.70666666666666\" width=\"26\" height=\"41.42666666666669\" radius=\"0\" fill=\"#30b4c0 \" name=\"Truck F\" class=\"recharts-rectangle\" d=\"M 359.57142857142856,105.70666666666666 h 26 v 41.42666666666669 h -26 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"419.2857142857143\" y=\"77.97333333333334\" width=\"26\" height=\"60.4933333333333\" radius=\"0\" fill=\"#30b4c0 \" name=\"Truck G\" class=\"recharts-rectangle\" d=\"M 419.2857142857143,77.97333333333334 h 26 v 60.4933333333333 h -26 Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n </g>\n </svg>\n <div class=\"recharts-legend-wrapper\" style=\"position: absolute; width: 458px; height: auto; left: 5px; bottom: 5px;\">\n <ul class=\"recharts-default-legend\" style=\"padding: 0px; margin: 0px; text-align: center;\">\n <li class=\"recharts-legend-item legend-item-0\" style=\"display: inline-block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#268897 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(38, 136, 151);\">pv</span>\n </li>\n <li class=\"recharts-legend-item legend-item-1\" style=\"display: inline-block; margin-right: 10px;\">\n <svg class=\"recharts-surface\" width=\"12\" height=\"12\" viewBox=\"0 0 32 32\" style=\"display: inline-block; vertical-align: middle; margin-right: 4px;\">\n <title>\n </title>\n <desc>\n </desc>\n <path fill=\"#30b4c0 \" cx=\"16\" cy=\"16\" class=\"recharts-symbols\" transform=\"translate(16, 16)\" d=\"M16,0A16,16,0,1,1,-16,0A16,16,0,1,1,16,0\">\n </path>\n </svg>\n <span class=\"recharts-legend-item-text\" style=\"color: rgb(48, 180, 192);\">uv</span>\n </li>\n </ul>\n </div>\n <div tabindex=\"-1\" class=\"recharts-tooltip-wrapper\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px;\">\n </div>\n </div>\n </div>\n</div>"
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"label": "Props",
|
|
1095
|
+
"language": "json",
|
|
1096
|
+
"code": null,
|
|
1097
|
+
"props": [
|
|
1098
|
+
{
|
|
1099
|
+
"heading": "BarChart",
|
|
1100
|
+
"rows": [
|
|
1101
|
+
{
|
|
1102
|
+
"name": "width",
|
|
1103
|
+
"type": "Number",
|
|
1104
|
+
"default": "",
|
|
1105
|
+
"description": "The width of chart container."
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
"name": "height",
|
|
1109
|
+
"type": "Number",
|
|
1110
|
+
"default": "",
|
|
1111
|
+
"description": "The height of chart container."
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"name": "data",
|
|
1115
|
+
"type": "Array",
|
|
1116
|
+
"default": "",
|
|
1117
|
+
"description": "The source data, in which each element is an object. It has the following format: [{ name: \"a\", value: 12 }] Note: for some charts, the color of the individual data is taken from the color prop: [{ name: \"a\", value: 12, color: \"color-coldplay-fountain\" }]"
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
"name": "dataKey",
|
|
1121
|
+
"type": "String | Number | Function",
|
|
1122
|
+
"default": "value",
|
|
1123
|
+
"description": "The key of data displayed in the axis. Also, used as label for the x-axis."
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
"name": "dataUnit",
|
|
1127
|
+
"type": "string",
|
|
1128
|
+
"default": "",
|
|
1129
|
+
"description": "The unit of data displayed in the chart."
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"name": "layout",
|
|
1133
|
+
"type": "String",
|
|
1134
|
+
"default": "horizontal",
|
|
1135
|
+
"description": "The layout of the chart. Possible values are: horizontal, vertical"
|
|
1136
|
+
},
|
|
1137
|
+
{
|
|
1138
|
+
"name": "showGrid",
|
|
1139
|
+
"type": "Boolean",
|
|
1140
|
+
"default": "false",
|
|
1141
|
+
"description": "Defines whether or not the grid shall be rendered."
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"name": "showXAxis",
|
|
1145
|
+
"type": "Boolean",
|
|
1146
|
+
"default": "true",
|
|
1147
|
+
"description": "Defines whether or not the x-axis shall be rendered."
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"name": "showYAxis",
|
|
1151
|
+
"type": "Boolean",
|
|
1152
|
+
"default": "true",
|
|
1153
|
+
"description": "Defines whether or not the y-axis shall be rendered."
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
"name": "xAxisOptions",
|
|
1157
|
+
"type": "Object",
|
|
1158
|
+
"default": "",
|
|
1159
|
+
"description": "Detailed options passed to the underlying XAxis component. Details can be found here: https://recharts.org/en-US/api/XAxis"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
"name": "yAxisOptions",
|
|
1163
|
+
"type": "Object",
|
|
1164
|
+
"default": "",
|
|
1165
|
+
"description": "Detailed options passed to the underlying YAxis component. Details can be found here: https://recharts.org/en-US/api/YAxis"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
"name": "additionalAxes",
|
|
1169
|
+
"type": "React.ReactElement<XAxisProps | YAxisProps>[]",
|
|
1170
|
+
"default": "",
|
|
1171
|
+
"description": "Render a list of additional axes. This includes YAxis and XAxis."
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"name": "gridOptions",
|
|
1175
|
+
"type": "Object",
|
|
1176
|
+
"default": "",
|
|
1177
|
+
"description": "Detailed options passed to the underlying Grid component. Details can be found here: https://recharts.org/en-US/api/CartesianGrid"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"name": "useDataColors",
|
|
1181
|
+
"type": "Boolean",
|
|
1182
|
+
"default": "false",
|
|
1183
|
+
"description": "Defines whether or not the color information shall be taken from the data input to use different colors for different entries."
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"name": "brush",
|
|
1187
|
+
"type": "Boolean",
|
|
1188
|
+
"default": "false",
|
|
1189
|
+
"description": "Defines whether or not the brush component shall be used."
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"name": "tooltip",
|
|
1193
|
+
"type": "ChartTooltip | Boolean",
|
|
1194
|
+
"default": "",
|
|
1195
|
+
"description": "Defines whether or not the tooltip component shall be used. You can customize the tooltip by providing a custom ChartTooltip. Prop details can be found here: https://recharts.org/en-US/api/Tooltip. You can also customize the cursor color by setting a stroke or fill color in the cursor props. Details can be found here: https://recharts.org/en-US/api/Tooltip#cursor"
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"name": "legend",
|
|
1199
|
+
"type": "Legend | Boolean",
|
|
1200
|
+
"default": "false",
|
|
1201
|
+
"description": "Shows the provided Legend component otherwise shows nothing."
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"name": "bars",
|
|
1205
|
+
"type": "Array of Bar",
|
|
1206
|
+
"default": "[]",
|
|
1207
|
+
"description": "Renders the provided Bar components."
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "...",
|
|
1211
|
+
"type": "",
|
|
1212
|
+
"default": "",
|
|
1213
|
+
"description": "Additional props are passed to the underlying BarChart component. Details can be found here: https://recharts.org/en-US/api/BarChart"
|
|
1214
|
+
}
|
|
1215
|
+
]
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"heading": "Bar",
|
|
1219
|
+
"rows": [
|
|
1220
|
+
{
|
|
1221
|
+
"name": "color",
|
|
1222
|
+
"type": "String",
|
|
1223
|
+
"default": "color-coldplay-fountain",
|
|
1224
|
+
"description": "Defines the color for the whole bar component instead of individual colors from the data. Take the color name from the charts colors page."
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"name": "dataKey",
|
|
1228
|
+
"type": "string | number | ((obj: T) => any)",
|
|
1229
|
+
"default": "value",
|
|
1230
|
+
"description": "The key of data used for the bar."
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
"name": "dataUnit",
|
|
1234
|
+
"type": "String | Number",
|
|
1235
|
+
"default": "",
|
|
1236
|
+
"description": "The unit of data displayed for the bar."
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
"name": "...",
|
|
1240
|
+
"type": "",
|
|
1241
|
+
"default": "",
|
|
1242
|
+
"description": "Additional props are passed to the underlying Bar component. Details can be found here: https://recharts.org/en-US/api/Bar"
|
|
1243
|
+
}
|
|
1244
|
+
]
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"heading": "Legend",
|
|
1248
|
+
"rows": [
|
|
1249
|
+
{
|
|
1250
|
+
"name": "iconType",
|
|
1251
|
+
"type": "String",
|
|
1252
|
+
"default": "square",
|
|
1253
|
+
"description": "Defines the type of the leading icon."
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"name": "iconSize",
|
|
1257
|
+
"type": "String",
|
|
1258
|
+
"default": "12",
|
|
1259
|
+
"description": "Defines the size of the leading icon."
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
"name": "layout",
|
|
1263
|
+
"type": "String",
|
|
1264
|
+
"default": "vertical",
|
|
1265
|
+
"description": "Defines the layout of the legend."
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"name": "align",
|
|
1269
|
+
"type": "String",
|
|
1270
|
+
"default": "right",
|
|
1271
|
+
"description": "Defines the alignment of the legend relative to the chart."
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"name": "verticalAlign",
|
|
1275
|
+
"type": "String",
|
|
1276
|
+
"default": "top",
|
|
1277
|
+
"description": "Defines the vertical alignment of the legend relative to the chart."
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"name": "...",
|
|
1281
|
+
"type": "",
|
|
1282
|
+
"default": "",
|
|
1283
|
+
"description": "Additional props are passed to the underlying legend component. Details can be found here: https://recharts.org/en-US/api/Legend"
|
|
1284
|
+
}
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
]
|
|
1288
|
+
}
|
|
1289
|
+
]
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"caption": "Example 7",
|
|
1293
|
+
"rendered_html": "<div class=\"playground-content bg-white padding-20 padding-bottom-25\" style=\"width: 100%;\"><label>Multiple axis BarChart</label><div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\"><div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\"><div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\"><svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\"><title></title><desc></desc><defs><clipPath id=\"recharts21-clip\"><rect x=\"60\" y=\"0\" height=\"193\" width=\"408\"></rect></clipPath></defs><g class=\"recharts-cartesian-grid\"><g class=\"recharts-cartesian-grid-horizontal\"><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"193\" x2=\"468\" y2=\"193\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"144.75\" x2=\"468\" y2=\"144.75\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"96.5\" x2=\"468\" y2=\"96.5\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"48.25\" x2=\"468\" y2=\"48.25\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"0\" x2=\"468\" y2=\"0\"></line></g><g class=\"recharts-cartesian-grid-vertical\"><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"94\" y1=\"0\" x2=\"94\" y2=\"193\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"162\" y1=\"0\" x2=\"162\" y2=\"193\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"230\" y1=\"0\" x2=\"230\" y2=\"193\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"298\" y1=\"0\" x2=\"298\" y2=\"193\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"366\" y1=\"0\" x2=\"366\" y2=\"193\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"434\" y1=\"0\" x2=\"434\" y2=\"193\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"0\" x2=\"60\" y2=\"193\"></line><line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"468\" y1=\"0\" x2=\"468\" y2=\"193\"></line></g></g><g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"193\" x2=\"468\" y2=\"193\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"94\" y1=\"199\" x2=\"94\" y2=\"193\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"94\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"94\" dy=\"0.71em\">January</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"162\" y1=\"199\" x2=\"162\" y2=\"193\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"162\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"162\" dy=\"0.71em\">February</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"230\" y1=\"199\" x2=\"230\" y2=\"193\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"230\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"230\" dy=\"0.71em\">March</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"298\" y1=\"199\" x2=\"298\" y2=\"193\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"298\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"298\" dy=\"0.71em\">April</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"366\" y1=\"199\" x2=\"366\" y2=\"193\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"366\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"366\" dy=\"0.71em\">May</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"434\" y1=\"199\" x2=\"434\" y2=\"193\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"434\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"434\" dy=\"0.71em\">June</tspan></text></g></g><text offset=\"30\" x=\"264\" y=\"253\" class=\"recharts-text recharts-label\" text-anchor=\"middle\" fill=\"#808080\"><tspan x=\"264\" dy=\"0.71em\">Timerange</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\"><line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"0\" x2=\"60\" y2=\"193\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"193\" x2=\"60\" y2=\"193\"></line><text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"193\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">0 €</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"144.75\" x2=\"60\" y2=\"144.75\"></line><text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"144.75\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">15 €</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"96.5\" x2=\"60\" y2=\"96.5\"></line><text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"96.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">30 €</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"48.25\" x2=\"60\" y2=\"48.25\"></line><text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"48.25\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">45 €</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"0\" x2=\"60\" y2=\"0\"></line><text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\"><tspan x=\"52\" dy=\"0.355em\">60 €</tspan></text></g></g><text offset=\"5\" transform=\"rotate(-90, 5, 96.5)\" x=\"5\" y=\"96.5\" class=\"recharts-text recharts-label\" text-anchor=\"start\" fill=\"#808080\"><tspan x=\"5\" dy=\"0.355em\">Costs</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"223\" x2=\"468\" y2=\"223\"></line><g class=\"recharts-cartesian-axis-ticks\"><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"94\" y1=\"229\" x2=\"94\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"94\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"94\" dy=\"0.71em\">Q1</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"162\" y1=\"229\" x2=\"162\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"162\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"162\" dy=\"0.71em\">Q1</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"230\" y1=\"229\" x2=\"230\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"230\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"230\" dy=\"0.71em\">Q1</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"298\" y1=\"229\" x2=\"298\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"298\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"298\" dy=\"0.71em\">Q2</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"366\" y1=\"229\" x2=\"366\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"366\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"366\" dy=\"0.71em\">Q2</tspan></text></g><g class=\"recharts-layer recharts-cartesian-axis-tick\"><line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"434\" y1=\"229\" x2=\"434\" y2=\"223\"></line><text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"434\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\"><tspan x=\"434\" dy=\"0.71em\">Q2</tspan></text></g></g></g><g class=\"recharts-layer recharts-bar\"><g class=\"recharts-layer recharts-bar-rectangles\"><g class=\"recharts-layer\"><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g><g class=\"recharts-layer recharts-bar-rectangle\"></g></g></g></g></svg><div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(60px, 10px);\"><div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\"><p class=\"recharts-tooltip-label\" style=\"margin: 0px;\"></p></div></div></div></div></div></div>",
|
|
1294
|
+
"tabs": [
|
|
1295
|
+
{
|
|
1296
|
+
"label": "React",
|
|
1297
|
+
"language": "tsx",
|
|
1298
|
+
"code": "import BarChart from '@rio-cloud/rio-uikit/BarChart';\nimport Bar from '@rio-cloud/rio-uikit/Bar';\nimport XAxis from '@rio-cloud/rio-uikit/XAxis';\n\nexport default () => {\n return (\n <>\n <label>Multiple axis BarChart</label>\n <div className='panel panel-default panel-body margin-bottom-0 height-300 max-width-500'>\n <BarChart\n data={data}\n dataKey='label'\n showGrid\n xAxisOptions={{\n dataKey: 'label',\n label: { value: 'Timerange', offset: 30, position: 'bottom' },\n }}\n yAxisOptions={{\n unit: ' €',\n label: { value: 'Costs', angle: -90, position: 'insideLeft' },\n }}\n margin={{ bottom: 15 }}\n bars={[<Bar key='myBar' dataKey='costs' unit='€' />]}\n additionalAxes={[\n <XAxis key='quarterAxis' xAxisId='quarterAxis' dataKey='quarter' orientation='bottom' />,\n ]}\n />\n </div>\n </>\n );\n};\n\nconst data = [\n { label: 'January', costs: 46.8, quarter: 'Q1' },\n { label: 'February', costs: 22.0, quarter: 'Q1' },\n { label: 'March', costs: 12.4, quarter: 'Q1' },\n { label: 'April', costs: 3.88, quarter: 'Q2' },\n { label: 'May', costs: 3.23, quarter: 'Q2' },\n { label: 'June', costs: 4.67, quarter: 'Q2' },\n];"
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"label": "HTML",
|
|
1302
|
+
"language": "html",
|
|
1303
|
+
"code": "<label>Multiple axis BarChart</label>\n<div class=\"panel panel-default panel-body margin-bottom-0 height-300 max-width-500\">\n <div class=\"recharts-responsive-container\" style=\"width: 100%; height: 100%; min-width: 0px;\">\n <div class=\"recharts-wrapper\" style=\"position: relative; cursor: default; width: 100%; height: 100%; max-height: 268px; max-width: 468px;\">\n <svg class=\"recharts-surface\" width=\"468\" height=\"268\" viewBox=\"0 0 468 268\" style=\"width: 100%; height: 100%;\">\n <title>\n </title>\n <desc>\n </desc>\n <defs>\n <clipPath id=\"recharts21-clip\">\n <rect x=\"60\" y=\"0\" height=\"193\" width=\"408\">\n </rect>\n </clipPath>\n </defs>\n <g class=\"recharts-cartesian-grid\">\n <g class=\"recharts-cartesian-grid-horizontal\">\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"193\" x2=\"468\" y2=\"193\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"144.75\" x2=\"468\" y2=\"144.75\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"96.5\" x2=\"468\" y2=\"96.5\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"48.25\" x2=\"468\" y2=\"48.25\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"0\" x2=\"468\" y2=\"0\">\n </line>\n </g>\n <g class=\"recharts-cartesian-grid-vertical\">\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"94\" y1=\"0\" x2=\"94\" y2=\"193\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"162\" y1=\"0\" x2=\"162\" y2=\"193\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"230\" y1=\"0\" x2=\"230\" y2=\"193\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"298\" y1=\"0\" x2=\"298\" y2=\"193\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"366\" y1=\"0\" x2=\"366\" y2=\"193\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"434\" y1=\"0\" x2=\"434\" y2=\"193\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"60\" y1=\"0\" x2=\"60\" y2=\"193\">\n </line>\n <line stroke-dasharray=\"3 3\" stroke=\"#ccc\" fill=\"none\" x=\"60\" y=\"0\" width=\"408\" height=\"193\" x1=\"468\" y1=\"0\" x2=\"468\" y2=\"193\">\n </line>\n </g>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"193\" x2=\"468\" y2=\"193\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"94\" y1=\"199\" x2=\"94\" y2=\"193\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"94\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"94\" dy=\"0.71em\">January</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"162\" y1=\"199\" x2=\"162\" y2=\"193\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"162\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"162\" dy=\"0.71em\">February</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"230\" y1=\"199\" x2=\"230\" y2=\"193\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"230\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"230\" dy=\"0.71em\">March</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"298\" y1=\"199\" x2=\"298\" y2=\"193\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"298\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"298\" dy=\"0.71em\">April</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"366\" y1=\"199\" x2=\"366\" y2=\"193\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"366\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"366\" dy=\"0.71em\">May</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"193\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"434\" y1=\"199\" x2=\"434\" y2=\"193\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"434\" y=\"201\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"434\" dy=\"0.71em\">June</tspan>\n </text>\n </g>\n </g>\n <text offset=\"30\" x=\"264\" y=\"253\" class=\"recharts-text recharts-label\" text-anchor=\"middle\" fill=\"#808080\">\n <tspan x=\"264\" dy=\"0.71em\">Timerange</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-yAxis yAxis\">\n <line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"0\" x2=\"60\" y2=\"193\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"193\" x2=\"60\" y2=\"193\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"193\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">0 €</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"144.75\" x2=\"60\" y2=\"144.75\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"144.75\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">15 €</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"96.5\" x2=\"60\" y2=\"96.5\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"96.5\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">30 €</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"48.25\" x2=\"60\" y2=\"48.25\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"48.25\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">45 €</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"left\" width=\"60\" height=\"193\" x=\"0\" y=\"0\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"54\" y1=\"0\" x2=\"60\" y2=\"0\">\n </line>\n <text orientation=\"left\" width=\"60\" height=\"193\" stroke=\"none\" x=\"52\" y=\"10\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"end\" fill=\"#666\">\n <tspan x=\"52\" dy=\"0.355em\">60 €</tspan>\n </text>\n </g>\n </g>\n <text offset=\"5\" transform=\"rotate(-90, 5, 96.5)\" x=\"5\" y=\"96.5\" class=\"recharts-text recharts-label\" text-anchor=\"start\" fill=\"#808080\">\n <tspan x=\"5\" dy=\"0.355em\">Costs</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis recharts-xAxis xAxis\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-line\" stroke=\"#666\" fill=\"none\" x1=\"60\" y1=\"223\" x2=\"468\" y2=\"223\">\n </line>\n <g class=\"recharts-cartesian-axis-ticks\">\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"94\" y1=\"229\" x2=\"94\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"94\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"94\" dy=\"0.71em\">Q1</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"162\" y1=\"229\" x2=\"162\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"162\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"162\" dy=\"0.71em\">Q1</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"230\" y1=\"229\" x2=\"230\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"230\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"230\" dy=\"0.71em\">Q1</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"298\" y1=\"229\" x2=\"298\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"298\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"298\" dy=\"0.71em\">Q2</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"366\" y1=\"229\" x2=\"366\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"366\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"366\" dy=\"0.71em\">Q2</tspan>\n </text>\n </g>\n <g class=\"recharts-layer recharts-cartesian-axis-tick\">\n <line orientation=\"bottom\" width=\"408\" height=\"30\" x=\"60\" y=\"223\" class=\"recharts-cartesian-axis-tick-line\" stroke=\"#666\" fill=\"none\" x1=\"434\" y1=\"229\" x2=\"434\" y2=\"223\">\n </line>\n <text orientation=\"bottom\" width=\"408\" height=\"30\" stroke=\"none\" x=\"434\" y=\"231\" class=\"recharts-text recharts-cartesian-axis-tick-value\" text-anchor=\"middle\" fill=\"#666\">\n <tspan x=\"434\" dy=\"0.71em\">Q2</tspan>\n </text>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer recharts-bar\">\n <g class=\"recharts-layer recharts-bar-rectangles\">\n <g class=\"recharts-layer\">\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"66.8\" y=\"42.46000000000001\" width=\"54\" height=\"150.54\" radius=\"0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M 66.8,42.46000000000001 h 54 v 150.54 h -54 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"134.8\" y=\"122.23333333333333\" width=\"54\" height=\"70.76666666666667\" radius=\"0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M 134.8,122.23333333333333 h 54 v 70.76666666666667 h -54 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"202.8\" y=\"153.11333333333334\" width=\"54\" height=\"39.886666666666656\" radius=\"0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M 202.8,153.11333333333334 h 54 v 39.886666666666656 h -54 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"270.8\" y=\"180.51933333333335\" width=\"54\" height=\"12.48066666666665\" radius=\"0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M 270.8,180.51933333333335 h 54 v 12.48066666666665 h -54 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"338.8\" y=\"182.6101666666667\" width=\"54\" height=\"10.389833333333314\" radius=\"0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M 338.8,182.6101666666667 h 54 v 10.389833333333314 h -54 Z\">\n </path>\n </g>\n <g class=\"recharts-layer recharts-bar-rectangle\">\n <path x=\"406.8\" y=\"177.97816666666668\" width=\"54\" height=\"15.02183333333332\" radius=\"0\" fill=\"#67abc5 \" class=\"recharts-rectangle\" d=\"M 406.8,177.97816666666668 h 54 v 15.02183333333332 h -54 Z\">\n </path>\n </g>\n </g>\n </g>\n <g class=\"recharts-layer\">\n </g>\n </g>\n </svg>\n <div tabindex=\"-1\" class=\"recharts-tooltip-wrapper recharts-tooltip-wrapper-right recharts-tooltip-wrapper-bottom\" style=\"visibility: hidden; pointer-events: none; position: absolute; top: 0px; left: 0px; transform: translate(60px, 10px);\">\n <div class=\"recharts-default-tooltip\" style=\"margin: 0px; padding: 10px; background-color: rgb(255, 255, 255); border: 1px solid rgb(204, 204, 204); white-space: nowrap;\">\n <p class=\"recharts-tooltip-label\" style=\"margin: 0px;\">\n </p>\n </div>\n </div>\n </div>\n </div>\n</div>"
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
"label": "Props",
|
|
1307
|
+
"language": "json",
|
|
1308
|
+
"code": null,
|
|
1309
|
+
"props": [
|
|
1310
|
+
{
|
|
1311
|
+
"heading": "BarChart",
|
|
1312
|
+
"rows": [
|
|
1313
|
+
{
|
|
1314
|
+
"name": "width",
|
|
1315
|
+
"type": "Number",
|
|
1316
|
+
"default": "",
|
|
1317
|
+
"description": "The width of chart container."
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"name": "height",
|
|
1321
|
+
"type": "Number",
|
|
1322
|
+
"default": "",
|
|
1323
|
+
"description": "The height of chart container."
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
"name": "data",
|
|
1327
|
+
"type": "Array",
|
|
1328
|
+
"default": "",
|
|
1329
|
+
"description": "The source data, in which each element is an object. It has the following format: [{ name: \"a\", value: 12 }] Note: for some charts, the color of the individual data is taken from the color prop: [{ name: \"a\", value: 12, color: \"color-coldplay-fountain\" }]"
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
"name": "dataKey",
|
|
1333
|
+
"type": "String | Number | Function",
|
|
1334
|
+
"default": "value",
|
|
1335
|
+
"description": "The key of data displayed in the axis. Also, used as label for the x-axis."
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
"name": "dataUnit",
|
|
1339
|
+
"type": "string",
|
|
1340
|
+
"default": "",
|
|
1341
|
+
"description": "The unit of data displayed in the chart."
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"name": "layout",
|
|
1345
|
+
"type": "String",
|
|
1346
|
+
"default": "horizontal",
|
|
1347
|
+
"description": "The layout of the chart. Possible values are: horizontal, vertical"
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"name": "showGrid",
|
|
1351
|
+
"type": "Boolean",
|
|
1352
|
+
"default": "false",
|
|
1353
|
+
"description": "Defines whether or not the grid shall be rendered."
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
"name": "showXAxis",
|
|
1357
|
+
"type": "Boolean",
|
|
1358
|
+
"default": "true",
|
|
1359
|
+
"description": "Defines whether or not the x-axis shall be rendered."
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"name": "showYAxis",
|
|
1363
|
+
"type": "Boolean",
|
|
1364
|
+
"default": "true",
|
|
1365
|
+
"description": "Defines whether or not the y-axis shall be rendered."
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
"name": "xAxisOptions",
|
|
1369
|
+
"type": "Object",
|
|
1370
|
+
"default": "",
|
|
1371
|
+
"description": "Detailed options passed to the underlying XAxis component. Details can be found here: https://recharts.org/en-US/api/XAxis"
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
"name": "yAxisOptions",
|
|
1375
|
+
"type": "Object",
|
|
1376
|
+
"default": "",
|
|
1377
|
+
"description": "Detailed options passed to the underlying YAxis component. Details can be found here: https://recharts.org/en-US/api/YAxis"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
"name": "additionalAxes",
|
|
1381
|
+
"type": "React.ReactElement<XAxisProps | YAxisProps>[]",
|
|
1382
|
+
"default": "",
|
|
1383
|
+
"description": "Render a list of additional axes. This includes YAxis and XAxis."
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
"name": "gridOptions",
|
|
1387
|
+
"type": "Object",
|
|
1388
|
+
"default": "",
|
|
1389
|
+
"description": "Detailed options passed to the underlying Grid component. Details can be found here: https://recharts.org/en-US/api/CartesianGrid"
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
"name": "useDataColors",
|
|
1393
|
+
"type": "Boolean",
|
|
1394
|
+
"default": "false",
|
|
1395
|
+
"description": "Defines whether or not the color information shall be taken from the data input to use different colors for different entries."
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
"name": "brush",
|
|
1399
|
+
"type": "Boolean",
|
|
1400
|
+
"default": "false",
|
|
1401
|
+
"description": "Defines whether or not the brush component shall be used."
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"name": "tooltip",
|
|
1405
|
+
"type": "ChartTooltip | Boolean",
|
|
1406
|
+
"default": "",
|
|
1407
|
+
"description": "Defines whether or not the tooltip component shall be used. You can customize the tooltip by providing a custom ChartTooltip. Prop details can be found here: https://recharts.org/en-US/api/Tooltip. You can also customize the cursor color by setting a stroke or fill color in the cursor props. Details can be found here: https://recharts.org/en-US/api/Tooltip#cursor"
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"name": "legend",
|
|
1411
|
+
"type": "Legend | Boolean",
|
|
1412
|
+
"default": "false",
|
|
1413
|
+
"description": "Shows the provided Legend component otherwise shows nothing."
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
"name": "bars",
|
|
1417
|
+
"type": "Array of Bar",
|
|
1418
|
+
"default": "[]",
|
|
1419
|
+
"description": "Renders the provided Bar components."
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
"name": "...",
|
|
1423
|
+
"type": "",
|
|
1424
|
+
"default": "",
|
|
1425
|
+
"description": "Additional props are passed to the underlying BarChart component. Details can be found here: https://recharts.org/en-US/api/BarChart"
|
|
1426
|
+
}
|
|
1427
|
+
]
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"heading": "Bar",
|
|
1431
|
+
"rows": [
|
|
1432
|
+
{
|
|
1433
|
+
"name": "color",
|
|
1434
|
+
"type": "String",
|
|
1435
|
+
"default": "color-coldplay-fountain",
|
|
1436
|
+
"description": "Defines the color for the whole bar component instead of individual colors from the data. Take the color name from the charts colors page."
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"name": "dataKey",
|
|
1440
|
+
"type": "string | number | ((obj: T) => any)",
|
|
1441
|
+
"default": "value",
|
|
1442
|
+
"description": "The key of data used for the bar."
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"name": "dataUnit",
|
|
1446
|
+
"type": "String | Number",
|
|
1447
|
+
"default": "",
|
|
1448
|
+
"description": "The unit of data displayed for the bar."
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"name": "...",
|
|
1452
|
+
"type": "",
|
|
1453
|
+
"default": "",
|
|
1454
|
+
"description": "Additional props are passed to the underlying Bar component. Details can be found here: https://recharts.org/en-US/api/Bar"
|
|
1455
|
+
}
|
|
1456
|
+
]
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
"heading": "Legend",
|
|
1460
|
+
"rows": [
|
|
1461
|
+
{
|
|
1462
|
+
"name": "iconType",
|
|
1463
|
+
"type": "String",
|
|
1464
|
+
"default": "square",
|
|
1465
|
+
"description": "Defines the type of the leading icon."
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
"name": "iconSize",
|
|
1469
|
+
"type": "String",
|
|
1470
|
+
"default": "12",
|
|
1471
|
+
"description": "Defines the size of the leading icon."
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"name": "layout",
|
|
1475
|
+
"type": "String",
|
|
1476
|
+
"default": "vertical",
|
|
1477
|
+
"description": "Defines the layout of the legend."
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"name": "align",
|
|
1481
|
+
"type": "String",
|
|
1482
|
+
"default": "right",
|
|
1483
|
+
"description": "Defines the alignment of the legend relative to the chart."
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
"name": "verticalAlign",
|
|
1487
|
+
"type": "String",
|
|
1488
|
+
"default": "top",
|
|
1489
|
+
"description": "Defines the vertical alignment of the legend relative to the chart."
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
"name": "...",
|
|
1493
|
+
"type": "",
|
|
1494
|
+
"default": "",
|
|
1495
|
+
"description": "Additional props are passed to the underlying legend component. Details can be found here: https://recharts.org/en-US/api/Legend"
|
|
1496
|
+
}
|
|
1497
|
+
]
|
|
1498
|
+
}
|
|
1499
|
+
]
|
|
1500
|
+
}
|
|
1501
|
+
]
|
|
1502
|
+
}
|
|
1503
|
+
]
|
|
1504
|
+
}
|
|
1505
|
+
],
|
|
1506
|
+
"see_also": []
|
|
1507
|
+
}
|