Skip to content
Draft
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
._*
Pods
.DS_Store
node_modules/
*.lock
build/
*.log
.gradle/
local.properties
_codeql_detected_source_root
6 changes: 3 additions & 3 deletions NativeChart/NativeChart.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Pod::Spec.new do |s|
s.license = "MIT"
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
s.authors = { "Yiheng Quan" => "development.henryquan@gmail.com" }
s.platforms = { :ios => "9.0" }
s.platforms = { :ios => "15.0" }
s.source = { :git => "https://github.com/HenryQuan/native-chart-experiment.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,swift}"
s.requires_arc = true

s.swift_version = '5.0'
s.dependency "React"
s.swift_version = '6.0'
s.dependency "React-Core"
s.dependency "Charts"
end

18 changes: 13 additions & 5 deletions NativeChart/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
# Native Chart Experiment
Please use [react-native-charts-wrapper](https://github.com/wuxudong/react-native-charts-wrapper) whenever possible. This is only meant to use with my app, [WoWs Info](https://github.com/HenryQuan/WoWs-Info-Re).

## Requirements

- React Native 0.80+ (with new architecture support)
- iOS 15.0+
- Swift 6.0+
- Android SDK 24+ (Android 7.0+)
- Kotlin 2.1+

## Getting started

`$ npm install react-native-native-chart --save`
`$ npm install native-chart-experiment --save`

### Mostly automatic installation
### Automatic installation

`$ react-native link react-native-native-chart`
With React Native 0.60+, the module is automatically linked. No manual linking is required.

This is not needed for React Native 0.60+. **Please create a swift file inside your main IOS project in order to have a bridging header.**
**For iOS**: Run `pod install` in the `ios` directory after installation.

# API
Comming soon...
Coming soon...

# Screenshots
<img src="https://github.com/HenryQuan/native-chart-experiment/blob/master/screenshots/ios.png?raw=true" width="250px" height="500px" />
Expand Down
125 changes: 0 additions & 125 deletions NativeChart/android/build.gradle

This file was deleted.

56 changes: 56 additions & 0 deletions NativeChart/android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// android/build.gradle.kts

// Modern build configuration for React Native 0.83+

val DEFAULT_COMPILE_SDK_VERSION = 35
val DEFAULT_MIN_SDK_VERSION = 24
val DEFAULT_TARGET_SDK_VERSION = 35

fun safeExtGet(prop: String, fallback: Any): Any {
return rootProject.extra.takeIf { it.has(prop) }?.get(prop) ?: fallback
}

plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("maven-publish")
}

android {
compileSdk = (safeExtGet("compileSdkVersion", DEFAULT_COMPILE_SDK_VERSION) as Int)

defaultConfig {
minSdk = (safeExtGet("minSdkVersion", DEFAULT_MIN_SDK_VERSION) as Int)
targetSdk = (safeExtGet("targetSdkVersion", DEFAULT_TARGET_SDK_VERSION) as Int)
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "17"
}

lint {
abortOnError = false
}

namespace = "org.github.henryquan.nativechart"
}

repositories {
mavenLocal()
google()
mavenCentral()
maven {
url = uri("https://jitpack.io")
}
}

dependencies {
implementation("com.facebook.react:react-android")
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
}
Empty file modified NativeChart/android/gradlew
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions NativeChart/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.github.henryquan.nativechart">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
8 changes: 4 additions & 4 deletions NativeChart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"license": "MIT",
"licenseFilename": "LICENSE",
"peerDependencies": {
"react": "^16.8.1",
"react-native": ">=0.59.0-rc.0 <1.0.x"
"react": "^18.2.0",
"react-native": ">=0.80.0"
},
"devDependencies": {
"react": "^16.8.3",
"react-native": "^0.59.10"
"react": "^18.3.1",
"react-native": "^0.80.0"
},
"bugs": {
"url": "https://github.com/HenryQuan/native-chart-experiment/issues"
Expand Down
6 changes: 0 additions & 6 deletions NativeChartExample/.buckconfig

This file was deleted.

75 changes: 0 additions & 75 deletions NativeChartExample/.flowconfig

This file was deleted.

Loading