Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
/Package.swift export-ignore
# Keep the Composer dist archive limited to runtime files:
# README, LICENSE, CHANGELOG, composer.json, nativephp.json, config, resources and src.
/.build export-ignore
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/CODE_OF_CONDUCT.md export-ignore
/CONTRIBUTING.md export-ignore
/docs export-ignore
/Package.swift export-ignore
/phpunit.xml export-ignore
/resources/ios/.build export-ignore
/resources/ios/Tests export-ignore
/resources/ios/TestSupport export-ignore
/SECURITY.md export-ignore
/tests export-ignore
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
- type: markdown
attributes:
value: |
Thanks for helping improve NativePHP Charts. Do not report security vulnerabilities here; follow the private reporting instructions in the README instead.
Thanks for helping improve NativePHP Charts. Do not report security vulnerabilities here; follow the private reporting instructions in SECURITY.md instead.

- type: textarea
id: description
Expand Down Expand Up @@ -146,5 +146,5 @@ body:
required: true
- label: I removed secrets, tokens, and private data from logs and examples.
required: true
- label: This report is not a security vulnerability; security reports must follow the README instructions.
- label: This report is not a security vulnerability; security reports must follow SECURITY.md.
required: true
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/donmanueldev/nativephp-charts#security-and-privacy
about: Follow the private reporting instructions in the security and privacy section.
url: https://github.com/donmanueldev/nativephp-charts/security/policy
about: Report vulnerabilities privately as described in the security policy. Do not open a public issue.
- name: Documentation
url: https://donmanueldev.github.io/nativephp-charts/
about: Chart guides, the API reference, and troubleshooting steps.
82 changes: 82 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Feature request
description: Suggest a new chart type, option, or improvement for NativePHP Charts
title: "[Feature]: "
labels:
- enhancement
body:
- type: markdown
attributes:
value: |
Thanks for suggesting an improvement. Check the [documentation](https://donmanueldev.github.io/nativephp-charts/) and existing issues first; the option you need may already exist.

- type: textarea
id: problem
attributes:
label: Problem
description: What are you trying to show or do in your app, and what stops you today?
placeholder: My budget screen needs to show... but the current charts cannot...
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposed solution
description: Describe the behavior you would like. If you have an API in mind, include the Blade attributes or fluent PHP methods you would expect.
render: blade
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Workarounds you tried, or other ways to solve the problem.

- type: dropdown
id: chart
attributes:
label: Related chart component
options:
- LineChart
- AreaChart
- BarChart
- ScatterChart
- PieChart
- DonutChart
- RadarChart
- CandlestickChart
- ProgressChart
- ContributionHeatmap
- New chart type
- All charts
validations:
required: true

- type: dropdown
id: platform
attributes:
label: Platform
description: Features should work on both platforms. Tell us if the need is specific to one.
options:
- Both platforms
- Android
- iOS
validations:
required: true

- type: textarea
id: context
attributes:
label: Additional context
description: Screenshots, mockups, or links to similar charts in native apps.

- type: checkboxes
id: checks
attributes:
label: Submission checklist
options:
- label: I searched existing issues and the documentation for this request.
required: true
- label: I would be willing to help test this feature on a device or simulator.
required: false
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,31 @@ jobs:

- name: Compile Swift renderers and run native tests
run: swift test

docs:
name: Documentation build
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up Bun
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
with:
bun-version: 1.3.14

- name: Install documentation dependencies
working-directory: docs
run: bun install --frozen-lockfile

- name: Check documentation
working-directory: docs
run: bun run check

- name: Build documentation
working-directory: docs
run: bun run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ resources/ios/.build/
*.iml
.vscode/
.playwright-mcp
.claude/
.remember/
42 changes: 41 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,45 @@ All notable changes to NativePHP Charts are documented here. The project follows

## [Unreleased]

## [1.3.0] - 2026-11-14

### Added

- The Blade `a11y-hint` attribute now reaches the native renderers, matching the fluent `a11yHint()` method.
- Contributing guide, code of conduct, feature request template, and a documentation build check on pull requests.
- Social preview image, canonical and Open Graph metadata, structured data, and `llms.txt` for the documentation site.

### Changed

- The Composer dist archive no longer ships the documentation site, tests, or CI configuration, reducing it from about 3.3 MB to about 220 KB.
- An explicit `null` for an optional axis key (`title`, `visible`, `labelCount`, `minimum`, `maximum`, `baseline`, `interval`, `beginAtZero`) now clears that option instead of raising a PHP warning or keeping the earlier value.
- Changing the x-axis `type` drops a previously configured `minimum`, `maximum`, `baseline`, and `interval`.
- Fluent `annotations()` and `viewport()` may be called before `xAxis()`; x-type errors are then reported when the axis is configured or the chart is rendered.
- Progress charts format the selection `localized_value` and Android labels with the chart `locale` and fraction-digit settings on both platforms.
- Progress charts with many rings scale ring width so every ring stays visible and tappable on both platforms, metrics beyond the fourth use the preset palette on iOS, legends longer than six metrics scroll within a fixed height, and the center label is hidden when the innermost ring leaves no room for it.
- Android progress legends show a color marker per metric, and iOS progress legends use the chart locale and fraction digits.
- Contribution heatmap month and weekday labels follow the chart `locale`; Android intensity scales to the largest visible value.
- Contribution heatmap days with a value of `0` use the empty color on iOS, matching Android, and a partial first month drops its label when it would overlap the next month's.
- Declared `nativephp/mobile-ui` as a dependency, since the native renderers use its font resolver, node, and color types.
- Android draws at most 100 ticks for an explicit axis `interval`, thinning denser intervals across the full domain.
- Rewrote the README and Laravel Boost guideline to cover all ten chart types, and converted documentation captures to WebP.

### Fixed

- Android contribution heatmaps without an `end-date` end on the device's local day instead of the UTC day, matching iOS.
- iOS horizontal bar charts render every category in source order, with ticks, annotations, tooltips, selection, and viewport gestures aligned to the bars.
- Charts no longer show or announce the empty state before their first load on iOS, and keep their size while loading on Android.
- Candlestick charts reject more than one series when `series` and `x-axis` are supplied together in Blade.
- Date-axis viewport ranges and `minimumSpan` no longer depend on the PHP default time zone.
- An unwritable payload directory raises the documented exception instead of silently writing to the system temporary directory, and abandoned temporary payload files are pruned.
- Callback expressions accept parentheses inside string arguments and reject non-finite numbers.
- Android tap, scrub, and viewport callbacks report current values after chart props change.
- Android tooltips wider than the plot no longer crash the draw pass, and Cartesian legend markers match per-series line and point colors.
- iOS candlestick tooltips show all four OHLC values, and tooltips near plot edges are no longer clipped.
- iOS contribution heatmaps without an `end-date` end on the device's current day, and keep weekday labels when the grid starts with blank cells.
- Contribution heatmaps no longer outline every blank day as selected while nothing is selected, and the selection outline of edge cells is no longer clipped.
- iOS progress and contribution heatmap charts paint the theme background, and progress center labels and legends use the theme foreground color, matching Android.

## [1.2.1] - 2026-10-01

### Fixed
Expand Down Expand Up @@ -95,7 +134,8 @@ All notable changes to NativePHP Charts are documented here. The project follows

- Initial native line chart component for NativePHP Mobile.

[Unreleased]: https://github.com/donmanueldev/nativephp-charts/compare/v1.2.1...HEAD
[Unreleased]: https://github.com/donmanueldev/nativephp-charts/compare/v1.3.0...HEAD
[1.3.0]: https://github.com/donmanueldev/nativephp-charts/compare/v1.2.1...v1.3.0
[1.2.0]: https://github.com/donmanueldev/nativephp-charts/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/donmanueldev/nativephp-charts/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/donmanueldev/nativephp-charts/compare/v0.2.0...v1.0.0
Expand Down
132 changes: 132 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
donmanuel@momotombo.dev.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
Loading
Loading