create-huenei-template 0.2.14 → 0.2.15
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/dist/config/templates.js +7 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/dist/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/dist/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/dist/templates/frontend/react-ssr/.dockerignore +14 -0
- package/dist/templates/frontend/react-ssr/.env.example +9 -0
- package/dist/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/dist/templates/frontend/react-ssr/Dockerfile +41 -0
- package/dist/templates/frontend/react-ssr/README.md +121 -0
- package/dist/templates/frontend/react-ssr/components.json +22 -0
- package/dist/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/dist/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/dist/templates/frontend/react-ssr/next.config.ts +7 -0
- package/dist/templates/frontend/react-ssr/package.json +86 -0
- package/dist/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/dist/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/dist/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/dist/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/dist/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/dist/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/dist/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/dist/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/dist/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/dist/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/dist/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/dist/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/dist/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/dist/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/dist/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/dist/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/dist/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/dist/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/dist/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/dist/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/dist/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/dist/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/dist/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/dist/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/dist/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/dist/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/dist/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/dist/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/dist/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/dist/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/dist/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/dist/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/dist/templates/frontend/react-ssr/vitest.config.ts +41 -0
- package/package.json +1 -1
- package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +22 -0
- package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +24 -0
- package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +32 -0
- package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +25 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-component.md +97 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-page.md +95 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +66 -0
- package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +89 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +64 -0
- package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +94 -0
- package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +120 -0
- package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +209 -0
- package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +101 -0
- package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +93 -0
- package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +10 -0
- package/templates/frontend/react-ssr/.cursor/hooks.json +41 -0
- package/templates/frontend/react-ssr/.cursor/rules/auth-patterns.mdc +48 -0
- package/templates/frontend/react-ssr/.cursor/rules/code-quality.mdc +39 -0
- package/templates/frontend/react-ssr/.cursor/rules/naming-conventions.mdc +32 -0
- package/templates/frontend/react-ssr/.cursor/rules/nextjs-architecture.mdc +51 -0
- package/templates/frontend/react-ssr/.cursor/rules/prisma-standards.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/react-conventions.mdc +52 -0
- package/templates/frontend/react-ssr/.cursor/rules/testing-conventions.mdc +53 -0
- package/templates/frontend/react-ssr/.cursor/rules/ui-stack.mdc +47 -0
- package/templates/frontend/react-ssr/.cursor/skills/authjs-skills/SKILL.md +1149 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/SKILL.md +189 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/daisyUI5.skill +0 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/creating-components.md +412 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/data-display.md +341 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/feedback.md +240 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/input.md +283 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/layout.md +275 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/references/navigation.md +338 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/daisy-meta.ts +220 -0
- package/templates/frontend/react-ssr/.cursor/skills/daisyui-5/scripts/generate-daisy-safelist.ts +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/docker-expert/SKILL.md +413 -0
- package/templates/frontend/react-ssr/.cursor/skills/nextjs-app-router-patterns/SKILL.md +537 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/SKILL.md +243 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-execute.md +75 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-pull.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-push.md +148 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/db-seed.md +191 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/debug.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/dev.md +157 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/format.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/generate.md +147 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/init.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-deploy.md +127 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-dev.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-diff.md +89 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-reset.md +72 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-resolve.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/migrate-status.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/studio.md +122 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-cli/references/validate.md +53 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/client-methods.md +221 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/constructor.md +185 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/filters.md +256 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/model-queries.md +281 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/query-options.md +276 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/raw-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/relations.md +308 -0
- package/templates/frontend/react-ssr/.cursor/skills/prisma-client-api/references/transactions.md +184 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/AGENTS.md +97 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/README.md +138 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/SKILL.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/assets/templates/_template.md +26 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/_sections.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-devtools-performance.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-formprovider-memo.md +78 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/adv-testing-wrapper.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-complete-default-objects.md +66 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-separate-crud-operations.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-unique-fieldarray-per-name.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-use-field-id-as-key.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/array-virtualization-formprovider.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-avoid-double-registration.md +46 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-controller-field-props.md +56 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-local-state-combination.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-single-usecontroller-per-component.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/ctrl-usecontroller-isolation.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-async-default-values.md +69 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-default-values.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-revalidate-mode.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-should-unregister.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-useeffect-dependency.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formcfg-validation-mode.md +51 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-avoid-isvalid-with-onsubmit.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-destructure-formstate.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-getfieldstate-for-single-field.md +49 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-subscribe-to-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/formstate-useformstate-isolation.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-mui-controller-pattern.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-form-import.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-shadcn-select-wiring.md +64 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/integ-value-transform.md +59 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-avoid-watch-in-render.md +48 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-deep-subscription.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-useformcontext-sparingly.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-default-value.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-over-watch.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-usewatch-with-getvalues.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/sub-watch-specific-fields.md +54 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-delay-error.md +52 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-dynamic-schema-factory.md +57 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-error-message-strategy.md +65 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-inline-vs-resolver.md +63 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-native-validation.md +60 -0
- package/templates/frontend/react-ssr/.cursor/skills/react-hook-form/references/valid-resolver-caching.md +58 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/SKILL.md +713 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/api_reference.md +1121 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/best_practices.md +782 -0
- package/templates/frontend/react-ssr/.cursor/skills/recharts/references/examples.md +940 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/SKILL.md +114 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-gc-time.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-invalidation.md +116 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-placeholder-vs-initial.md +156 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/cache-stale-time.md +80 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/err-error-boundaries.md +150 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/inf-page-params.md +132 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-invalidate-queries.md +118 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-mutation-state.md +169 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/mut-optimistic-updates.md +137 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/network-mode.md +179 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/parallel-use-queries.md +152 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/perf-select-transform.md +144 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/persist-queries.md +194 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/pf-intent-prefetch.md +143 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-array-structure.md +50 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-factory-pattern.md +102 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-hierarchical-organization.md +76 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-include-dependencies.md +62 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/qk-serializable.md +93 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/query-cancellation.md +171 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-query-best-practices/rules/ssr-dehydration.md +158 -0
- package/templates/frontend/react-ssr/.cursor/skills/tanstack-table/SKILL.md +582 -0
- package/templates/frontend/react-ssr/.cursor/skills/zod-4/SKILL.md +216 -0
- package/templates/frontend/react-ssr/.dockerignore +14 -0
- package/templates/frontend/react-ssr/.env.example +9 -0
- package/templates/frontend/react-ssr/.husky/pre-commit +1 -0
- package/templates/frontend/react-ssr/Dockerfile +41 -0
- package/templates/frontend/react-ssr/README.md +121 -0
- package/templates/frontend/react-ssr/components.json +22 -0
- package/templates/frontend/react-ssr/docker-compose.yml +21 -0
- package/templates/frontend/react-ssr/eslint.config.mjs +26 -0
- package/templates/frontend/react-ssr/next.config.ts +7 -0
- package/templates/frontend/react-ssr/package.json +86 -0
- package/templates/frontend/react-ssr/postcss.config.mjs +5 -0
- package/templates/frontend/react-ssr/prisma/schema.prisma +75 -0
- package/templates/frontend/react-ssr/prisma/seed.ts +109 -0
- package/templates/frontend/react-ssr/prisma.config.ts +17 -0
- package/templates/frontend/react-ssr/skills-lock.json +65 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/badge.test.tsx +26 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/button.test.tsx +38 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/card.test.tsx +39 -0
- package/templates/frontend/react-ssr/src/__tests__/components/ui/input.test.tsx +32 -0
- package/templates/frontend/react-ssr/src/__tests__/hooks/useLocalStorage.test.ts +53 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/queryClient.test.ts +19 -0
- package/templates/frontend/react-ssr/src/__tests__/lib/utils.test.ts +24 -0
- package/templates/frontend/react-ssr/src/actions/auth.ts +91 -0
- package/templates/frontend/react-ssr/src/actions/contacto.ts +46 -0
- package/templates/frontend/react-ssr/src/actions/proyectos.ts +159 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/dashboard-client.tsx +321 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/dashboard/page.tsx +48 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/layout.tsx +34 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/perfil/page.tsx +85 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/page.tsx +23 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/proyectos-crud/proyectos-crud-client.tsx +472 -0
- package/templates/frontend/react-ssr/src/app/(authenticated)/ui-components/page.tsx +358 -0
- package/templates/frontend/react-ssr/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/templates/frontend/react-ssr/src/app/auth/iniciar-sesion/page.tsx +148 -0
- package/templates/frontend/react-ssr/src/app/auth/recuperar-password/page.tsx +100 -0
- package/templates/frontend/react-ssr/src/app/auth/registro/page.tsx +154 -0
- package/templates/frontend/react-ssr/src/app/contacto/contacto-form.tsx +189 -0
- package/templates/frontend/react-ssr/src/app/contacto/page.tsx +11 -0
- package/templates/frontend/react-ssr/src/app/globals.css +99 -0
- package/templates/frontend/react-ssr/src/app/layout.tsx +22 -0
- package/templates/frontend/react-ssr/src/app/loading.tsx +7 -0
- package/templates/frontend/react-ssr/src/app/not-found.tsx +14 -0
- package/templates/frontend/react-ssr/src/app/page.tsx +331 -0
- package/templates/frontend/react-ssr/src/app/proyectos/page.tsx +178 -0
- package/templates/frontend/react-ssr/src/auth.ts +64 -0
- package/templates/frontend/react-ssr/src/components/layout/navbar.tsx +68 -0
- package/templates/frontend/react-ssr/src/components/layout/sidebar.tsx +109 -0
- package/templates/frontend/react-ssr/src/components/layout/sign-out-button.tsx +16 -0
- package/templates/frontend/react-ssr/src/components/providers.tsx +33 -0
- package/templates/frontend/react-ssr/src/components/ui/avatar.tsx +53 -0
- package/templates/frontend/react-ssr/src/components/ui/badge.tsx +42 -0
- package/templates/frontend/react-ssr/src/components/ui/breadcrumb.tsx +114 -0
- package/templates/frontend/react-ssr/src/components/ui/button.tsx +58 -0
- package/templates/frontend/react-ssr/src/components/ui/card.tsx +95 -0
- package/templates/frontend/react-ssr/src/components/ui/dialog.tsx +136 -0
- package/templates/frontend/react-ssr/src/components/ui/form.tsx +168 -0
- package/templates/frontend/react-ssr/src/components/ui/input.tsx +22 -0
- package/templates/frontend/react-ssr/src/components/ui/label.tsx +26 -0
- package/templates/frontend/react-ssr/src/components/ui/password-input.tsx +43 -0
- package/templates/frontend/react-ssr/src/components/ui/separator.tsx +30 -0
- package/templates/frontend/react-ssr/src/components/ui/table.tsx +240 -0
- package/templates/frontend/react-ssr/src/components/ui/tabs.tsx +76 -0
- package/templates/frontend/react-ssr/src/components/ui/textarea.tsx +21 -0
- package/templates/frontend/react-ssr/src/data/dashboard.ts +179 -0
- package/templates/frontend/react-ssr/src/hooks/useLocalStorage.ts +38 -0
- package/templates/frontend/react-ssr/src/lib/prisma.ts +24 -0
- package/templates/frontend/react-ssr/src/lib/queryClient.ts +25 -0
- package/templates/frontend/react-ssr/src/lib/utils.ts +6 -0
- package/templates/frontend/react-ssr/src/proxy.ts +31 -0
- package/templates/frontend/react-ssr/src/test/mocks/next-navigation.ts +16 -0
- package/templates/frontend/react-ssr/src/test/setup.ts +1 -0
- package/templates/frontend/react-ssr/src/test/utils.tsx +30 -0
- package/templates/frontend/react-ssr/src/types/index.ts +36 -0
- package/templates/frontend/react-ssr/tsconfig.json +41 -0
- package/templates/frontend/react-ssr/vitest.config.ts +41 -0
|
@@ -0,0 +1,1121 @@
|
|
|
1
|
+
# Recharts API Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for all Recharts components, props, and configuration options.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Chart Components](#chart-components)
|
|
8
|
+
2. [Cartesian Components](#cartesian-components)
|
|
9
|
+
3. [Polar Components](#polar-components)
|
|
10
|
+
4. [General Components](#general-components)
|
|
11
|
+
5. [Hooks](#hooks)
|
|
12
|
+
6. [Shapes](#shapes)
|
|
13
|
+
|
|
14
|
+
## Chart Components
|
|
15
|
+
|
|
16
|
+
### LineChart
|
|
17
|
+
|
|
18
|
+
Line and area visualizations with support for multiple series, tooltips, and animations.
|
|
19
|
+
|
|
20
|
+
```jsx
|
|
21
|
+
<LineChart
|
|
22
|
+
data={array} // Required: data array
|
|
23
|
+
width={number} // Width in px or percentage string
|
|
24
|
+
height={number} // Height in px or percentage string
|
|
25
|
+
layout="horizontal" // "horizontal" | "vertical"
|
|
26
|
+
margin={{ top, right, bottom, left }}
|
|
27
|
+
responsive={boolean} // Auto-resize with container (v3.3+, recommended)
|
|
28
|
+
style={object} // CSS styles (useful with responsive for maxWidth, aspectRatio, etc.)
|
|
29
|
+
accessibilityLayer={true} // Keyboard navigation and screen reader support (default: true)
|
|
30
|
+
syncId="string" // Synchronize with other charts
|
|
31
|
+
onClick={func}
|
|
32
|
+
onMouseMove={func}
|
|
33
|
+
onMouseEnter={func}
|
|
34
|
+
onMouseLeave={func}
|
|
35
|
+
>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Child components**: XAxis, YAxis, CartesianGrid, Tooltip, Legend, Line, ReferenceLine, ReferenceArea, ReferenceDot, Brush
|
|
39
|
+
|
|
40
|
+
**Note**: The `responsive`, `style`, and `accessibilityLayer` props are available on all chart types (BarChart, AreaChart, PieChart, ScatterChart, ComposedChart, RadarChart, etc.).
|
|
41
|
+
|
|
42
|
+
### BarChart
|
|
43
|
+
|
|
44
|
+
Bar and column charts with stacking, grouping, and custom shapes.
|
|
45
|
+
|
|
46
|
+
```jsx
|
|
47
|
+
<BarChart
|
|
48
|
+
data={array}
|
|
49
|
+
layout="horizontal"
|
|
50
|
+
barCategoryGap="10%" // Gap between categories
|
|
51
|
+
barGap={4} // Gap between bars in same category
|
|
52
|
+
barSize={number} // Fixed bar width
|
|
53
|
+
maxBarSize={number} // Maximum bar width
|
|
54
|
+
stackOffset="none" // "none" | "expand" | "positive" | "sign" | "silhouette" | "wiggle"
|
|
55
|
+
>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Key props**:
|
|
59
|
+
- `barCategoryGap`: Percentage or number for category spacing
|
|
60
|
+
- `barGap`: Pixels between bars in same group
|
|
61
|
+
- `barSize`: Fixed width/height (auto-calculated if not set)
|
|
62
|
+
- `stackOffset`: Strategy for stacked bars
|
|
63
|
+
|
|
64
|
+
### AreaChart
|
|
65
|
+
|
|
66
|
+
Filled area charts with gradients and stacking.
|
|
67
|
+
|
|
68
|
+
```jsx
|
|
69
|
+
<AreaChart
|
|
70
|
+
data={array}
|
|
71
|
+
baseValue="dataMin" // Base for area fill: "dataMin" | "dataMax" | number
|
|
72
|
+
stackOffset="none"
|
|
73
|
+
>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### PieChart
|
|
77
|
+
|
|
78
|
+
Pie and donut charts for proportional data.
|
|
79
|
+
|
|
80
|
+
```jsx
|
|
81
|
+
<PieChart
|
|
82
|
+
width={number}
|
|
83
|
+
height={number}
|
|
84
|
+
>
|
|
85
|
+
<Pie
|
|
86
|
+
data={array}
|
|
87
|
+
dataKey="value" // Required: numeric property
|
|
88
|
+
nameKey="name" // Property for labels
|
|
89
|
+
cx="50%" // Center X
|
|
90
|
+
cy="50%" // Center Y
|
|
91
|
+
innerRadius={0} // For donut chart
|
|
92
|
+
outerRadius={number} // Pie radius
|
|
93
|
+
startAngle={0} // Starting angle (degrees)
|
|
94
|
+
endAngle={360} // Ending angle
|
|
95
|
+
minAngle={0} // Minimum slice angle
|
|
96
|
+
paddingAngle={0} // Gap between slices
|
|
97
|
+
label={false} // Show labels
|
|
98
|
+
labelLine={true} // Line connecting labels
|
|
99
|
+
isAnimationActive={true}
|
|
100
|
+
/>
|
|
101
|
+
</PieChart>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### ScatterChart
|
|
105
|
+
|
|
106
|
+
Scatter plots and bubble charts for correlated data.
|
|
107
|
+
|
|
108
|
+
```jsx
|
|
109
|
+
<ScatterChart
|
|
110
|
+
width={number}
|
|
111
|
+
height={number}
|
|
112
|
+
margin={{ top, right, bottom, left }}
|
|
113
|
+
>
|
|
114
|
+
<XAxis type="number" dataKey="x" />
|
|
115
|
+
<YAxis type="number" dataKey="y" />
|
|
116
|
+
<Scatter
|
|
117
|
+
data={array}
|
|
118
|
+
dataKey="y"
|
|
119
|
+
fill="#8884d8"
|
|
120
|
+
shape="circle" // "circle" | "cross" | "diamond" | "square" | "star" | "triangle" | "wye" | function
|
|
121
|
+
legendType="circle"
|
|
122
|
+
/>
|
|
123
|
+
</ScatterChart>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### ComposedChart
|
|
127
|
+
|
|
128
|
+
Mix multiple chart types (lines, bars, areas) in one chart.
|
|
129
|
+
|
|
130
|
+
```jsx
|
|
131
|
+
<ComposedChart data={array}>
|
|
132
|
+
{/* Can include: Area, Bar, Line, Scatter, XAxis, YAxis, etc. */}
|
|
133
|
+
</ComposedChart>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### RadarChart
|
|
137
|
+
|
|
138
|
+
Radar/spider charts for multi-dimensional data.
|
|
139
|
+
|
|
140
|
+
```jsx
|
|
141
|
+
<RadarChart
|
|
142
|
+
cx="50%"
|
|
143
|
+
cy="50%"
|
|
144
|
+
outerRadius={number}
|
|
145
|
+
width={number}
|
|
146
|
+
height={number}
|
|
147
|
+
data={array}
|
|
148
|
+
>
|
|
149
|
+
<PolarGrid />
|
|
150
|
+
<PolarAngleAxis dataKey="subject" />
|
|
151
|
+
<PolarRadiusAxis />
|
|
152
|
+
<Radar
|
|
153
|
+
name="Series"
|
|
154
|
+
dataKey="A"
|
|
155
|
+
stroke="#8884d8"
|
|
156
|
+
fill="#8884d8"
|
|
157
|
+
fillOpacity={0.6}
|
|
158
|
+
/>
|
|
159
|
+
</RadarChart>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### RadialBarChart
|
|
163
|
+
|
|
164
|
+
Circular bar charts.
|
|
165
|
+
|
|
166
|
+
```jsx
|
|
167
|
+
<RadialBarChart
|
|
168
|
+
width={number}
|
|
169
|
+
height={number}
|
|
170
|
+
cx="50%"
|
|
171
|
+
cy="50%"
|
|
172
|
+
innerRadius={number}
|
|
173
|
+
outerRadius={number}
|
|
174
|
+
data={array}
|
|
175
|
+
startAngle={90}
|
|
176
|
+
endAngle={-270}
|
|
177
|
+
>
|
|
178
|
+
<RadialBar dataKey="value" background clockWise />
|
|
179
|
+
<Legend />
|
|
180
|
+
<Tooltip />
|
|
181
|
+
</RadialBarChart>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Treemap
|
|
185
|
+
|
|
186
|
+
Hierarchical data visualization.
|
|
187
|
+
|
|
188
|
+
```jsx
|
|
189
|
+
<Treemap
|
|
190
|
+
width={number}
|
|
191
|
+
height={number}
|
|
192
|
+
data={array}
|
|
193
|
+
dataKey="size"
|
|
194
|
+
stroke="#fff"
|
|
195
|
+
fill="#8884d8"
|
|
196
|
+
aspectRatio={number}
|
|
197
|
+
content={func} // Custom render function
|
|
198
|
+
/>
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Sankey
|
|
202
|
+
|
|
203
|
+
Flow diagram for visualizing flow between nodes.
|
|
204
|
+
|
|
205
|
+
```jsx
|
|
206
|
+
<Sankey
|
|
207
|
+
width={number}
|
|
208
|
+
height={number}
|
|
209
|
+
data={sankeyData} // { nodes: [], links: [] }
|
|
210
|
+
nodePadding={number}
|
|
211
|
+
nodeWidth={number}
|
|
212
|
+
linkCurvature={number}
|
|
213
|
+
iterations={number}
|
|
214
|
+
>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### SunburstChart
|
|
218
|
+
|
|
219
|
+
Radial hierarchy visualization.
|
|
220
|
+
|
|
221
|
+
```jsx
|
|
222
|
+
<SunburstChart
|
|
223
|
+
data={hierarchicalData}
|
|
224
|
+
dataKey="value"
|
|
225
|
+
/>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Cartesian Components
|
|
229
|
+
|
|
230
|
+
### XAxis / YAxis
|
|
231
|
+
|
|
232
|
+
Configure axes for Cartesian charts.
|
|
233
|
+
|
|
234
|
+
```jsx
|
|
235
|
+
<XAxis
|
|
236
|
+
dataKey="name" // Property for tick labels
|
|
237
|
+
type="category" // "category" | "number"
|
|
238
|
+
domain={['auto', 'auto']} // [min, max]
|
|
239
|
+
range={array} // Custom range
|
|
240
|
+
scale="auto" // "auto" | "linear" | "pow" | "sqrt" | "log" | "identity" | "time" | "band" | "point" | "ordinal" | function
|
|
241
|
+
tick={object|element} // Tick style or custom element
|
|
242
|
+
tickLine={true} // Show tick lines
|
|
243
|
+
axisLine={true} // Show axis line
|
|
244
|
+
tickFormatter={func} // Format tick labels
|
|
245
|
+
ticks={array} // Custom tick values
|
|
246
|
+
interval="preserveEnd" // "preserveStart" | "preserveEnd" | "preserveStartEnd" | number
|
|
247
|
+
angle={0} // Rotate labels
|
|
248
|
+
height={30} // Reserved height
|
|
249
|
+
width={60} // Reserved width
|
|
250
|
+
label={{ value: 'text', position: 'insideBottom', offset: -10 }}
|
|
251
|
+
orientation="bottom" // "top" | "bottom" (XAxis) | "left" | "right" (YAxis)
|
|
252
|
+
allowDataOverflow={false}
|
|
253
|
+
allowDecimals={true}
|
|
254
|
+
allowDuplicatedCategory={true}
|
|
255
|
+
hide={false}
|
|
256
|
+
mirror={false}
|
|
257
|
+
reversed={false}
|
|
258
|
+
/>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Line
|
|
262
|
+
|
|
263
|
+
Line series for LineChart and ComposedChart.
|
|
264
|
+
|
|
265
|
+
```jsx
|
|
266
|
+
<Pie
|
|
267
|
+
data={array}
|
|
268
|
+
dataKey="value" // Required: numeric property
|
|
269
|
+
nameKey="name" // Property for labels
|
|
270
|
+
cx="50%" // Center X
|
|
271
|
+
cy="50%" // Center Y
|
|
272
|
+
innerRadius={0} // For donut chart
|
|
273
|
+
outerRadius={number} // Pie radius
|
|
274
|
+
startAngle={0} // Starting angle (degrees)
|
|
275
|
+
endAngle={360} // Ending angle
|
|
276
|
+
minAngle={0} // Minimum slice angle
|
|
277
|
+
paddingAngle={0} // Gap between slices
|
|
278
|
+
label={false} // Show labels
|
|
279
|
+
labelLine={true} // Line connecting labels
|
|
280
|
+
shape={element|func} // Custom slice render; receives isActive prop for active/inactive styling (replaces deprecated Cell, activeShape, inactiveShape)
|
|
281
|
+
isAnimationActive={true}
|
|
282
|
+
/>
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Bar
|
|
286
|
+
|
|
287
|
+
Bar series for BarChart and ComposedChart.
|
|
288
|
+
|
|
289
|
+
```jsx
|
|
290
|
+
<Bar
|
|
291
|
+
dataKey="value"
|
|
292
|
+
name="Series Name"
|
|
293
|
+
xAxisId={0}
|
|
294
|
+
yAxisId={0}
|
|
295
|
+
legendType="rect"
|
|
296
|
+
stackId="a" // Group into stacks
|
|
297
|
+
barSize={20} // Fixed bar size
|
|
298
|
+
unit="k" // Unit suffix
|
|
299
|
+
fill="#8884d8"
|
|
300
|
+
stroke="#8884d8"
|
|
301
|
+
strokeWidth={1}
|
|
302
|
+
radius={[4, 4, 0, 0]} // Corner radii [tl, tr, br, bl]
|
|
303
|
+
label={false}
|
|
304
|
+
isAnimationActive={true}
|
|
305
|
+
animationBegin={0}
|
|
306
|
+
animationDuration={1500}
|
|
307
|
+
animationEasing="ease"
|
|
308
|
+
hide={false}
|
|
309
|
+
background={false} // Show background bars
|
|
310
|
+
shape={element|func} // Custom bar shape
|
|
311
|
+
onClick={func}
|
|
312
|
+
onMouseEnter={func}
|
|
313
|
+
onMouseLeave={func}
|
|
314
|
+
/>
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### Area
|
|
318
|
+
|
|
319
|
+
Area series for AreaChart and ComposedChart.
|
|
320
|
+
|
|
321
|
+
```jsx
|
|
322
|
+
<Area
|
|
323
|
+
type="monotone"
|
|
324
|
+
dataKey="value"
|
|
325
|
+
name="Series Name"
|
|
326
|
+
xAxisId={0}
|
|
327
|
+
yAxisId={0}
|
|
328
|
+
stackId="a" // Stack areas
|
|
329
|
+
unit="k"
|
|
330
|
+
stroke="#8884d8"
|
|
331
|
+
strokeWidth={1}
|
|
332
|
+
fill="#8884d8" // Solid fill
|
|
333
|
+
fillOpacity={0.6} // Opacity
|
|
334
|
+
fill="url(#gradient)" // Gradient fill
|
|
335
|
+
dot={false}
|
|
336
|
+
activeDot={{ r: 8 }}
|
|
337
|
+
label={false}
|
|
338
|
+
isAnimationActive={true}
|
|
339
|
+
animationDuration={1500}
|
|
340
|
+
animationEasing="ease"
|
|
341
|
+
legendType="line"
|
|
342
|
+
connectNulls={false}
|
|
343
|
+
hide={false}
|
|
344
|
+
baseLine={number} // Base value for fill
|
|
345
|
+
onClick={func}
|
|
346
|
+
onMouseEnter={func}
|
|
347
|
+
/>
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Scatter
|
|
351
|
+
|
|
352
|
+
Scatter plot points.
|
|
353
|
+
|
|
354
|
+
```jsx
|
|
355
|
+
<Scatter
|
|
356
|
+
data={array}
|
|
357
|
+
dataKey="y"
|
|
358
|
+
name="Series Name"
|
|
359
|
+
xAxisId={0}
|
|
360
|
+
yAxisId={0}
|
|
361
|
+
zAxisId={0}
|
|
362
|
+
legendType="circle"
|
|
363
|
+
line={false} // Connect points with line
|
|
364
|
+
lineType="joint" // "joint" | "fitting"
|
|
365
|
+
shape="circle" // Shape or custom function
|
|
366
|
+
fill="#8884d8"
|
|
367
|
+
stroke="#8884d8"
|
|
368
|
+
isAnimationActive={true}
|
|
369
|
+
onClick={func}
|
|
370
|
+
>
|
|
371
|
+
<ErrorBar dataKey="error" direction="x" />
|
|
372
|
+
<ErrorBar dataKey="error" direction="y" />
|
|
373
|
+
</Scatter>
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### CartesianGrid
|
|
377
|
+
|
|
378
|
+
Grid lines for Cartesian charts.
|
|
379
|
+
|
|
380
|
+
```jsx
|
|
381
|
+
<CartesianGrid
|
|
382
|
+
strokeDasharray="3 3" // Line pattern
|
|
383
|
+
stroke="#ccc" // Line color
|
|
384
|
+
fill="none" // Grid fill
|
|
385
|
+
horizontal={true} // Horizontal lines
|
|
386
|
+
vertical={true} // Vertical lines
|
|
387
|
+
horizontalCoordinatesGenerator={func}
|
|
388
|
+
verticalCoordinatesGenerator={func}
|
|
389
|
+
x={number}
|
|
390
|
+
y={number}
|
|
391
|
+
width={number}
|
|
392
|
+
height={number}
|
|
393
|
+
/>
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### ReferenceLine
|
|
397
|
+
|
|
398
|
+
Horizontal or vertical reference line.
|
|
399
|
+
|
|
400
|
+
```jsx
|
|
401
|
+
<ReferenceLine
|
|
402
|
+
x="value" // X position for vertical line
|
|
403
|
+
y={5000} // Y position for horizontal line
|
|
404
|
+
xAxisId={0}
|
|
405
|
+
yAxisId={0}
|
|
406
|
+
alwaysShow={false}
|
|
407
|
+
isFront={false} // Render on top
|
|
408
|
+
stroke="red"
|
|
409
|
+
strokeWidth={1}
|
|
410
|
+
strokeDasharray="3 3"
|
|
411
|
+
label={{ value: "Label", position: "center", fill: "red" }}
|
|
412
|
+
/>
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### ReferenceArea
|
|
416
|
+
|
|
417
|
+
Highlighted rectangular region.
|
|
418
|
+
|
|
419
|
+
```jsx
|
|
420
|
+
<ReferenceArea
|
|
421
|
+
x1="Jan" // Start X
|
|
422
|
+
x2="Mar" // End X
|
|
423
|
+
y1={0} // Start Y
|
|
424
|
+
y2={100} // End Y
|
|
425
|
+
xAxisId={0}
|
|
426
|
+
yAxisId={0}
|
|
427
|
+
alwaysShow={false}
|
|
428
|
+
isFront={false}
|
|
429
|
+
stroke="#8884d8"
|
|
430
|
+
strokeWidth={1}
|
|
431
|
+
fill="#8884d8"
|
|
432
|
+
fillOpacity={0.3}
|
|
433
|
+
label={{ value: "Area" }}
|
|
434
|
+
/>
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### ReferenceDot
|
|
438
|
+
|
|
439
|
+
Highlighted point marker.
|
|
440
|
+
|
|
441
|
+
```jsx
|
|
442
|
+
<ReferenceDot
|
|
443
|
+
x="value"
|
|
444
|
+
y={number}
|
|
445
|
+
xAxisId={0}
|
|
446
|
+
yAxisId={0}
|
|
447
|
+
isFront={false}
|
|
448
|
+
alwaysShow={false}
|
|
449
|
+
r={10} // Radius
|
|
450
|
+
stroke="#8884d8"
|
|
451
|
+
strokeWidth={2}
|
|
452
|
+
fill="#fff"
|
|
453
|
+
label={{ value: "Point" }}
|
|
454
|
+
/>
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
### Brush
|
|
458
|
+
|
|
459
|
+
Zoom/scroll control for charts.
|
|
460
|
+
|
|
461
|
+
```jsx
|
|
462
|
+
<Brush
|
|
463
|
+
dataKey="name" // X-axis data key
|
|
464
|
+
width={number} // Brush width
|
|
465
|
+
height={30} // Brush height
|
|
466
|
+
x={number} // X position
|
|
467
|
+
y={number} // Y position
|
|
468
|
+
startIndex={0} // Initial start
|
|
469
|
+
endIndex={data.length - 1}
|
|
470
|
+
travellerWidth={5} // Handle width
|
|
471
|
+
stroke="#8884d8"
|
|
472
|
+
fill="#fff"
|
|
473
|
+
gap={1} // Gap between items
|
|
474
|
+
onChange={func} // Selection change callback
|
|
475
|
+
onDragEnd={func}
|
|
476
|
+
/>
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
### ErrorBar
|
|
480
|
+
|
|
481
|
+
Error indicators for scatter and bar charts.
|
|
482
|
+
|
|
483
|
+
```jsx
|
|
484
|
+
<ErrorBar
|
|
485
|
+
dataKey="error"
|
|
486
|
+
direction="x" // "x" | "y"
|
|
487
|
+
width={5} // Error bar width
|
|
488
|
+
strokeWidth={2}
|
|
489
|
+
/>
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
### ZAxis
|
|
493
|
+
|
|
494
|
+
Third dimension for bubble charts.
|
|
495
|
+
|
|
496
|
+
```jsx
|
|
497
|
+
<ZAxis
|
|
498
|
+
type="number"
|
|
499
|
+
dataKey="z"
|
|
500
|
+
range={[60, 400]} // Bubble size range
|
|
501
|
+
unit="units"
|
|
502
|
+
/>
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
### Funnel
|
|
506
|
+
|
|
507
|
+
Funnel chart component (usually in FunnelChart).
|
|
508
|
+
|
|
509
|
+
```jsx
|
|
510
|
+
<Funnel
|
|
511
|
+
dataKey="value"
|
|
512
|
+
data={array}
|
|
513
|
+
nameKey="name"
|
|
514
|
+
isAnimationActive={true}
|
|
515
|
+
animationDuration={1500}
|
|
516
|
+
legendType={string}
|
|
517
|
+
/>
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
## Polar Components
|
|
521
|
+
|
|
522
|
+
### Pie
|
|
523
|
+
|
|
524
|
+
Pie chart slices.
|
|
525
|
+
|
|
526
|
+
```jsx
|
|
527
|
+
<Pie
|
|
528
|
+
data={array}
|
|
529
|
+
dataKey="value"
|
|
530
|
+
nameKey="name"
|
|
531
|
+
cx="50%"
|
|
532
|
+
cy="50%"
|
|
533
|
+
innerRadius={0}
|
|
534
|
+
outerRadius={number}
|
|
535
|
+
paddingAngle={0}
|
|
536
|
+
startAngle={0}
|
|
537
|
+
endAngle={360}
|
|
538
|
+
minAngle={0}
|
|
539
|
+
cornerRadius={0} // Rounded corners
|
|
540
|
+
cornerIsExternal={false}
|
|
541
|
+
label={false} // boolean | object | element | function
|
|
542
|
+
labelLine={true}
|
|
543
|
+
activeIndex={array} // Currently active slice(s) — DEPRECATED in v3, use Tooltip defaultIndex instead
|
|
544
|
+
activeShape={element|func} // Active slice style — DEPRECATED, use shape prop with isActive
|
|
545
|
+
shape={element|func} // Custom slice render; receives isActive for active/inactive styling (replaces deprecated Cell, activeShape, inactiveShape)
|
|
546
|
+
isAnimationActive={true}
|
|
547
|
+
animationBegin={0}
|
|
548
|
+
animationDuration={1500}
|
|
549
|
+
animationEasing="ease"
|
|
550
|
+
onClick={func}
|
|
551
|
+
onMouseEnter={func}
|
|
552
|
+
/>
|
|
553
|
+
|
|
554
|
+
// Per-slice colors using shape prop (replaces deprecated Cell):
|
|
555
|
+
<Pie
|
|
556
|
+
data={data}
|
|
557
|
+
dataKey="value"
|
|
558
|
+
shape={(props) => <Sector {...props} fill={COLORS[props.index % COLORS.length]} />}
|
|
559
|
+
/>
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
### Radar
|
|
563
|
+
|
|
564
|
+
Radar chart polygon.
|
|
565
|
+
|
|
566
|
+
```jsx
|
|
567
|
+
<Radar
|
|
568
|
+
name="Series"
|
|
569
|
+
dataKey="value"
|
|
570
|
+
stroke="#8884d8"
|
|
571
|
+
strokeWidth={1}
|
|
572
|
+
fill="#8884d8"
|
|
573
|
+
fillOpacity={0.6}
|
|
574
|
+
isAnimationActive={true}
|
|
575
|
+
legendType="line"
|
|
576
|
+
dot={false}
|
|
577
|
+
/>
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
### RadialBar
|
|
581
|
+
|
|
582
|
+
Radial bar segments.
|
|
583
|
+
|
|
584
|
+
```jsx
|
|
585
|
+
<RadialBar
|
|
586
|
+
dataKey="value"
|
|
587
|
+
background={false}
|
|
588
|
+
clockWise={true}
|
|
589
|
+
minAngle={0}
|
|
590
|
+
cornerRadius={0}
|
|
591
|
+
isAnimationActive={true}
|
|
592
|
+
legendType="circle"
|
|
593
|
+
/>
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### PolarGrid
|
|
597
|
+
|
|
598
|
+
Grid for radar charts.
|
|
599
|
+
|
|
600
|
+
```jsx
|
|
601
|
+
<PolarGrid
|
|
602
|
+
cx={number}
|
|
603
|
+
cy={number}
|
|
604
|
+
outerRadius={number}
|
|
605
|
+
gridType="polygon" // "polygon" | "circle"
|
|
606
|
+
/>
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
### PolarAngleAxis
|
|
610
|
+
|
|
611
|
+
Angular axis for radar charts.
|
|
612
|
+
|
|
613
|
+
```jsx
|
|
614
|
+
<PolarAngleAxis
|
|
615
|
+
dataKey="subject"
|
|
616
|
+
type="category"
|
|
617
|
+
tick={object|element}
|
|
618
|
+
tickFormatter={func}
|
|
619
|
+
/>
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
### PolarRadiusAxis
|
|
623
|
+
|
|
624
|
+
Radial axis for radar charts.
|
|
625
|
+
|
|
626
|
+
```jsx
|
|
627
|
+
<PolarRadiusAxis
|
|
628
|
+
type="number"
|
|
629
|
+
domain={[0, 'auto']}
|
|
630
|
+
tick={object}
|
|
631
|
+
tickFormatter={func}
|
|
632
|
+
label={{ value: 'Label', angle: 90 }}
|
|
633
|
+
/>
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
## General Components
|
|
637
|
+
|
|
638
|
+
### ResponsiveContainer
|
|
639
|
+
|
|
640
|
+
Makes charts responsive to container size. **For Recharts < 3.3.** In Recharts 3.3+, prefer the `responsive` prop on chart components instead.
|
|
641
|
+
|
|
642
|
+
```jsx
|
|
643
|
+
<ResponsiveContainer
|
|
644
|
+
width="100%" // "100%" | number
|
|
645
|
+
height={300} // Required: number (NOT percentage)
|
|
646
|
+
aspect={number} // Aspect ratio (alternative to height)
|
|
647
|
+
minWidth={number}
|
|
648
|
+
minHeight={number}
|
|
649
|
+
maxHeight={number}
|
|
650
|
+
debounce={number} // Resize debounce (ms)
|
|
651
|
+
className={string}
|
|
652
|
+
style={object}
|
|
653
|
+
>
|
|
654
|
+
{/* Chart component */}
|
|
655
|
+
</ResponsiveContainer>
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
**Critical**: Height must be a number, not percentage. Parent element must have defined dimensions.
|
|
659
|
+
|
|
660
|
+
### Tooltip
|
|
661
|
+
|
|
662
|
+
Hover/click information display. Also controls active element highlighting (replaces removed `activeIndex` prop from v2).
|
|
663
|
+
|
|
664
|
+
```jsx
|
|
665
|
+
<Tooltip
|
|
666
|
+
trigger="hover" // "hover" (default) | "click"
|
|
667
|
+
defaultIndex={number} // Initial highlighted item index on render
|
|
668
|
+
active={boolean} // Force tooltip to stay active
|
|
669
|
+
cursor={{ stroke: '#ccc', strokeWidth: 1 }} // Cursor style, false to hide
|
|
670
|
+
content={element|func} // Custom content, () => null to hide text
|
|
671
|
+
contentStyle={object} // Container styles
|
|
672
|
+
wrapperStyle={object}
|
|
673
|
+
labelStyle={object}
|
|
674
|
+
itemStyle={object}
|
|
675
|
+
separator={" : "}
|
|
676
|
+
formatter={(value, name, props) => [formattedValue, formattedName]}
|
|
677
|
+
labelFormatter={(label) => formattedLabel}
|
|
678
|
+
isAnimationActive={true}
|
|
679
|
+
animationDuration={500}
|
|
680
|
+
animationEasing="ease"
|
|
681
|
+
itemSorter={func} // Sort tooltip items
|
|
682
|
+
filterNull={true} // Hide null values
|
|
683
|
+
/>
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
**Custom Tooltip**:
|
|
687
|
+
```jsx
|
|
688
|
+
const CustomTooltip = ({ active, payload, label }) => {
|
|
689
|
+
if (active && payload && payload.length) {
|
|
690
|
+
return (
|
|
691
|
+
<div className="custom-tooltip">
|
|
692
|
+
<p className="label">{label}</p>
|
|
693
|
+
{payload.map((entry, index) => (
|
|
694
|
+
<p key={index} style={{ color: entry.color }}>
|
|
695
|
+
{entry.name}: {entry.value}
|
|
696
|
+
</p>
|
|
697
|
+
))}
|
|
698
|
+
</div>
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
return null;
|
|
702
|
+
};
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
### Legend
|
|
706
|
+
|
|
707
|
+
Series identification.
|
|
708
|
+
|
|
709
|
+
```jsx
|
|
710
|
+
<Legend
|
|
711
|
+
layout="horizontal" // "horizontal" | "vertical"
|
|
712
|
+
align="center" // "left" | "center" | "right"
|
|
713
|
+
verticalAlign="bottom" // "top" | "middle" | "bottom"
|
|
714
|
+
iconType="line" // "line" | "square" | "rect" | "circle" | "cross" | "diamond" | "star" | "triangle" | "wye"
|
|
715
|
+
iconSize={14}
|
|
716
|
+
content={element|func} // Custom content
|
|
717
|
+
payload={array} // Custom data
|
|
718
|
+
wrapperStyle={object}
|
|
719
|
+
chartWidth={number}
|
|
720
|
+
chartHeight={number}
|
|
721
|
+
onClick={func}
|
|
722
|
+
onMouseEnter={func}
|
|
723
|
+
onMouseLeave={func}
|
|
724
|
+
/>
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
**Custom Legend**:
|
|
728
|
+
```jsx
|
|
729
|
+
const CustomLegend = ({ payload }) => (
|
|
730
|
+
<ul>
|
|
731
|
+
{payload.map((entry, index) => (
|
|
732
|
+
<li key={`item-${index}`} style={{ color: entry.color }}>
|
|
733
|
+
{entry.value}
|
|
734
|
+
</li>
|
|
735
|
+
))}
|
|
736
|
+
</ul>
|
|
737
|
+
);
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
### Label
|
|
741
|
+
|
|
742
|
+
Individual data point label.
|
|
743
|
+
|
|
744
|
+
```jsx
|
|
745
|
+
<Label
|
|
746
|
+
value="Text" // Label text
|
|
747
|
+
position="top" // "top" | "left" | "right" | "bottom" | "inside" | "outside" | "center"
|
|
748
|
+
offset={5} // Distance from element
|
|
749
|
+
fill="#666"
|
|
750
|
+
fontSize={12}
|
|
751
|
+
formatter={func}
|
|
752
|
+
/>
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
### LabelList
|
|
756
|
+
|
|
757
|
+
List of labels for data series.
|
|
758
|
+
|
|
759
|
+
```jsx
|
|
760
|
+
<LabelList
|
|
761
|
+
dataKey="value" // Property for label text
|
|
762
|
+
position="top" // Label position
|
|
763
|
+
offset={10}
|
|
764
|
+
fill="#666"
|
|
765
|
+
fontSize={12}
|
|
766
|
+
formatter={func} // Format function
|
|
767
|
+
content={element|func} // Custom label
|
|
768
|
+
/>
|
|
769
|
+
|
|
770
|
+
// Usage within series
|
|
771
|
+
<Bar dataKey="sales">
|
|
772
|
+
<LabelList dataKey="sales" position="top" />
|
|
773
|
+
</Bar>
|
|
774
|
+
```
|
|
775
|
+
|
|
776
|
+
### Cell (DEPRECATED - removed in Recharts 4.0)
|
|
777
|
+
|
|
778
|
+
**Do not use in new code.** Use the `shape` prop on `Bar`, `Pie`, `Scatter`, etc. instead.
|
|
779
|
+
|
|
780
|
+
```jsx
|
|
781
|
+
// OLD (deprecated):
|
|
782
|
+
{data.map((entry, index) => (
|
|
783
|
+
<Cell key={`cell-${index}`} fill={colors[index]} />
|
|
784
|
+
))}
|
|
785
|
+
|
|
786
|
+
// NEW (use shape prop):
|
|
787
|
+
<Bar dataKey="sales" shape={(props) => <Rectangle {...props} fill={colors[props.index]} />} />
|
|
788
|
+
<Pie dataKey="value" shape={(props) => <Sector {...props} fill={colors[props.index]} />} />
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
### Text
|
|
792
|
+
|
|
793
|
+
SVG text element.
|
|
794
|
+
|
|
795
|
+
```jsx
|
|
796
|
+
<Text
|
|
797
|
+
x={number}
|
|
798
|
+
y={number}
|
|
799
|
+
textAnchor="start" // "start" | "middle" | "end"
|
|
800
|
+
width={number} // Max width for wrapping
|
|
801
|
+
scaleToFit={false} // Scale text to fit width
|
|
802
|
+
angle={0} // Rotation
|
|
803
|
+
lineHeight={string} // Line height for multi-line
|
|
804
|
+
capHeight={string} // Capital letter height
|
|
805
|
+
fill="#666"
|
|
806
|
+
fontSize={14}
|
|
807
|
+
>
|
|
808
|
+
Text content
|
|
809
|
+
</Text>
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
### Customized
|
|
813
|
+
|
|
814
|
+
Custom SVG elements with chart context.
|
|
815
|
+
|
|
816
|
+
```jsx
|
|
817
|
+
<Customized component={<CustomComponent />} />
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
### Layer
|
|
821
|
+
|
|
822
|
+
SVG group element.
|
|
823
|
+
|
|
824
|
+
```jsx
|
|
825
|
+
<Layer x={0} y={0} className={string}>
|
|
826
|
+
{/* SVG elements */}
|
|
827
|
+
</Layer>
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
## Hooks
|
|
831
|
+
|
|
832
|
+
### useIsTooltipActive
|
|
833
|
+
|
|
834
|
+
```jsx
|
|
835
|
+
const isActive = useIsTooltipActive();
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
Returns boolean indicating if tooltip is currently active.
|
|
839
|
+
|
|
840
|
+
### useActiveTooltipCoordinate
|
|
841
|
+
|
|
842
|
+
```jsx
|
|
843
|
+
const coordinate = useActiveTooltipCoordinate();
|
|
844
|
+
// { x: number, y: number }
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
Returns coordinate of active tooltip.
|
|
848
|
+
|
|
849
|
+
### useActiveTooltipDataPoints
|
|
850
|
+
|
|
851
|
+
```jsx
|
|
852
|
+
const dataPoints = useActiveTooltipDataPoints();
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
Returns data points at active tooltip position.
|
|
856
|
+
|
|
857
|
+
### useActiveTooltipLabel
|
|
858
|
+
|
|
859
|
+
```jsx
|
|
860
|
+
const label = useActiveTooltipLabel();
|
|
861
|
+
```
|
|
862
|
+
|
|
863
|
+
Returns label of active tooltip.
|
|
864
|
+
|
|
865
|
+
### useCartesianScale
|
|
866
|
+
|
|
867
|
+
```jsx
|
|
868
|
+
const scale = useCartesianScale();
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
Returns Cartesian coordinate scale information.
|
|
872
|
+
|
|
873
|
+
### useXAxisScale / useYAxisScale
|
|
874
|
+
|
|
875
|
+
```jsx
|
|
876
|
+
const xScale = useXAxisScale(xAxisId);
|
|
877
|
+
const yScale = useYAxisScale(yAxisId);
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
Returns specific axis scale (data values to pixel coordinates).
|
|
881
|
+
|
|
882
|
+
### useXAxisInverseScale / useYAxisInverseScale
|
|
883
|
+
|
|
884
|
+
```jsx
|
|
885
|
+
const xInverse = useXAxisInverseScale(xAxisId);
|
|
886
|
+
const yInverse = useYAxisInverseScale(yAxisId);
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
Returns inverse scale (pixel coordinates to data values).
|
|
890
|
+
|
|
891
|
+
### useXAxisInverseDataSnapScale / useYAxisInverseDataSnapScale
|
|
892
|
+
|
|
893
|
+
```jsx
|
|
894
|
+
const xSnap = useXAxisInverseDataSnapScale(xAxisId);
|
|
895
|
+
const ySnap = useYAxisInverseDataSnapScale(yAxisId);
|
|
896
|
+
```
|
|
897
|
+
|
|
898
|
+
Returns inverse scale that snaps to nearest data point.
|
|
899
|
+
|
|
900
|
+
### useXAxisInverseTickSnapScale / useYAxisInverseTickSnapScale
|
|
901
|
+
|
|
902
|
+
```jsx
|
|
903
|
+
const xTickSnap = useXAxisInverseTickSnapScale(xAxisId);
|
|
904
|
+
const yTickSnap = useYAxisInverseTickSnapScale(yAxisId);
|
|
905
|
+
```
|
|
906
|
+
|
|
907
|
+
Returns inverse scale that snaps to nearest tick value.
|
|
908
|
+
|
|
909
|
+
### useXAxisDomain / useYAxisDomain
|
|
910
|
+
|
|
911
|
+
```jsx
|
|
912
|
+
const xDomain = useXAxisDomain(xAxisId);
|
|
913
|
+
const yDomain = useYAxisDomain(yAxisId);
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
Returns axis domain.
|
|
917
|
+
|
|
918
|
+
### useXAxisTicks / useYAxisTicks
|
|
919
|
+
|
|
920
|
+
```jsx
|
|
921
|
+
const xTicks = useXAxisTicks(xAxisId);
|
|
922
|
+
const yTicks = useYAxisTicks(yAxisId);
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
Returns axis tick information.
|
|
926
|
+
|
|
927
|
+
### useMargin
|
|
928
|
+
|
|
929
|
+
```jsx
|
|
930
|
+
const margin = useMargin();
|
|
931
|
+
// { top, right, bottom, left }
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
Returns chart margin.
|
|
935
|
+
|
|
936
|
+
### useOffset
|
|
937
|
+
|
|
938
|
+
```jsx
|
|
939
|
+
const offset = useOffset();
|
|
940
|
+
// { top, left }
|
|
941
|
+
```
|
|
942
|
+
|
|
943
|
+
Returns chart offset.
|
|
944
|
+
|
|
945
|
+
### usePlotArea
|
|
946
|
+
|
|
947
|
+
```jsx
|
|
948
|
+
const plotArea = usePlotArea();
|
|
949
|
+
// { x, y, width, height }
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
Returns plot area dimensions.
|
|
953
|
+
|
|
954
|
+
### useChartWidth / useChartHeight
|
|
955
|
+
|
|
956
|
+
```jsx
|
|
957
|
+
const width = useChartWidth();
|
|
958
|
+
const height = useChartHeight();
|
|
959
|
+
```
|
|
960
|
+
|
|
961
|
+
Returns chart dimensions.
|
|
962
|
+
|
|
963
|
+
## Shapes
|
|
964
|
+
|
|
965
|
+
### Rectangle
|
|
966
|
+
|
|
967
|
+
```jsx
|
|
968
|
+
<Rectangle
|
|
969
|
+
x={number}
|
|
970
|
+
y={number}
|
|
971
|
+
width={number}
|
|
972
|
+
height={number}
|
|
973
|
+
radius={[tl, tr, br, bl]}
|
|
974
|
+
fill="none"
|
|
975
|
+
stroke="#000"
|
|
976
|
+
strokeWidth={1}
|
|
977
|
+
/>
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
### Circle / Dot
|
|
981
|
+
|
|
982
|
+
```jsx
|
|
983
|
+
<Dot
|
|
984
|
+
cx={number}
|
|
985
|
+
cy={number}
|
|
986
|
+
r={number}
|
|
987
|
+
fill="#8884d8"
|
|
988
|
+
stroke="#8884d8"
|
|
989
|
+
strokeWidth={1}
|
|
990
|
+
/>
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
### Sector
|
|
994
|
+
|
|
995
|
+
```jsx
|
|
996
|
+
<Sector
|
|
997
|
+
cx={number}
|
|
998
|
+
cy={number}
|
|
999
|
+
innerRadius={number}
|
|
1000
|
+
outerRadius={number}
|
|
1001
|
+
startAngle={number}
|
|
1002
|
+
endAngle={number}
|
|
1003
|
+
fill="#8884d8"
|
|
1004
|
+
/>
|
|
1005
|
+
```
|
|
1006
|
+
|
|
1007
|
+
### Symbols
|
|
1008
|
+
|
|
1009
|
+
```jsx
|
|
1010
|
+
<Symbols
|
|
1011
|
+
cx={number}
|
|
1012
|
+
cy={number}
|
|
1013
|
+
size={number}
|
|
1014
|
+
type="circle" // "circle" | "cross" | "diamond" | "square" | "star" | "triangle" | "wye"
|
|
1015
|
+
fill="#8884d8"
|
|
1016
|
+
/>
|
|
1017
|
+
```
|
|
1018
|
+
|
|
1019
|
+
### Polygon
|
|
1020
|
+
|
|
1021
|
+
```jsx
|
|
1022
|
+
<Polygon
|
|
1023
|
+
points={[{x, y}, ...]}
|
|
1024
|
+
fill="none"
|
|
1025
|
+
stroke="#000"
|
|
1026
|
+
/>
|
|
1027
|
+
```
|
|
1028
|
+
|
|
1029
|
+
### Curve
|
|
1030
|
+
|
|
1031
|
+
```jsx
|
|
1032
|
+
<Curve
|
|
1033
|
+
type="monotone"
|
|
1034
|
+
points={[{x, y}, ...]}
|
|
1035
|
+
stroke="#8884d8"
|
|
1036
|
+
fill="none"
|
|
1037
|
+
/>
|
|
1038
|
+
```
|
|
1039
|
+
|
|
1040
|
+
### Cross
|
|
1041
|
+
|
|
1042
|
+
```jsx
|
|
1043
|
+
<Cross
|
|
1044
|
+
x={number}
|
|
1045
|
+
y={number}
|
|
1046
|
+
width={number}
|
|
1047
|
+
height={number}
|
|
1048
|
+
stroke="#000"
|
|
1049
|
+
/>
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
### Trapezoid
|
|
1053
|
+
|
|
1054
|
+
```jsx
|
|
1055
|
+
<Trapezoid
|
|
1056
|
+
x={number}
|
|
1057
|
+
y={number}
|
|
1058
|
+
upperWidth={number}
|
|
1059
|
+
lowerWidth={number}
|
|
1060
|
+
height={number}
|
|
1061
|
+
fill="#8884d8"
|
|
1062
|
+
/>
|
|
1063
|
+
```
|
|
1064
|
+
|
|
1065
|
+
## Utility Functions
|
|
1066
|
+
|
|
1067
|
+
### getNiceTickValues
|
|
1068
|
+
|
|
1069
|
+
Generate nice axis tick values.
|
|
1070
|
+
|
|
1071
|
+
```jsx
|
|
1072
|
+
import { getNiceTickValues } from 'recharts';
|
|
1073
|
+
|
|
1074
|
+
const ticks = getNiceTickValues([0, 100], 5);
|
|
1075
|
+
// [0, 20, 40, 60, 80, 100]
|
|
1076
|
+
```
|
|
1077
|
+
|
|
1078
|
+
### getRelativeCoordinate
|
|
1079
|
+
|
|
1080
|
+
Convert screen coordinates to chart coordinates.
|
|
1081
|
+
|
|
1082
|
+
```jsx
|
|
1083
|
+
import { getRelativeCoordinate } from 'recharts';
|
|
1084
|
+
|
|
1085
|
+
const chartPoint = getRelativeCoordinate(event, chartContainer);
|
|
1086
|
+
// { x, y }
|
|
1087
|
+
```
|
|
1088
|
+
|
|
1089
|
+
## Global Configuration
|
|
1090
|
+
|
|
1091
|
+
### RechartsGlobal
|
|
1092
|
+
|
|
1093
|
+
Configure global defaults.
|
|
1094
|
+
|
|
1095
|
+
```jsx
|
|
1096
|
+
import { Global } from 'recharts';
|
|
1097
|
+
|
|
1098
|
+
<Global
|
|
1099
|
+
isSsrMode={false} // Server-side rendering mode
|
|
1100
|
+
/>
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1103
|
+
## Z-Index and Layering
|
|
1104
|
+
|
|
1105
|
+
### ZIndexLayer
|
|
1106
|
+
|
|
1107
|
+
```jsx
|
|
1108
|
+
<ZIndexLayer zIndex={number}>
|
|
1109
|
+
{/* Components at this z-index */}
|
|
1110
|
+
</ZIndexLayer>
|
|
1111
|
+
```
|
|
1112
|
+
|
|
1113
|
+
### Default Z-Index Values
|
|
1114
|
+
|
|
1115
|
+
Default layer ordering:
|
|
1116
|
+
- Grid: 0
|
|
1117
|
+
- Axes: 1
|
|
1118
|
+
- Chart elements: 2
|
|
1119
|
+
- Tooltip/Legend: 5
|
|
1120
|
+
|
|
1121
|
+
Use `isFront` prop on reference elements to render above chart.
|