├── ruby-on-rails ├── log │ └── .keep ├── tmp │ ├── .keep │ ├── pids │ │ └── .keep │ └── storage │ │ └── .keep ├── storage │ └── .keep ├── vendor │ └── .keep ├── lib │ ├── assets │ │ └── .keep │ └── tasks │ │ └── .keep ├── public │ ├── favicon.ico │ ├── apple-touch-icon.png │ ├── apple-touch-icon-precomposed.png │ ├── robots.txt │ ├── 500.html │ ├── 422.html │ └── 404.html ├── test │ ├── helpers │ │ └── .keep │ ├── mailers │ │ └── .keep │ ├── models │ │ └── .keep │ ├── system │ │ └── .keep │ ├── controllers │ │ ├── .keep │ │ └── chart_controller_test.rb │ ├── integration │ │ └── .keep │ ├── fixtures │ │ └── files │ │ │ └── .keep │ ├── application_system_test_case.rb │ ├── channels │ │ └── application_cable │ │ │ └── connection_test.rb │ └── test_helper.rb ├── .ruby-version ├── app │ ├── models │ │ ├── concerns │ │ │ └── .keep │ │ └── application_record.rb │ ├── controllers │ │ ├── concerns │ │ │ └── .keep │ │ ├── chart_controller.rb │ │ └── application_controller.rb │ ├── views │ │ ├── layouts │ │ │ ├── mailer.text.erb │ │ │ ├── mailer.html.erb │ │ │ └── application.html.erb │ │ └── chart │ │ │ └── index.html.erb │ ├── helpers │ │ ├── chart_helper.rb │ │ └── application_helper.rb │ ├── assets │ │ ├── config │ │ │ └── manifest.js │ │ ├── images │ │ │ ├── tv_logo.png │ │ │ └── rails_logo.png │ │ ├── javascripts │ │ │ ├── application.js │ │ │ └── tv-chart-widget-init.js │ │ └── stylesheets │ │ │ ├── application.css │ │ │ └── chart.scss │ ├── channels │ │ └── application_cable │ │ │ ├── channel.rb │ │ │ └── connection.rb │ ├── mailers │ │ └── application_mailer.rb │ └── jobs │ │ └── application_job.rb ├── bin │ ├── rake │ ├── rails │ └── setup ├── config │ ├── environment.rb │ ├── boot.rb │ ├── cable.yml │ ├── routes.rb │ ├── initializers │ │ ├── filter_parameter_logging.rb │ │ ├── permissions_policy.rb │ │ ├── assets.rb │ │ ├── inflections.rb │ │ └── content_security_policy.rb │ ├── database.yml │ ├── application.rb │ ├── locales │ │ └── en.yml │ ├── storage.yml │ └── puma.rb ├── config.ru ├── Rakefile ├── .gitattributes ├── db │ └── seeds.rb ├── copy_charting_library_files.sh └── .gitignore ├── .gitignore ├── angular ├── src │ ├── assets │ │ └── .gitkeep │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── tv-chart-container │ │ │ ├── tv-chart-container.component.css │ │ │ ├── tv-chart-container.component.html │ │ │ └── tv-chart-container.component.spec.ts │ │ ├── app-header │ │ │ ├── app-header.component.html │ │ │ ├── app-header.component.css │ │ │ ├── app-header.component.ts │ │ │ └── app-header.component.spec.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ └── app.component.spec.ts │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── styles.css │ ├── index.html │ ├── main.ts │ └── test.ts ├── .vscode │ ├── extensions.json │ ├── launch.json │ └── tasks.json ├── .editorconfig ├── tsconfig.app.json ├── tsconfig.spec.json ├── copy_charting_library_files.sh ├── .gitignore ├── tsconfig.json ├── .browserslistrc ├── package.json ├── karma.conf.js └── README.md ├── android ├── app │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── assets │ │ │ └── charting_library │ │ │ │ └── put-charting-library-here │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── tradingview │ │ │ │ └── android │ │ │ │ └── JSApplicationBridge.kt │ │ │ └── AndroidManifest.xml │ ├── proguard-rules.pro │ └── build.gradle.kts ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore ├── copy_charting_library_files.sh ├── libs.versions.toml ├── settings.gradle.kts ├── gradle.properties └── README.md ├── react-native ├── .node-version ├── .watchmanconfig ├── .ruby-version ├── .gitattributes ├── ios │ ├── charting_library │ │ └── place-charting-library-here │ ├── ChartingLibraryExample │ │ ├── Images.xcassets │ │ │ ├── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── AppDelegate.h │ │ ├── main.m │ │ ├── AppDelegate.mm │ │ └── Info.plist │ ├── ChartingLibraryExample.xcodeproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── ChartingLibraryExample.xcworkspace │ │ └── contents.xcworkspacedata │ ├── .xcode.env │ ├── ChartingLibraryExampleTests │ │ ├── Info.plist │ │ └── ChartingLibraryExampleTests.m │ └── Podfile ├── android │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── assets │ │ │ │ │ ├── place-charting-library-here │ │ │ │ │ └── index.html │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── drawable │ │ │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── chartinglibraryexample │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── release │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── chartinglibraryexample │ │ │ │ └── ReactNativeFlipper.java │ │ ├── debug.keystore │ │ └── proguard-rules.pro │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ ├── build.gradle │ └── gradle.properties ├── .bundle │ └── config ├── tsconfig.json ├── .eslintrc.js ├── app.json ├── babel.config.js ├── .prettierrc.js ├── Gemfile ├── index.js ├── __tests__ │ └── App-test.tsx ├── metro.config.js ├── App.tsx ├── package.json └── .gitignore ├── vuejs ├── public │ ├── put-datafeeds-here │ ├── put-charting-library-here │ └── index.html ├── .eslintignore ├── src │ ├── style.css │ ├── main.js │ └── App.vue ├── vite.config.js ├── index.html ├── package.json ├── .gitignore ├── copy_charting_library_files.sh └── README.md ├── vuejs3 ├── public │ ├── put-datafeeds-here │ └── put-charting-library-here ├── src │ ├── style.css │ ├── main.js │ └── App.vue ├── vite.config.js ├── index.html ├── package.json ├── .gitignore ├── copy_charting_library_files.sh └── README.md ├── nextjs-javascript ├── public │ └── static │ │ └── .gitkeep ├── .gitignore ├── components │ └── TVChartContainer │ │ └── index.module.css ├── package.json ├── pages │ ├── index.js │ └── _document.js ├── copy_charting_library_files.sh └── README.md ├── react-javascript ├── public │ ├── put-datafeeds-here │ ├── put-charting-library-here │ └── index.html ├── src │ ├── index.css │ ├── components │ │ └── TVChartContainer │ │ │ └── index.css │ ├── index.js │ ├── App.css │ └── App.jsx ├── .gitignore ├── package.json ├── tsconfig.json ├── copy_charting_library_files.sh ├── browserslist └── README.md ├── react-typescript ├── public │ ├── put-datafeeds-here │ ├── put-charting-library-here │ └── index.html ├── src │ ├── put-charting-library-here │ ├── setupTests.ts │ ├── index.css │ ├── components │ │ └── TVChartContainer │ │ │ └── index.css │ ├── App.test.tsx │ ├── index.tsx │ ├── App.css │ └── App.tsx ├── tsconfig.test.json ├── .gitignore ├── package.json ├── tsconfig.json ├── copy_charting_library_files.sh ├── browserslist └── README.md ├── solidjs-typescript ├── public │ ├── put-datafeeds-here │ ├── put-charting-library-here │ └── index.html ├── src │ ├── put-charting-library-here │ ├── components │ │ └── TVChartContainer │ │ │ └── index.module.css │ ├── index.module.css │ ├── index.tsx │ ├── App.module.css │ └── App.tsx ├── .babelrc ├── .gitignore ├── package.json ├── tsconfig.json ├── vite.config.ts ├── index.html ├── copy_charting_library_files.sh ├── browserslist └── README.md ├── nextjs ├── styles │ └── globals.css ├── next.config.js ├── .gitignore ├── pages │ ├── _app.tsx │ ├── _document.tsx │ └── index.tsx ├── next-env.d.ts ├── components │ └── TVChartContainer │ │ ├── index.module.css │ │ └── index.tsx ├── package.json ├── tsconfig.json ├── copy_charting_library_files.sh └── README.md ├── ios-swift ├── .gitignore ├── App │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── AppDelegate.swift ├── Example.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcuserdata │ │ │ └── admin.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── admin.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── README.md ├── sveltekit ├── .npmrc ├── src │ ├── lib │ │ └── index.js │ ├── app.html │ ├── routes │ │ └── +page.svelte │ └── components │ │ └── TVChartContainer.svelte ├── static │ └── favicon.png ├── vite.config.js ├── .gitignore ├── package.json ├── svelte.config.js ├── copy_charting_library_files.sh └── README.md ├── nuxtjs ├── pages │ └── index.vue ├── .gitignore ├── plugins │ └── TVChart.js ├── package.json ├── copy_charting_library_files.sh ├── nuxt.config.js ├── layouts │ └── default.vue └── README.md ├── nuxtjs3 ├── app.vue ├── tsconfig.json ├── .gitignore ├── package.json ├── plugins │ └── TVChart.js ├── copy_charting_library_files.sh ├── nuxt.config.ts └── README.md ├── .github └── ISSUE_TEMPLATE │ ├── new-example.md │ └── bug_report.md ├── PULL_REQUEST_TEMPLATE.md ├── CONTRIBUTING.md └── LICENSE /ruby-on-rails/log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/tmp/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /angular/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/storage/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/tmp/pids/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/vendor/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /angular/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-native/.node-version: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /react-native/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /ruby-on-rails/lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/test/system/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/tmp/storage/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vuejs/public/put-datafeeds-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vuejs3/public/put-datafeeds-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-native/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /ruby-on-rails/test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vuejs/public/put-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nextjs-javascript/public/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-javascript/public/put-datafeeds-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-typescript/public/put-datafeeds-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/.ruby-version: -------------------------------------------------------------------------------- 1 | ruby-3.0.3 2 | -------------------------------------------------------------------------------- /ruby-on-rails/app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/public/apple-touch-icon.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/test/fixtures/files/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vuejs/.eslintignore: -------------------------------------------------------------------------------- 1 | public/charting_library/ -------------------------------------------------------------------------------- /vuejs3/public/put-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-native/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /react-typescript/src/put-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /solidjs-typescript/public/put-datafeeds-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /solidjs-typescript/src/put-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-javascript/public/put-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-typescript/public/put-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /solidjs-typescript/public/put-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nextjs/styles/globals.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | } 4 | -------------------------------------------------------------------------------- /react-native/ios/charting_library/place-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios-swift/.gitignore: -------------------------------------------------------------------------------- 1 | *.xcuserstate 2 | App/ChartingLibrary/* 3 | -------------------------------------------------------------------------------- /react-native/android/app/src/main/assets/place-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /solidjs-typescript/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["solid"] 3 | } 4 | -------------------------------------------------------------------------------- /sveltekit/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | resolution-mode=highest 3 | -------------------------------------------------------------------------------- /android/app/src/main/assets/charting_library/put-charting-library-here: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ruby-on-rails/app/helpers/chart_helper.rb: -------------------------------------------------------------------------------- 1 | module ChartHelper 2 | end 3 | -------------------------------------------------------------------------------- /react-typescript/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | global.window = {}; 3 | -------------------------------------------------------------------------------- /nuxtjs/pages/index.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /ruby-on-rails/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /react-native/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/react-native/tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /nuxtjs/.gitignore: -------------------------------------------------------------------------------- 1 | .nuxt/ 2 | dist/ 3 | node_modules/ 4 | static/charting_library/ 5 | static/datafeeds/ -------------------------------------------------------------------------------- /nuxtjs3/app.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /vuejs/src/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /vuejs3/src/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /angular/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /ruby-on-rails/app/controllers/chart_controller.rb: -------------------------------------------------------------------------------- 1 | class ChartController < ApplicationController 2 | end 3 | -------------------------------------------------------------------------------- /sveltekit/src/lib/index.js: -------------------------------------------------------------------------------- 1 | // place files you want to import through the `$lib` alias in this folder. 2 | -------------------------------------------------------------------------------- /react-javascript/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /react-typescript/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /angular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /react-native/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /react-native/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ChartingLibraryExample", 3 | "displayName": "ChartingLibraryExample" 4 | } -------------------------------------------------------------------------------- /react-native/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /angular/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/angular/src/favicon.ico -------------------------------------------------------------------------------- /react-javascript/src/components/TVChartContainer/index.css: -------------------------------------------------------------------------------- 1 | .TVChartContainer { 2 | height: calc(100vh - 80px); 3 | } 4 | -------------------------------------------------------------------------------- /react-typescript/src/components/TVChartContainer/index.css: -------------------------------------------------------------------------------- 1 | .TVChartContainer { 2 | height: calc(100vh - 80px); 3 | } 4 | -------------------------------------------------------------------------------- /ruby-on-rails/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | end 3 | -------------------------------------------------------------------------------- /ios-swift/App/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ruby-on-rails/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative "../config/boot" 3 | require "rake" 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /nuxtjs3/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://nuxt.com/docs/guide/concepts/typescript 3 | "extends": "./.nuxt/tsconfig.json" 4 | } 5 | -------------------------------------------------------------------------------- /ruby-on-rails/app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | primary_abstract_class 3 | end 4 | -------------------------------------------------------------------------------- /solidjs-typescript/src/components/TVChartContainer/index.module.css: -------------------------------------------------------------------------------- 1 | .TVChartContainer { 2 | height: calc(100vh - 80px); 3 | } 4 | -------------------------------------------------------------------------------- /solidjs-typescript/src/index.module.css: -------------------------------------------------------------------------------- 1 | .body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /sveltekit/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/sveltekit/static/favicon.png -------------------------------------------------------------------------------- /angular/src/app/tv-chart-container/tv-chart-container.component.css: -------------------------------------------------------------------------------- 1 | .app-tv-chart-container { 2 | height: calc(100vh - 80px); 3 | } 4 | -------------------------------------------------------------------------------- /react-typescript/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "jsx": "react" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ruby-on-rails/public/robots.txt: -------------------------------------------------------------------------------- 1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TradingViewAndroidExample 3 | 4 | -------------------------------------------------------------------------------- /angular/src/app/tv-chart-container/tv-chart-container.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /angular/src/app/app-header/app-header.component.html: -------------------------------------------------------------------------------- 1 |
2 |

{{ title }}

3 |
4 | -------------------------------------------------------------------------------- /react-javascript/.gitignore: -------------------------------------------------------------------------------- 1 | public/charting_library/ 2 | public/datafeeds/ 3 | src/charting_library/ 4 | node_modules/ 5 | static/ 6 | build/ 7 | -------------------------------------------------------------------------------- /react-typescript/.gitignore: -------------------------------------------------------------------------------- 1 | public/charting_library/ 2 | public/datafeeds/ 3 | src/charting_library/ 4 | node_modules/ 5 | static/ 6 | build/ 7 | -------------------------------------------------------------------------------- /solidjs-typescript/.gitignore: -------------------------------------------------------------------------------- 1 | public/charting_library/ 2 | public/datafeeds/ 3 | src/charting_library/ 4 | node_modules/ 5 | static/ 6 | build/ 7 | -------------------------------------------------------------------------------- /react-native/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/debug.keystore -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ChartingLibraryExample 3 | 4 | -------------------------------------------------------------------------------- /ruby-on-rails/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../javascripts .js 3 | //= link_directory ../stylesheets .css -------------------------------------------------------------------------------- /ruby-on-rails/app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /vuejs3/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import './style.css' 3 | import App from './App.vue' 4 | 5 | createApp(App).mount('#app') 6 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /vuejs/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue2' 3 | 4 | export default { 5 | plugins: [vue()] 6 | } 7 | -------------------------------------------------------------------------------- /ruby-on-rails/app/assets/images/tv_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/ruby-on-rails/app/assets/images/tv_logo.png -------------------------------------------------------------------------------- /ruby-on-rails/app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /nextjs/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | }; 5 | 6 | module.exports = nextConfig; 7 | -------------------------------------------------------------------------------- /ruby-on-rails/app/assets/images/rails_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/ruby-on-rails/app/assets/images/rails_logo.png -------------------------------------------------------------------------------- /ruby-on-rails/app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "from@example.com" 3 | layout "mailer" 4 | end 5 | -------------------------------------------------------------------------------- /angular/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | body { 3 | margin: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /angular/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 3 | "recommendations": ["angular.ng-template"] 4 | } 5 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ruby-on-rails/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path("../config/application", __dir__) 3 | require_relative "../config/boot" 4 | require "rails/commands" 5 | -------------------------------------------------------------------------------- /ruby-on-rails/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative "application" 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /nextjs/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | public/static/charting_library/ 3 | public/static/datafeeds/ 4 | build/ 5 | 6 | .prettierignore 7 | .prettierrc 8 | yarn.lock 9 | .next 10 | .idea -------------------------------------------------------------------------------- /sveltekit/vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()] 6 | }); 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | }; 8 | -------------------------------------------------------------------------------- /nextjs-javascript/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | public/static/charting_library/ 3 | public/static/datafeeds/ 4 | build/ 5 | 6 | .prettierignore 7 | .prettierrc 8 | yarn.lock 9 | .next 10 | .idea -------------------------------------------------------------------------------- /nuxtjs/plugins/TVChart.js: -------------------------------------------------------------------------------- 1 | import { widget } from '~/static/charting_library' 2 | 3 | const Widget = widget 4 | 5 | export default function (ctx, inject) { 6 | inject('TVChart', { Widget }) 7 | } 8 | -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ruby-on-rails/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative "config/environment" 4 | 5 | run Rails.application 6 | Rails.application.load_server 7 | -------------------------------------------------------------------------------- /vuejs3/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | }) 8 | -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ruby-on-rails/test/controllers/chart_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ChartControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /nextjs/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import "@/styles/globals.css"; 2 | import type { AppProps } from "next/app"; 3 | 4 | export default function App({ Component, pageProps }: AppProps) { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /ruby-on-rails/test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :chrome, screen_size: [1400, 1400] 5 | end 6 | -------------------------------------------------------------------------------- /vuejs/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | import './style.css'; 4 | 5 | Vue.config.productionTip = false; 6 | 7 | new Vue({ 8 | render: h => h(App), 9 | }).$mount('#app'); 10 | -------------------------------------------------------------------------------- /nextjs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. 6 | -------------------------------------------------------------------------------- /ruby-on-rails/config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 2 | 3 | require "bundler/setup" # Set up gems listed in the Gemfile. 4 | require "bootsnap/setup" # Speed up boot time by caching expensive operations. 5 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/libraries 5 | /.idea/modules.xml 6 | /.idea/workspace.xml 7 | .DS_Store 8 | /build 9 | /captures 10 | .externalNativeBuild 11 | app/src/main/assets/charting_library/ 12 | .idea -------------------------------------------------------------------------------- /react-native/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby File.read(File.join(__dir__, '.ruby-version')).strip 5 | 6 | gem 'cocoapods', '~> 1.11', '>= 1.11.3' 7 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-example.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New example 3 | about: Suggest a new example 4 | 5 | --- 6 | 7 | - **Framework/library:** 8 | - **Link to page with the framework/library:** 9 | -------------------------------------------------------------------------------- /solidjs-typescript/src/index.tsx: -------------------------------------------------------------------------------- 1 | import {render} from "solid-js/web"; 2 | import classes from './index.module.css'; 3 | import App from "./App"; 4 | 5 | document.body.className = classes.body; 6 | 7 | render(() => , document.getElementById("app")!); 8 | -------------------------------------------------------------------------------- /ruby-on-rails/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative "config/application" 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /ruby-on-rails/config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: ruby_on_rails_production 11 | -------------------------------------------------------------------------------- /nuxtjs3/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | public/charting_library/ 3 | public/datafeeds/ 4 | build/ 5 | 6 | .prettierignore 7 | .prettierrc 8 | yarn.lock 9 | .next 10 | .idea 11 | 12 | *.log* 13 | .nuxt 14 | .nitro 15 | .cache 16 | .output 17 | .env 18 | dist 19 | .DS_Store -------------------------------------------------------------------------------- /react-javascript/src/index.js: -------------------------------------------------------------------------------- 1 | import * as ReactDOMClient from "react-dom/client"; 2 | import App from "./App"; 3 | import "./index.css"; 4 | 5 | const container = document.getElementById("root"); 6 | const root = ReactDOMClient.createRoot(container); 7 | root.render(); 8 | -------------------------------------------------------------------------------- /react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /ruby-on-rails/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html 3 | 4 | # Defines the root path route ("/") 5 | # root "articles#index" 6 | 7 | root "chart#index" 8 | end 9 | -------------------------------------------------------------------------------- /sveltekit/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | static/charting_library 12 | src/lib/charting_library 13 | src/lib/datafeeds -------------------------------------------------------------------------------- /ios-swift/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios-swift/Example.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tradingview/charting-library-examples/HEAD/ios-swift/Example.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /angular/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | constructor() { } 10 | } 11 | -------------------------------------------------------------------------------- /react-typescript/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import App from './App'; 3 | import { TVChartContainer } from './components/TVChartContainer'; 4 | 5 | test('basic', () => { 6 | expect().toBeDefined(); 7 | expect().toBeDefined(); 8 | }); 9 | -------------------------------------------------------------------------------- /angular/src/app/app-header/app-header.component.css: -------------------------------------------------------------------------------- 1 | .app-header-container { 2 | padding: 10px; 3 | text-align: center; 4 | background-color: #222; 5 | } 6 | 7 | .app-header { 8 | box-sizing: border-box; 9 | text-align: center; 10 | font-size: 1.5em; 11 | color: #fff; 12 | } 13 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ruby-on-rails/.gitattributes: -------------------------------------------------------------------------------- 1 | # See https://git-scm.com/docs/gitattributes for more about git attribute files. 2 | 3 | # Mark the database schema as having been generated. 4 | db/schema.rb linguist-generated 5 | 6 | # Mark any vendored files as having been vendored. 7 | vendor/* linguist-vendored 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Nov 26 12:30:10 CET 2025 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /react-native/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ChartingLibraryExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/react-native-gradle-plugin') 5 | -------------------------------------------------------------------------------- /nextjs/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from "next/document"; 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /react-typescript/src/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import * as ReactDOMClient from 'react-dom/client'; 3 | import App from './App'; 4 | import './index.css'; 5 | 6 | const container = document.getElementById('root') as HTMLElement; 7 | const root = ReactDOMClient.createRoot(container); 8 | root.render(); 9 | -------------------------------------------------------------------------------- /ruby-on-rails/app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /react-native/index.js: -------------------------------------------------------------------------------- 1 | import {AppRegistry, Platform} from 'react-native'; 2 | import {AndroidApp, IOsApp} from './App'; 3 | import {name as appName} from './app.json'; 4 | 5 | AppRegistry.registerComponent(appName, () => { 6 | if (Platform.OS === 'android') { 7 | return AndroidApp; 8 | } 9 | return IOsApp; 10 | }); 11 | -------------------------------------------------------------------------------- /ruby-on-rails/app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ruby-on-rails/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [ 5 | :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn 6 | ] 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /nuxtjs3/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxtjs3", 3 | "private": true, 4 | "scripts": { 5 | "build": "nuxt build", 6 | "dev": "nuxt dev", 7 | "generate": "nuxt generate", 8 | "preview": "nuxt preview", 9 | "postinstall": "nuxt prepare" 10 | }, 11 | "devDependencies": { 12 | "nuxt": "^3.12.4" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /nuxtjs3/plugins/TVChart.js: -------------------------------------------------------------------------------- 1 | import * as widget from '@/public/charting_library/charting_library' 2 | import * as datafeeds from '@/public/datafeeds/udf/dist/bundle' 3 | 4 | export default defineNuxtPlugin(() => { 5 | return { 6 | provide: { 7 | widget, 8 | datafeeds, 9 | }, 10 | }; 11 | }); 12 | -------------------------------------------------------------------------------- /ios-swift/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-javascript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "charting-library-react-js-example", 3 | "private": true, 4 | "dependencies": { 5 | "react": "19.0.0", 6 | "react-dom": "19.0.0", 7 | "react-scripts": "5.0.1" 8 | }, 9 | "scripts": { 10 | "start": "react-scripts start", 11 | "build": "react-scripts build" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /nextjs-javascript/components/TVChartContainer/index.module.css: -------------------------------------------------------------------------------- 1 | .VersionHeader { 2 | text-align: center; 3 | display: flex; 4 | justify-content: center; 5 | align-items: center; 6 | background-color: #222; 7 | color: #fff; 8 | font-family: Arial, Helvetica, sans-serif; 9 | } 10 | 11 | .TVChartContainer { 12 | height: calc(100vh - 80px); 13 | } 14 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ruby-on-rails/test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /nextjs-javascript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "charting-library-next-js-example", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "dev": "next", 6 | "build": "next build", 7 | "start": "PORT=3001 next start" 8 | }, 9 | "dependencies": { 10 | "next": "15.1.6", 11 | "react": "19.0.0", 12 | "react-dom": "19.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /react-native/__tests__/App-test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /angular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /angular/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /nextjs-javascript/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import dynamic from 'next/dynamic'; 3 | 4 | const TVChartContainer = dynamic( 5 | () => 6 | import('../components/TVChartContainer').then(mod => mod.TVChartContainer), 7 | { ssr: false }, 8 | ); 9 | 10 | const Index = () => { 11 | return (); 12 | }; 13 | 14 | export default Index; 15 | -------------------------------------------------------------------------------- /vuejs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Charting Library + Vite + Vue 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /vuejs3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Charting Library + Vite + Vue 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /react-native/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /nextjs/components/TVChartContainer/index.module.css: -------------------------------------------------------------------------------- 1 | .VersionHeader { 2 | text-align: center; 3 | display: flex; 4 | justify-content: center; 5 | align-items: center; 6 | background-color: #222; 7 | color: #fff; 8 | font-family: Arial, Helvetica, sans-serif; 9 | height: 60px; 10 | max-height: 60px; 11 | font-size: 12px; 12 | } 13 | 14 | .TVChartContainer { 15 | height: calc(100vh - 60px); 16 | } 17 | -------------------------------------------------------------------------------- /sveltekit/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sveltekit", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "@sveltejs/adapter-auto": "^3.2.2", 12 | "@sveltejs/kit": "^2.5.18", 13 | "svelte": "^4.2.18", 14 | "vite": "^5.3.5" 15 | }, 16 | "type": "module" 17 | } 18 | -------------------------------------------------------------------------------- /ruby-on-rails/db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # movies = Movie.create([{ name: "Star Wars" }, { name: "Lord of the Rings" }]) 7 | # Character.create(name: "Luke", movie: movies.first) 8 | -------------------------------------------------------------------------------- /sveltekit/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /nuxtjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxtjs", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "nuxt", 7 | "build": "nuxt build", 8 | "start": "nuxt start", 9 | "generate": "nuxt generate" 10 | }, 11 | "dependencies": { 12 | "core-js": "~3.37.1", 13 | "nuxt": "~2.18.1" 14 | }, 15 | "devDependencies": { 16 | "vue-server-renderer": "2.7.16" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /nextjs-javascript/pages/_document.js: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from 'next/document'; 2 | 3 | export default class MyDocument extends Document { 4 | render() { 5 | return ( 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /angular/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /angular/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /solidjs-typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "charting-library-solid-typescript-example", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "solid-js": "^1.9.4", 12 | "typescript": "~5.5.4", 13 | "vite": "^6.0.11", 14 | "vite-plugin-solid": "^2.11.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vuejs/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | public/charting_library/ 27 | public/datafeeds/ 28 | -------------------------------------------------------------------------------- /vuejs3/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | public/charting_library/ 27 | public/datafeeds/ 28 | -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### Add example checklist 2 | 3 | - [ ] **Any** commit does not contain the charting library's code 4 | - [ ] Addresses an existing issue: #00000 5 | - [ ] The example is added to README.md 6 | - [ ] The example is self-sufficient and contains only necessary files/changes 7 | 8 | #### Bug fix checklist 9 | 10 | - [ ] **Any** commit does not contain the charting library's code 11 | - [ ] Addresses an existing issue: #00000 12 | -------------------------------------------------------------------------------- /angular/src/app/app-header/app-header.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { version } from '../../assets/charting_library'; 3 | 4 | @Component({ 5 | selector: 'app-header', 6 | templateUrl: './app-header.component.html', 7 | styleUrls: ['./app-header.component.css'] 8 | }) 9 | export class AppHeaderComponent { 10 | title = 'TradingView Charting Library and Angular 5 Integration Example ' + version(); 11 | } 12 | -------------------------------------------------------------------------------- /react-javascript/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-header { 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | padding: 10px 0; 10 | background-color: #222; 11 | color: #fff; 12 | } 13 | 14 | .App-tv-logo { 15 | height: 45px; 16 | } 17 | 18 | .App-react-logo { 19 | display: block; 20 | height: 62px; 21 | } 22 | 23 | .App-title { 24 | display: block; 25 | font-size: 1.5em; 26 | } 27 | -------------------------------------------------------------------------------- /react-typescript/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-header { 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | padding: 10px 0; 10 | background-color: #222; 11 | color: #fff; 12 | } 13 | 14 | .App-tv-logo { 15 | height: 45px; 16 | } 17 | 18 | .App-react-logo { 19 | display: block; 20 | height: 62px; 21 | } 22 | 23 | .App-title { 24 | display: block; 25 | font-size: 1.5em; 26 | } 27 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ios-swift/Example.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | iOS.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ruby-on-rails/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | ENV["RAILS_ENV"] ||= "test" 2 | require_relative "../config/environment" 3 | require "rails/test_help" 4 | 5 | class ActiveSupport::TestCase 6 | # Run tests in parallel with specified workers 7 | parallelize(workers: :number_of_processors) 8 | 9 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. 10 | fixtures :all 11 | 12 | # Add more helper methods to be used by all tests here... 13 | end 14 | -------------------------------------------------------------------------------- /solidjs-typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "src": "./public", 5 | "outDir": "build/dist", 6 | "sourceMap": true, 7 | "allowJs": true, 8 | "jsx": "preserve", 9 | "jsxImportSource": "solid-js", 10 | "types": [ 11 | "vite/client", 12 | "node" 13 | ] 14 | }, 15 | "exclude": [ 16 | "node_modules", 17 | "build", 18 | "public", 19 | "src/charting_library" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /ruby-on-rails/config/initializers/permissions_policy.rb: -------------------------------------------------------------------------------- 1 | # Define an application-wide HTTP permissions policy. For further 2 | # information see https://developers.google.com/web/updates/2018/06/feature-policy 3 | # 4 | # Rails.application.config.permissions_policy do |f| 5 | # f.camera :none 6 | # f.gyroscope :none 7 | # f.microphone :none 8 | # f.usb :none 9 | # f.fullscreen :self 10 | # f.payment :self, "https://secure.example.com" 11 | # end 12 | -------------------------------------------------------------------------------- /solidjs-typescript/vite.config.ts: -------------------------------------------------------------------------------- 1 | // vite.config.ts 2 | import {defineConfig} from 'vite'; 3 | import solidPlugin from 'vite-plugin-solid'; 4 | 5 | export default defineConfig({ 6 | plugins: [solidPlugin()], 7 | css: { 8 | modules: { 9 | scopeBehaviour: 'local', // Default is 'local', which scopes class names 10 | generateScopedName: '[name]__[local]___[hash:base64:5]', // Customize the naming pattern 11 | }, 12 | }, 13 | }); 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /solidjs-typescript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /react-native/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/tradingview/android/JSApplicationBridge.kt: -------------------------------------------------------------------------------- 1 | package com.tradingview.android 2 | 3 | import android.content.Context 4 | import android.webkit.JavascriptInterface 5 | import android.widget.Toast 6 | 7 | class JSApplicationBridge(private val context: Context) { 8 | @JavascriptInterface 9 | fun onIntervalChanged(newInterval: String) { 10 | val toast = Toast.makeText(context, "New chart widget interval is $newInterval", Toast.LENGTH_SHORT) 11 | toast.show() 12 | } 13 | } -------------------------------------------------------------------------------- /solidjs-typescript/src/App.module.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-header { 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | padding: 10px 0; 10 | background-color: #222; 11 | color: #fff; 12 | } 13 | 14 | .App-title { 15 | display: block; 16 | font-size: 1.5em; 17 | } 18 | 19 | 20 | /*.App-tv-logo {*/ 21 | /* height: 45px;*/ 22 | /*}*/ 23 | 24 | /*.App-react-logo {*/ 25 | /* display: block;*/ 26 | /* height: 62px;*/ 27 | /*}*/ 28 | -------------------------------------------------------------------------------- /react-javascript/src/App.jsx: -------------------------------------------------------------------------------- 1 | import './App.css'; 2 | import { TVChartContainer } from './components/TVChartContainer/index'; 3 | import { version } from './charting_library'; 4 | 5 | const App = () => { 6 | return ( 7 |
8 |
9 |

10 | TradingView Charting Library and React Integration Example {version()} 11 |

12 |
13 | 14 |
15 | ); 16 | } 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /ruby-on-rails/app/views/chart/index.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= image_tag("rails_logo.png", class: "page-rails-logo") %> 4 |
5 |
6 | <%= image_tag("tv_logo.png", class: "page-tv-logo") %> 7 |
8 |

9 | TradingView Charting Library and Ruby on Rails Integration Example 10 |

11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /sveltekit/svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | 3 | /** @type {import('@sveltejs/kit').Config} */ 4 | const config = { 5 | kit: { 6 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 7 | // If your environment is not supported or you settled on a specific environment, switch out the adapter. 8 | // See https://kit.svelte.dev/docs/adapters for more information about adapters. 9 | adapter: adapter() 10 | } 11 | }; 12 | 13 | export default config; 14 | -------------------------------------------------------------------------------- /react-native/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /nextjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "charting-library-nextjs", 3 | "version": "1.0.0", 4 | "private": true, 5 | "engines": { 6 | "node": ">=22.0.0" 7 | }, 8 | "scripts": { 9 | "dev": "next dev", 10 | "build": "next build", 11 | "start": "PORT=3001 next start" 12 | }, 13 | "dependencies": { 14 | "@types/node": "22.10.9", 15 | "@types/react": "19.0.8", 16 | "@types/react-dom": "19.0.3", 17 | "next": "15.1.6", 18 | "react": "19.0.0", 19 | "react-dom": "19.0.0", 20 | "typescript": "5.7.3" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /react-typescript/src/App.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import './App.css'; 3 | import { TVChartContainer } from './components/TVChartContainer/index'; 4 | import { version } from './charting_library'; 5 | 6 | const App = () => { 7 | return ( 8 |
9 |
10 |

11 | TradingView Charting Library and React Integration Example { version() } 12 |

13 |
14 | 15 |
16 | ); 17 | }; 18 | 19 | export default App; 20 | -------------------------------------------------------------------------------- /sveltekit/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 |

Library version: {version()}

8 | 9 |
10 | 11 | 23 | -------------------------------------------------------------------------------- /angular/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 3 | "version": "0.2.0", 4 | "configurations": [ 5 | { 6 | "name": "ng serve", 7 | "type": "pwa-chrome", 8 | "request": "launch", 9 | "preLaunchTask": "npm: start", 10 | "url": "http://localhost:4200/" 11 | }, 12 | { 13 | "name": "ng test", 14 | "type": "chrome", 15 | "request": "launch", 16 | "preLaunchTask": "npm: test", 17 | "url": "http://localhost:9876/debug.html" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /react-typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "charting-library-react-example", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "react": "19.0.0", 7 | "react-dom": "19.0.0", 8 | "react-scripts": "5.0.1" 9 | }, 10 | "scripts": { 11 | "start": "react-scripts start", 12 | "build": "react-scripts build", 13 | "test": "react-scripts test" 14 | }, 15 | "devDependencies": { 16 | "@types/jest": "^29.5.14", 17 | "@types/react": "19.0.8", 18 | "@types/react-dom": "19.0.3", 19 | "typescript": "^5.7.3" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /react-native/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /solidjs-typescript/src/App.tsx: -------------------------------------------------------------------------------- 1 | import classes from './App.module.css'; 2 | import {TVChartContainer} from './components/TVChartContainer'; 3 | import {version} from './charting_library'; 4 | 5 | const App = () => { 6 | return ( 7 |
8 |
9 |

10 | TradingView Charting Library and Solid Integration Example {version()} 11 |

12 |
13 | 14 |
15 | ); 16 | }; 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /android/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "app/src/main/assets/charting_library" 18 | 19 | cp -r "$LATEST_HASH" "app/src/main/assets/charting_library" 20 | 21 | remove_if_directory_exists "$LATEST_HASH" 22 | -------------------------------------------------------------------------------- /android/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | 3 | sdk-min = "21" 4 | sdk-compile = "36" 5 | 6 | android-gradle = "8.13.0" 7 | kotlin = "2.2.21" 8 | 9 | appcompat = "1.7.1" 10 | constraintlayout = "2.2.1" 11 | 12 | 13 | [libraries] 14 | 15 | androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } 16 | androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } 17 | 18 | [plugins] 19 | 20 | android = { id = "com.android.application", version.ref = "android-gradle" } 21 | kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } 22 | -------------------------------------------------------------------------------- /angular/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | import { AppHeaderComponent } from './app-header/app-header.component'; 7 | import { TvChartContainerComponent } from './tv-chart-container/tv-chart-container.component'; 8 | 9 | 10 | @NgModule({ 11 | declarations: [ 12 | AppComponent, 13 | AppHeaderComponent, 14 | TvChartContainerComponent 15 | ], 16 | imports: [ 17 | BrowserModule 18 | ], 19 | providers: [], 20 | bootstrap: [AppComponent] 21 | }) 22 | export class AppModule { } 23 | -------------------------------------------------------------------------------- /ruby-on-rails/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Charting Library Ruby on Rails Demo 5 | 6 | <%= csrf_meta_tags %> 7 | <%= csp_meta_tag %> 8 | 9 | <%= stylesheet_link_tag "application" %> 10 | 11 | 12 | 13 | <%= yield %> 14 | 15 | 16 | 17 | 18 | <%= javascript_include_tag "application" %> 19 | 20 | -------------------------------------------------------------------------------- /ruby-on-rails/config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = "1.0" 5 | 6 | # Add additional assets to the asset load path. 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | Rails.application.config.assets.paths << Rails.root.join("vendor", "assets") 9 | 10 | # Precompile additional assets. 11 | # application.js, application.css, and all non-JS/CSS in the app/assets 12 | # folder are already added. 13 | # Rails.application.config.assets.precompile += %w( admin.js admin.css ) 14 | -------------------------------------------------------------------------------- /nextjs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "paths": { 18 | "@/*": ["./*"], 19 | }, 20 | }, 21 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 22 | "exclude": ["node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /react-javascript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "src": "./public", 4 | "outDir": "build/dist", 5 | "module": "esnext", 6 | "target": "es5", 7 | "lib": ["es6", "dom"], 8 | "sourceMap": true, 9 | "allowJs": true, 10 | "jsx": "react", 11 | "moduleResolution": "node", 12 | "rootDir": "src", 13 | "forceConsistentCasingInFileNames": true, 14 | "noImplicitReturns": true, 15 | "noImplicitThis": true, 16 | "noImplicitAny": true, 17 | "strictNullChecks": true, 18 | "noUnusedLocals": true 19 | }, 20 | "exclude": [ 21 | "node_modules", 22 | "build", 23 | "public", 24 | "src/charting_library" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /react-typescript/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "src": "./public", 4 | "outDir": "build/dist", 5 | "module": "esnext", 6 | "target": "es5", 7 | "lib": ["es6", "dom"], 8 | "sourceMap": true, 9 | "allowJs": true, 10 | "jsx": "react", 11 | "moduleResolution": "node", 12 | "rootDir": "src", 13 | "forceConsistentCasingInFileNames": true, 14 | "noImplicitReturns": true, 15 | "noImplicitThis": true, 16 | "noImplicitAny": true, 17 | "strictNullChecks": true, 18 | "noUnusedLocals": true 19 | }, 20 | "exclude": [ 21 | "node_modules", 22 | "build", 23 | "public", 24 | "src/charting_library" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /nuxtjs/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "static/charting_library" 18 | remove_if_directory_exists "static/datafeeds" 19 | 20 | cp -r "$LATEST_HASH/charting_library" static 21 | cp -r "$LATEST_HASH/datafeeds" static 22 | 23 | remove_if_directory_exists "$LATEST_HASH" -------------------------------------------------------------------------------- /nuxtjs3/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "public/charting_library" 18 | remove_if_directory_exists "public/datafeeds" 19 | 20 | cp -r "$LATEST_HASH/charting_library" public 21 | cp -r "$LATEST_HASH/datafeeds" public 22 | 23 | remove_if_directory_exists "$LATEST_HASH" 24 | -------------------------------------------------------------------------------- /ruby-on-rails/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "public/charting_library" 18 | remove_if_directory_exists "public/datafeeds" 19 | 20 | cp -r "$LATEST_HASH/charting_library" public 21 | cp -r "$LATEST_HASH/datafeeds" public 22 | 23 | remove_if_directory_exists "$LATEST_HASH" 24 | -------------------------------------------------------------------------------- /android/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | mavenLocal() 7 | } 8 | } 9 | 10 | dependencyResolutionManagement { 11 | repositories { 12 | google() 13 | mavenCentral() 14 | mavenLocal() 15 | } 16 | versionCatalogs { 17 | create("libs") { 18 | from(files("libs.versions.toml")) 19 | } 20 | } 21 | } 22 | 23 | buildCache { 24 | local { 25 | isPush = true 26 | directory = File(rootDir, ".gradle/build-cache") 27 | } 28 | } 29 | 30 | rootProject.name = "ChartingLibraryExample" 31 | 32 | include( 33 | ":app", 34 | ) 35 | -------------------------------------------------------------------------------- /angular/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "src/assets/charting_library" 18 | remove_if_directory_exists "src/assets/datafeeds" 19 | 20 | cp -r "$LATEST_HASH/charting_library" src/assets 21 | cp -r "$LATEST_HASH/datafeeds" src/assets 22 | 23 | remove_if_directory_exists "$LATEST_HASH" 24 | -------------------------------------------------------------------------------- /react-native/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "33.0.0" 6 | minSdkVersion = 21 7 | compileSdkVersion = 33 8 | targetSdkVersion = 33 9 | 10 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. 11 | ndkVersion = "23.1.7779620" 12 | } 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | dependencies { 18 | classpath("com.android.tools.build:gradle:7.3.1") 19 | classpath("com.facebook.react:react-native-gradle-plugin") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vuejs/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Charting Library Vue.js Demo 10 | 11 | 12 | 15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /nextjs-javascript/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "public/static/charting_library" 18 | remove_if_directory_exists "public/static/datafeeds" 19 | 20 | cp -r "$LATEST_HASH/charting_library" public/static 21 | cp -r "$LATEST_HASH/datafeeds" public/static 22 | 23 | remove_if_directory_exists "$LATEST_HASH" 24 | -------------------------------------------------------------------------------- /ruby-on-rails/app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's 5 | // vendor/assets/javascripts directory can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. JavaScript code in this file should be added after the last require_* statement. 9 | // 10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require_tree . 14 | -------------------------------------------------------------------------------- /angular/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /ruby-on-rails/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, "\\1en" 8 | # inflect.singular /^(ox)en/i, "\\1" 9 | # inflect.irregular "person", "people" 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym "RESTful" 16 | # end 17 | -------------------------------------------------------------------------------- /ruby-on-rails/config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite. Versions 3.8.0 and up are supported. 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem "sqlite3" 6 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Creating new issue 2 | 3 | 1. Please make sure that your issue is addressed to the examples, **NOT to the [Charting Library](https://github.com/tradingview/charting_library)**. 4 | 1. Please search for similar issues before creating a new one. It is quite possible that someone has already encountered the same issue and you can find a solution much faster. 5 | 6 | ## Contributing Code 7 | 8 | Before making a commit please make sure that **your commit does not contain the Charting Library's code**. 9 | 10 | ### Commit messages 11 | 12 | * If you change the code of one or more examples, please make sure that your commit messages are started with the `[EXAMPLE-NAME] `. 13 | 14 | Example: `[react-javascript] Fixed bug with rendering header #000` 15 | -------------------------------------------------------------------------------- /vuejs/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | case "$1" in 8 | "unstable") 9 | BRANCH="unstable";; 10 | *) 11 | BRANCH="master";; 12 | esac 13 | 14 | REPOSITORY='https://github.com/tradingview/charting_library/' 15 | 16 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 17 | 18 | remove_if_directory_exists "$LATEST_HASH" 19 | 20 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 21 | 22 | remove_if_directory_exists "public/charting_library" 23 | remove_if_directory_exists "public/datafeeds" 24 | 25 | cp -r "$LATEST_HASH/charting_library" public 26 | cp -r "$LATEST_HASH/datafeeds" public 27 | 28 | remove_if_directory_exists "$LATEST_HASH" 29 | -------------------------------------------------------------------------------- /vuejs3/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | case "$1" in 8 | "unstable") 9 | BRANCH="unstable";; 10 | *) 11 | BRANCH="master";; 12 | esac 13 | 14 | REPOSITORY='https://github.com/tradingview/charting_library/' 15 | 16 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 17 | 18 | remove_if_directory_exists "$LATEST_HASH" 19 | 20 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 21 | 22 | remove_if_directory_exists "public/charting_library" 23 | remove_if_directory_exists "public/datafeeds" 24 | 25 | cp -r "$LATEST_HASH/charting_library" public 26 | cp -r "$LATEST_HASH/datafeeds" public 27 | 28 | remove_if_directory_exists "$LATEST_HASH" 29 | -------------------------------------------------------------------------------- /react-javascript/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Charting Library React Demo 7 | 8 | 9 | 12 |
13 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /react-typescript/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Charting Library React Demo 7 | 8 | 9 | 12 |
13 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /solidjs-typescript/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Charting Library React Demo 7 | 8 | 9 | 12 |
13 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /sveltekit/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "static/charting_library" 18 | remove_if_directory_exists "src/lib/datafeeds" 19 | remove_if_directory_exists "src/lib/charting_library" 20 | 21 | cp -r "$LATEST_HASH/charting_library" static 22 | cp -r "$LATEST_HASH/datafeeds" src/lib 23 | cp -r "$LATEST_HASH/charting_library" src/lib 24 | 25 | remove_if_directory_exists "$LATEST_HASH" -------------------------------------------------------------------------------- /react-javascript/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "public/charting_library" 18 | remove_if_directory_exists "public/datafeeds" 19 | remove_if_directory_exists "src/charting_library" 20 | 21 | cp -r "$LATEST_HASH/charting_library" public 22 | cp -r "$LATEST_HASH/datafeeds" public 23 | cp -r "$LATEST_HASH/charting_library" src 24 | 25 | remove_if_directory_exists "$LATEST_HASH" 26 | -------------------------------------------------------------------------------- /react-typescript/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='https://github.com/tradingview/charting_library/' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | remove_if_directory_exists "public/charting_library" 18 | remove_if_directory_exists "public/datafeeds" 19 | remove_if_directory_exists "src/charting_library" 20 | 21 | cp -r "$LATEST_HASH/charting_library" public 22 | cp -r "$LATEST_HASH/datafeeds" public 23 | cp -r "$LATEST_HASH/charting_library" src 24 | 25 | remove_if_directory_exists "$LATEST_HASH" 26 | -------------------------------------------------------------------------------- /ruby-on-rails/app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's 6 | * vendor/assets/stylesheets directory can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 | * compiled file so the styles you add here take precedence over styles defined in any other CSS 10 | * files in this directory. Styles in this file should be added after the last require_* statement. 11 | * It is generally better to create a new file per style scope. 12 | * 13 | *= require_tree . 14 | *= require_self 15 | */ 16 | -------------------------------------------------------------------------------- /ruby-on-rails/config/application.rb: -------------------------------------------------------------------------------- 1 | require_relative "boot" 2 | 3 | require "rails/all" 4 | 5 | # Require the gems listed in Gemfile, including any gems 6 | # you've limited to :test, :development, or :production. 7 | Bundler.require(*Rails.groups) 8 | 9 | module RubyOnRails 10 | class Application < Rails::Application 11 | # Initialize configuration defaults for originally generated Rails version. 12 | config.load_defaults 7.0 13 | 14 | # Configuration for the application, engines, and railties goes here. 15 | # 16 | # These settings can be overridden in specific environments using the files 17 | # in config/environments, which are processed later. 18 | # 19 | # config.time_zone = "Central Time (US & Canada)" 20 | # config.eager_load_paths << Rails.root.join("extras") 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /angular/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | import { AppHeaderComponent } from './app-header/app-header.component'; 4 | import { TvChartContainerComponent } from './tv-chart-container/tv-chart-container.component'; 5 | 6 | describe('AppComponent', () => { 7 | beforeEach(async(() => { 8 | TestBed.configureTestingModule({ 9 | declarations: [ 10 | AppComponent, 11 | AppHeaderComponent, 12 | TvChartContainerComponent 13 | ], 14 | }).compileComponents(); 15 | })); 16 | 17 | it('should create the app', async(() => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.debugElement.componentInstance; 20 | expect(app).toBeTruthy(); 21 | })); 22 | }); 23 | -------------------------------------------------------------------------------- /angular/src/app/tv-chart-container/tv-chart-container.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { TvChartContainerComponent } from './tv-chart-container.component'; 4 | 5 | describe('TvChartContainerComponent', () => { 6 | let component: TvChartContainerComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ TvChartContainerComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(TvChartContainerComponent); 18 | component = fixture.componentInstance; 19 | }); 20 | 21 | it('should be created', () => { 22 | expect(component).toBeTruthy(); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /react-native/android/app/src/release/java/com/chartinglibraryexample/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.chartinglibraryexample; 8 | 9 | import android.content.Context; 10 | import com.facebook.react.ReactInstanceManager; 11 | 12 | /** 13 | * Class responsible of loading Flipper inside your React Native application. This is the release 14 | * flavor of it so it's empty as we don't want to load Flipper. 15 | */ 16 | public class ReactNativeFlipper { 17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 18 | // Do nothing as we don't want to initialize Flipper on Release. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle.kts. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /solidjs-typescript/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | BRANCH="master"; 8 | 9 | REPOSITORY='git@github.com:tradingview/charting_library.git' 10 | 11 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 12 | 13 | remove_if_directory_exists "$LATEST_HASH" 14 | 15 | echo "$BRANCH" $REPOSITORY "$LATEST_HASH" 16 | 17 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 18 | 19 | remove_if_directory_exists "public/charting_library" 20 | remove_if_directory_exists "public/datafeeds" 21 | remove_if_directory_exists "src/charting_library" 22 | 23 | cp -r "$LATEST_HASH/charting_library" public 24 | cp -r "$LATEST_HASH/datafeeds" public 25 | cp -r "$LATEST_HASH/charting_library" src 26 | 27 | remove_if_directory_exists "$LATEST_HASH" 28 | -------------------------------------------------------------------------------- /angular/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | (id: string): T; 13 | keys(): string[]; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting(), 21 | ); 22 | 23 | // Then we find all the tests. 24 | const context = require.context('./', true, /\.spec\.ts$/); 25 | // And load the modules. 26 | context.keys().map(context); 27 | -------------------------------------------------------------------------------- /react-typescript/browserslist: -------------------------------------------------------------------------------- 1 | # This is an rcfile for Browserslist (https://www.npmjs.com/package/browserslist) 2 | 3 | # All browsers with significant market share 4 | > 1% in US 5 | > 1% in RU 6 | 7 | # Desktop 8 | last 3 Chrome versions 9 | last 3 Edge versions 10 | last 3 Firefox versions 11 | last 3 Safari versions 12 | last 3 Opera versions 13 | 14 | # Mobile 15 | last 3 iOS versions 16 | last 3 ChromeAndroid versions 17 | last 3 Android versions 18 | last 3 FirefoxAndroid versions 19 | 20 | # Restrict min supported versions 21 | not Android < 66 22 | not Chrome < 66 23 | not ChromeAndroid < 66 24 | not Safari < 13 25 | not iOS < 13 26 | 27 | # Long dead browsers 28 | not Explorer <= 11 29 | not ExplorerMobile <= 11 30 | not OperaMini all # Opera mini has very limited JS support, no canvas and no websockets 31 | not OperaMobile <= 12.1 # Opera mobile Presto 32 | -------------------------------------------------------------------------------- /vuejs3/src/App.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 17 | 18 | 40 | -------------------------------------------------------------------------------- /react-native/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {SafeAreaView} from 'react-native'; 3 | import {WebView} from 'react-native-webview'; 4 | 5 | function App({uri = 'index.html'}): JSX.Element { 6 | return ( 7 | 8 | true} 17 | /> 18 | 19 | ); 20 | } 21 | 22 | export function AndroidApp(): JSX.Element { 23 | return ; 24 | } 25 | 26 | export function IOsApp(): JSX.Element { 27 | return ; 28 | } 29 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /nuxtjs3/nuxt.config.ts: -------------------------------------------------------------------------------- 1 | // https://nuxt.com/docs/api/configuration/nuxt-config 2 | export default defineNuxtConfig({ 3 | app: { 4 | head: { 5 | title: "Charting Library Nuxtjs 3 Demo", 6 | htmlAttrs: { 7 | lang: "en", 8 | }, 9 | meta: [ 10 | { charset: "utf-8" }, 11 | { 12 | name: "viewport", 13 | content: "width=device-width, initial-scale=1", 14 | }, 15 | { hid: "description", name: "description", content: "" }, 16 | ], 17 | link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }], 18 | script: [{ src: "/datafeeds/udf/dist/bundle.js" }], 19 | }, 20 | }, 21 | plugins: [{ src: "~/plugins/TVChart.js", mode: "client" }], 22 | components: true, 23 | }); 24 | -------------------------------------------------------------------------------- /angular/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | src/assets/charting_library/ 13 | src/assets/datafeeds/ 14 | 15 | # profiling files 16 | chrome-profiler-events*.json 17 | 18 | # IDEs and editors 19 | /.idea 20 | .project 21 | .classpath 22 | .c9/ 23 | *.launch 24 | .settings/ 25 | *.sublime-workspace 26 | 27 | # IDE - VSCode 28 | .vscode/* 29 | !.vscode/settings.json 30 | !.vscode/tasks.json 31 | !.vscode/launch.json 32 | !.vscode/extensions.json 33 | .history/* 34 | 35 | # misc 36 | /.angular/cache 37 | /.sass-cache 38 | /connect.lock 39 | /coverage 40 | /libpeerconnection.log 41 | npm-debug.log 42 | yarn-error.log 43 | testem.log 44 | /typings 45 | 46 | # System Files 47 | .DS_Store 48 | Thumbs.db 49 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Checklist** 8 | 9 | 13 | - [ ] This issue is **NOT** related to the charting library itself 14 | 15 | **Describe the bug** 16 | 17 | A clear and concise description of what the bug is. 18 | 19 | **To Reproduce** 20 | 21 | Steps to reproduce the behavior: 22 | 1. Clone the repo 23 | 2. Go to '....' folder 24 | 3. Run command 25 | 4. See error 26 | 27 | **Expected behavior** 28 | 29 | A clear and concise description of what you expected to happen. 30 | 31 | **Screenshots** 32 | 33 | If applicable, add screenshots to help explain your problem. 34 | 35 | **Additional context** 36 | 37 | Add any other context about the problem here. 38 | -------------------------------------------------------------------------------- /nextjs/copy_charting_library_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | remove_if_directory_exists() { 4 | if [ -d "$1" ]; then rm -Rf "$1"; fi 5 | } 6 | 7 | create_if_directory_does_not_exists() { 8 | if [ ! -d "$1" ]; then mkdir "$1"; fi 9 | } 10 | 11 | BRANCH="master"; 12 | 13 | REPOSITORY='https://github.com/tradingview/charting_library/' 14 | 15 | LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+') 16 | 17 | remove_if_directory_exists "$LATEST_HASH" 18 | 19 | git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH" 20 | 21 | create_if_directory_does_not_exists 'public' 22 | create_if_directory_does_not_exists 'public/static' 23 | 24 | remove_if_directory_exists "public/static/charting_library" 25 | remove_if_directory_exists "public/static/datafeeds" 26 | 27 | cp -r "$LATEST_HASH/charting_library" public/static 28 | cp -r "$LATEST_HASH/datafeeds" public/static 29 | 30 | remove_if_directory_exists "$LATEST_HASH" 31 | -------------------------------------------------------------------------------- /solidjs-typescript/browserslist: -------------------------------------------------------------------------------- 1 | # This is an rcfile for Browserslist (https://www.npmjs.com/package/browserslist) 2 | 3 | # All browsers with significant market share 4 | > 1% in US 5 | > 1% in RU 6 | 7 | # Desktop 8 | last 3 Chrome versions 9 | last 3 Edge versions 10 | last 3 Firefox versions 11 | last 3 Safari versions 12 | last 3 Opera versions 13 | 14 | # Mobile 15 | last 3 iOS versions 16 | last 3 ChromeAndroid versions 17 | last 3 Android versions 18 | last 3 FirefoxAndroid versions 19 | 20 | # iOS app special needs 21 | iOS >= 15 22 | 23 | # Restrict min supported versions 24 | not Android < 85 25 | not Chrome < 85 26 | not ChromeAndroid < 85 27 | not Safari < 15 28 | not iOS < 15 29 | not Firefox < 79 30 | not FirefoxAndroid < 79 31 | 32 | # Long dead browsers 33 | not Explorer <= 11 34 | not ExplorerMobile <= 11 35 | not OperaMini all # Opera mini has very limited JS support, no canvas and no websockets 36 | not OperaMobile <= 12.1 # Opera mobile Presto 37 | -------------------------------------------------------------------------------- /ruby-on-rails/app/assets/stylesheets/chart.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the Library controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: http://sass-lang.com/ 4 | 5 | body { 6 | margin: 0; 7 | font-family: sans-serif; 8 | } 9 | 10 | .page-logo-container { 11 | padding-bottom: 29px; 12 | text-align: center; 13 | background-color: #222; 14 | } 15 | 16 | .page-rails-logo-container { 17 | display: inline-block; 18 | } 19 | 20 | .page-rails-logo { 21 | display: block; 22 | border: 0; 23 | width: 151px; 24 | height: 151px; 25 | } 26 | 27 | .page-tv-logo-container { 28 | display: inline-block; 29 | } 30 | 31 | .page-tv-logo { 32 | display: block; 33 | border: 0; 34 | } 35 | 36 | .page-header { 37 | box-sizing: border-box; 38 | margin: 15px 0 0; 39 | text-align: center; 40 | font-size: 1.5em; 41 | color: #fff; 42 | } 43 | 44 | .page-tv-chart-container { 45 | height: calc(100vh - 227px); 46 | } 47 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | org.gradle.parallel=true 14 | 15 | android.useAndroidX=true 16 | # Automatically convert third-party libraries to use AndroidX 17 | android.enableJetifier=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official -------------------------------------------------------------------------------- /ruby-on-rails/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | /.bundle 9 | 10 | # Ignore the default SQLite database. 11 | /db/*.sqlite3 12 | /db/*.sqlite3-* 13 | 14 | # Ignore all logfiles and tempfiles. 15 | /log/* 16 | /tmp/* 17 | !/log/.keep 18 | !/tmp/.keep 19 | 20 | # Ignore pidfiles, but keep the directory. 21 | /tmp/pids/* 22 | !/tmp/pids/ 23 | !/tmp/pids/.keep 24 | 25 | # Ignore uploaded files in development. 26 | /storage/* 27 | !/storage/.keep 28 | /tmp/storage/* 29 | !/tmp/storage/ 30 | !/tmp/storage/.keep 31 | 32 | /public/assets 33 | /public/charting_library 34 | /public/datafeeds 35 | /vendor/bundle 36 | 37 | # Ignore master key for decrypting credentials and more. 38 | /config/master.key 39 | -------------------------------------------------------------------------------- /ruby-on-rails/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t "hello" 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t("hello") %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # The following keys must be escaped otherwise they will not be retrieved by 20 | # the default I18n backend: 21 | # 22 | # true, false, on, off, yes, no 23 | # 24 | # Instead, surround them with single quotes. 25 | # 26 | # en: 27 | # "true": "foo" 28 | # 29 | # To learn more, please read the Rails Internationalization guide 30 | # available at https://guides.rubyonrails.org/i18n.html. 31 | 32 | en: 33 | hello: "Hello world" 34 | -------------------------------------------------------------------------------- /vuejs/src/App.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 27 | 28 | 50 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /react-javascript/browserslist: -------------------------------------------------------------------------------- 1 | # This is an rcfile for Browserslist (https://www.npmjs.com/package/browserslist) 2 | # These settings are used by Autoprefixer, babel-preset-env and other modules 3 | 4 | # All browsers with significant market share 5 | > 1% in US 6 | > 1% in RU 7 | 8 | # Desktop 9 | last 3 Chrome versions 10 | last 3 Edge versions 11 | last 3 Firefox versions 12 | last 3 Safari versions 13 | last 3 Opera versions 14 | 15 | # Mobile 16 | last 3 iOS versions 17 | last 3 ChromeAndroid versions 18 | last 3 Android versions 19 | last 3 FirefoxAndroid versions 20 | 21 | # iOS app special needs 22 | iOS >= 15 23 | 24 | # Restrict min supported versions 25 | not Android < 69 26 | not Chrome < 69 27 | not ChromeAndroid < 69 28 | not Safari < 15 29 | not iOS < 15 30 | not Firefox < 69 31 | not FirefoxAndroid < 69 32 | 33 | # Long dead browsers 34 | not Explorer <= 11 35 | not ExplorerMobile <= 11 36 | not OperaMini all # Opera mini has very limited JS support, no canvas and no websockets 37 | not OperaMobile <= 12.1 # Opera mobile Presto 38 | -------------------------------------------------------------------------------- /angular/src/app/app-header/app-header.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AppHeaderComponent } from './app-header.component'; 4 | 5 | describe('AppHeaderComponent', () => { 6 | let component: AppHeaderComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AppHeaderComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AppHeaderComponent); 18 | component = fixture.componentInstance; 19 | }); 20 | 21 | it('should be created', () => { 22 | expect(component).toBeTruthy(); 23 | }); 24 | 25 | it(`should have as title 'TradingView Charting Library and Angular 5 Integration Example'`, async(() => { 26 | const app = fixture.debugElement.componentInstance; 27 | expect(app.title).toEqual('TradingView Charting Library and Angular 5 Integration Example'); 28 | })); 29 | }); 30 | -------------------------------------------------------------------------------- /angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitOverride": true, 10 | "noPropertyAccessFromIndexSignature": true, 11 | "noImplicitReturns": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "sourceMap": true, 14 | "declaration": false, 15 | "downlevelIteration": true, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "node", 18 | "importHelpers": true, 19 | "target": "es2017", 20 | "module": "es2020", 21 | "lib": [ 22 | "es2020", 23 | "dom" 24 | ] 25 | }, 26 | "exclude": [ 27 | "src/assets/**/*" 28 | ], 29 | "angularCompilerOptions": { 30 | "enableI18nLegacyMessageIdFormat": false, 31 | "strictInjectionParameters": true, 32 | "strictInputAccessModifiers": true, 33 | "strictTemplates": true 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /react-native/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /angular/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 3 | "version": "2.0.0", 4 | "tasks": [ 5 | { 6 | "type": "npm", 7 | "script": "start", 8 | "isBackground": true, 9 | "problemMatcher": { 10 | "owner": "typescript", 11 | "pattern": "$tsc", 12 | "background": { 13 | "activeOnStart": true, 14 | "beginsPattern": { 15 | "regexp": "(.*?)" 16 | }, 17 | "endsPattern": { 18 | "regexp": "bundle generation complete" 19 | } 20 | } 21 | } 22 | }, 23 | { 24 | "type": "npm", 25 | "script": "test", 26 | "isBackground": true, 27 | "problemMatcher": { 28 | "owner": "typescript", 29 | "pattern": "$tsc", 30 | "background": { 31 | "activeOnStart": true, 32 | "beginsPattern": { 33 | "regexp": "(.*?)" 34 | }, 35 | "endsPattern": { 36 | "regexp": "bundle generation complete" 37 | } 38 | } 39 | } 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 TradingView, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /android/app/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.android) 3 | alias(libs.plugins.kotlin.android) 4 | } 5 | 6 | android { 7 | namespace = "com.tradingview.android" 8 | compileSdk = libs.versions.sdk.compile.get().toInt() 9 | defaultConfig { 10 | applicationId = "com.tradingview.android" 11 | minSdk = libs.versions.sdk.min.get().toInt() 12 | targetSdk = libs.versions.sdk.compile.get().toInt() 13 | versionCode = 1 14 | versionName = "1.0" 15 | } 16 | buildTypes { 17 | release { 18 | isMinifyEnabled = false 19 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "consumer-rules.pro") 20 | } 21 | } 22 | compileOptions { 23 | sourceCompatibility = JavaVersion.VERSION_17 24 | targetCompatibility = JavaVersion.VERSION_17 25 | } 26 | kotlinOptions { 27 | jvmTarget = "17" 28 | } 29 | buildFeatures { 30 | viewBinding = true 31 | } 32 | } 33 | 34 | dependencies { 35 | implementation(libs.androidx.appcompat) 36 | implementation(libs.androidx.constraintlayout) 37 | } 38 | -------------------------------------------------------------------------------- /react-native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "charting-library-react-native-example", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "lint": "eslint .", 9 | "start": "react-native start", 10 | "test": "jest" 11 | }, 12 | "dependencies": { 13 | "react": "18.2.0", 14 | "react-native": "0.71.2", 15 | "react-native-webview": "^11.26.1" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.20.0", 19 | "@babel/preset-env": "^7.20.0", 20 | "@babel/runtime": "^7.20.0", 21 | "@react-native-community/eslint-config": "^3.2.0", 22 | "@tsconfig/react-native": "^2.0.2", 23 | "@types/jest": "^29.2.1", 24 | "@types/react": "^18.0.24", 25 | "@types/react-test-renderer": "^18.0.0", 26 | "babel-jest": "^29.2.1", 27 | "eslint": "^8.19.0", 28 | "jest": "^29.2.1", 29 | "metro-react-native-babel-preset": "0.73.7", 30 | "prettier": "^2.4.1", 31 | "react-test-renderer": "18.2.0", 32 | "typescript": "4.8.4" 33 | }, 34 | "jest": { 35 | "preset": "react-native" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ruby-on-rails/bin/setup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require "fileutils" 3 | 4 | # path to your application root. 5 | APP_ROOT = File.expand_path("..", __dir__) 6 | 7 | def system!(*args) 8 | system(*args) || abort("\n== Command #{args} failed ==") 9 | end 10 | 11 | FileUtils.chdir APP_ROOT do 12 | # This script is a way to set up or update your development environment automatically. 13 | # This script is idempotent, so that you can run it at any time and get an expectable outcome. 14 | # Add necessary setup steps to this file. 15 | 16 | puts "== Installing dependencies ==" 17 | system! "gem install bundler --conservative" 18 | system("bundle check") || system!("bundle install") 19 | 20 | # puts "\n== Copying sample files ==" 21 | # unless File.exist?("config/database.yml") 22 | # FileUtils.cp "config/database.yml.sample", "config/database.yml" 23 | # end 24 | 25 | puts "\n== Preparing database ==" 26 | system! "bin/rails db:prepare" 27 | 28 | puts "\n== Removing old logs and tempfiles ==" 29 | system! "bin/rails log:clear tmp:clear" 30 | 31 | puts "\n== Restarting application server ==" 32 | system! "bin/rails restart" 33 | end 34 | -------------------------------------------------------------------------------- /angular/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | # All browsers with significant market share 12 | > 1% in US 13 | > 1% in RU 14 | 15 | # Desktop 16 | last 3 Chrome versions 17 | last 3 Edge versions 18 | last 3 Firefox versions 19 | last 3 Safari versions 20 | last 3 Opera versions 21 | 22 | # Mobile 23 | last 3 iOS versions 24 | last 3 ChromeAndroid versions 25 | last 3 Android versions 26 | last 3 FirefoxAndroid versions 27 | 28 | # Restrict min supported versions 29 | not Android < 66 30 | not Chrome < 66 31 | not ChromeAndroid < 66 32 | not Safari < 13 33 | not iOS < 13 34 | 35 | # Long dead browsers 36 | not Explorer <= 11 37 | not ExplorerMobile <= 11 38 | not OperaMini all # Opera mini has very limited JS support, no canvas and no websockets 39 | not OperaMobile <= 12.1 # Opera mobile Presto 40 | 41 | -------------------------------------------------------------------------------- /nuxtjs/nuxt.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // Global page headers: https://go.nuxtjs.dev/config-head 3 | head: { 4 | title: 'Charting Library nuxtjs Demo', 5 | htmlAttrs: { 6 | lang: 'en' 7 | }, 8 | meta: [ 9 | { charset: 'utf-8' }, 10 | { name: 'viewport', content: 'width=device-width, initial-scale=1' }, 11 | { hid: 'description', name: 'description', content: '' } 12 | ], 13 | link: [ 14 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } 15 | ], 16 | script: [ 17 | { src: '/datafeeds/udf/dist/bundle.js' } 18 | ] 19 | }, 20 | 21 | // Global CSS: https://go.nuxtjs.dev/config-css 22 | css: [ 23 | ], 24 | 25 | // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins 26 | plugins: [ 27 | { src: '~/plugins/TVChart.js', mode: 'client' } 28 | ], 29 | 30 | // Auto import components: https://go.nuxtjs.dev/config-components 31 | components: true, 32 | 33 | // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules 34 | buildModules: [ 35 | ], 36 | 37 | // Modules: https://go.nuxtjs.dev/config-modules 38 | modules: [ 39 | ], 40 | 41 | // Build Configuration: https://go.nuxtjs.dev/config-build 42 | build: { 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /nuxtjs/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 63 | -------------------------------------------------------------------------------- /ruby-on-rails/config/initializers/content_security_policy.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Define an application-wide content security policy 4 | # For further information see the following documentation 5 | # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy 6 | 7 | # Rails.application.configure do 8 | # config.content_security_policy do |policy| 9 | # policy.default_src :self, :https 10 | # policy.font_src :self, :https, :data 11 | # policy.img_src :self, :https, :data 12 | # policy.object_src :none 13 | # policy.script_src :self, :https 14 | # policy.style_src :self, :https 15 | # # Specify URI for violation reports 16 | # # policy.report_uri "/csp-violation-report-endpoint" 17 | # end 18 | # 19 | # # Generate session nonces for permitted importmap and inline scripts 20 | # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } 21 | # config.content_security_policy_nonce_directives = %w(script-src) 22 | # 23 | # # Report CSP violations to a specified URI. See: 24 | # # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only 25 | # # config.content_security_policy_report_only = true 26 | # end 27 | -------------------------------------------------------------------------------- /ruby-on-rails/config/storage.yml: -------------------------------------------------------------------------------- 1 | test: 2 | service: Disk 3 | root: <%= Rails.root.join("tmp/storage") %> 4 | 5 | local: 6 | service: Disk 7 | root: <%= Rails.root.join("storage") %> 8 | 9 | # Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) 10 | # amazon: 11 | # service: S3 12 | # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> 13 | # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %> 14 | # region: us-east-1 15 | # bucket: your_own_bucket-<%= Rails.env %> 16 | 17 | # Remember not to checkin your GCS keyfile to a repository 18 | # google: 19 | # service: GCS 20 | # project: your_project 21 | # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %> 22 | # bucket: your_own_bucket-<%= Rails.env %> 23 | 24 | # Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key) 25 | # microsoft: 26 | # service: AzureStorage 27 | # storage_account_name: your_account_name 28 | # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %> 29 | # container: your_container_name-<%= Rails.env %> 30 | 31 | # mirror: 32 | # service: Mirror 33 | # primary: local 34 | # mirrors: [ amazon, google, microsoft ] 35 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | 5 | @implementation AppDelegate 6 | 7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 8 | { 9 | self.moduleName = @"ChartingLibraryExample"; 10 | // You can add your custom initial props in the dictionary below. 11 | // They will be passed down to the ViewController used by React Native. 12 | self.initialProps = @{}; 13 | 14 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 15 | } 16 | 17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 18 | { 19 | #if DEBUG 20 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 21 | #else 22 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 23 | #endif 24 | } 25 | 26 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. 27 | /// 28 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html 29 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). 30 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. 31 | - (BOOL)concurrentRootEnabled 32 | { 33 | return true; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "0.0.0", 4 | "engines": { 5 | "npm": "^10.2.3", 6 | "pnpm": "^9.3.0", 7 | "node": "^18.20.3" 8 | }, 9 | "scripts": { 10 | "ng": "ng", 11 | "start": "ng serve", 12 | "build": "ng build", 13 | "watch": "ng build --watch --configuration development", 14 | "test": "ng test" 15 | }, 16 | "private": true, 17 | "dependencies": { 18 | "@angular/animations": "~18.1.2", 19 | "@angular/common": "~18.1.2", 20 | "@angular/compiler": "~18.1.2", 21 | "@angular/core": "~18.1.2", 22 | "@angular/forms": "~18.1.2", 23 | "@angular/platform-browser": "~18.1.2", 24 | "@angular/platform-browser-dynamic": "~18.1.2", 25 | "@angular/router": "~18.1.2", 26 | "rxjs": "~7.8.1", 27 | "tslib": "^2.6.3", 28 | "zone.js": "~0.14.8" 29 | }, 30 | "devDependencies": { 31 | "@angular-devkit/build-angular": "~18.1.2", 32 | "@angular/cli": "~18.1.2", 33 | "@angular/compiler-cli": "~18.1.2", 34 | "@types/jasmine": "~5.1.4", 35 | "@types/node": "^22.0.0", 36 | "jasmine-core": "~5.2.0", 37 | "karma": "~6.4.4", 38 | "karma-chrome-launcher": "~3.2.0", 39 | "karma-coverage": "~2.2.1", 40 | "karma-jasmine": "~5.1.0", 41 | "karma-jasmine-html-reporter": "~2.1.0", 42 | "typescript": "~5.5.4" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /nextjs/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import Head from "next/head"; 2 | import dynamic from "next/dynamic"; 3 | import { useState } from "react"; 4 | import Script from "next/script"; 5 | 6 | import { 7 | ChartingLibraryWidgetOptions, 8 | ResolutionString, 9 | } from "@/public/static/charting_library/charting_library"; 10 | 11 | const defaultWidgetProps: Partial = { 12 | symbol: "AAPL", 13 | interval: "1D" as ResolutionString, 14 | library_path: "/static/charting_library/", 15 | locale: "en", 16 | charts_storage_url: "https://saveload.tradingview.com", 17 | charts_storage_api_version: "1.1", 18 | client_id: "tradingview.com", 19 | user_id: "public_user_id", 20 | fullscreen: false, 21 | autosize: true, 22 | }; 23 | 24 | const TVChartContainer = dynamic( 25 | () => 26 | import("@/components/TVChartContainer").then((mod) => mod.TVChartContainer), 27 | { ssr: false } 28 | ); 29 | 30 | export default function Home() { 31 | const [isScriptReady, setIsScriptReady] = useState(false); 32 | return ( 33 | <> 34 | 35 | TradingView Charting Library and Next.js 36 | 37 | 45 | 46 |

47 | 48 | 53 | -------------------------------------------------------------------------------- /react-javascript/README.md: -------------------------------------------------------------------------------- 1 | # TradingView Charting Library and React Integration Example (JavaScript) 2 | 3 | The latest supported version of the charting library for these examples is `v28.0.0`. 4 | 5 | ## How to start 6 | 7 | 1. Check that you can view https://github.com/tradingview/charting_library/. If you do not have access then you can [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 8 | 1. Install dependencies `npm install`. 9 | 1. Copy the charting library files 10 | 1. If you are able to run bash scripts then the `copy_charting_library_files.sh` script can be used to copy the current stable version's files. 11 | 1. If you are not able to run bash scripts then do the following: 12 | 1. Copy `charting_library` from https://github.com/tradingview/charting_library/ to `/public` and `/src`. 13 | 1. Copy `datafeeds` from https://github.com/tradingview/charting_library/ to `/public`. 14 | 1. Run `npm start`. It will build the project and open a default browser with the Charting Library. 15 | 16 | ## What is Charting Library 17 | 18 | Charting Library is a standalone solution for displaying charts. This free, downloadable library is hosted on your servers and is connected to your data feed to be used in your website or app. [Learn more and download](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 19 | 20 | ## What is React 21 | 22 | React is a JavaScript library for building user interfaces. It is maintained by Facebook, Instagram and a community of individual developers and corporations. 23 | 24 | ## About This Project 25 | 26 | This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). 27 | -------------------------------------------------------------------------------- /ios-swift/App/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /react-native/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | ios/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | *.keystore 35 | !debug.keystore 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # fastlane 44 | # 45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 46 | # screenshots whenever they are needed. 47 | # For more information about the recommended setup visit: 48 | # https://docs.fastlane.tools/best-practices/source-control/ 49 | 50 | **/fastlane/report.xml 51 | **/fastlane/Preview.html 52 | **/fastlane/screenshots 53 | **/fastlane/test_output 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # Ruby / CocoaPods 59 | /ios/Pods/ 60 | /vendor/bundle/ 61 | 62 | # Temporary files created by Metro to check the health of the file watcher 63 | .metro-health-check* 64 | 65 | ## Charting Library 66 | /android/app/src/main/assets/charting_library 67 | /android/app/src/main/assets/datafeeds 68 | /android/app/src/main/assets/*.html 69 | !/android/app/src/main/assets/index.html 70 | !/android/app/src/main/assets/place-charting-library-here 71 | /ios/charting_library/charting_library 72 | /ios/charting_library/datafeeds 73 | /ios/charting_library/*.html 74 | !/ios/charting_library/index.html 75 | !/ios/charting_library/place-charting-library-here 76 | /yarn.lock 77 | /package-lock.json 78 | -------------------------------------------------------------------------------- /ios-swift/README.md: -------------------------------------------------------------------------------- 1 | # TradingView Charting Library iOS (Swift version) Integration Example 2 | 3 | Latest tested version of the library with this example is `v29.2.0` with Xcode `16.3` and iOS `18.2`. 4 | 5 | ## How to start 6 | 7 | 1. Check that you can view https://github.com/tradingview/charting_library/. If you do not have access then you can [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 8 | 1. Open Example.xcodeproj in Xcode. 9 | 1. Click on `Example` folder at the very top of the `Project Navigator`. 10 | 1. In the inner menu on the left, select `Example` under `TARGETS`. 11 | 1. Select the `Build Phases` tab at the top of the window. 12 | 1. Under `Copy Bundle Resources` select the `+` icon. 13 | 1. Click on `"Add Other..."` button. 14 | 1. Browse and identify all the files downloaded from `https://github.com/tradingview/charting_library/`. **Note**: Unlike some of the other examples you should copy all files from the repository not just the `datafeeds` and `charting_library` directories. 15 | 1. Select `"Create folder references"`. **Note**: This is important because the library contains files with the same name, but in different folders, so the "Create folder references" option adds files to your application bundle with the same folder structure as in the library. 16 | 1. Select all files added to project and move them to the `ChartingLibrary` folder. 17 | 1. Lastly, build the application. 18 | 19 | ## What is Charting Library 20 | 21 | Charting Library is a standalone solution for displaying charts. This free, downloadable library is hosted on your servers and is connected to your data feed to be used in your website or app. [Learn more and download](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 22 | 23 | -------------------------------------------------------------------------------- /angular/README.md: -------------------------------------------------------------------------------- 1 | # TradingView Charting Library and Angular Integration Example 2 | 3 | The earliest supported version of the charting library for these examples is `v28.0.0`. 4 | 5 | ## How to start 6 | 7 | 1. Check that you can view https://github.com/tradingview/charting_library/. If you do not have access then you can [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 8 | 1. Install dependencies with `npm install`. 9 | 1. Copy the charting library files 10 | 1. If you are able to run bash scripts then the `copy_charting_library_files.sh` script can be used to copy the current stable version's files. 11 | 1. If you are not able to run bash scripts then do the following: 12 | 1. Copy `charting_library` folder from https://github.com/tradingview/charting_library/ to `/src/assets`. 13 | 1. Copy `datafeeds` folder from https://github.com/tradingview/charting_library/ to `/src/assets`. 14 | 1. Run `./node_modules/.bin/ng serve` (use `"./node_modules/.bin/ng" serve` in Windows) for a dev server and navigate to `http://localhost:4200/`. 15 | 16 | ## What is Charting Library 17 | 18 | Charting Library is a standalone solution for displaying charts. This free, downloadable library is hosted on your servers and is connected to your data feed to be used in your website or app. [Learn more and download](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 19 | 20 | ## What is Angular 21 | 22 | Angular is a platform that makes it easy to build applications with the web. Angular combines declarative templates, dependency injection, end to end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or the desktop. [Learn more](https://angular.io/docs). 23 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ChartingLibraryExample 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ruby-on-rails/app/assets/javascripts/tv-chart-widget-init.js: -------------------------------------------------------------------------------- 1 | function getLanguageFromURL() { 2 | const regex = new RegExp('[\\?&]lang=([^&#]*)'); 3 | const results = regex.exec(location.search); 4 | 5 | return results === null ? null : decodeURIComponent(results[1].replace(/\+/g, ' ')); 6 | } 7 | 8 | document.getElementById('header-text').textContent += TradingView.version(); 9 | 10 | function initOnReady() { 11 | var widget = window.tvWidget = new TradingView.widget({ 12 | symbol: 'AAPL', 13 | // BEWARE: no trailing slash is expected in feed URL 14 | // tslint:disable-next-line:no-any 15 | datafeed: new window.Datafeeds.UDFCompatibleDatafeed('https://demo_feed.tradingview.com'), 16 | interval: 'D', 17 | container: document.getElementById('tv_chart_container'), 18 | library_path: '/charting_library/', 19 | 20 | locale: getLanguageFromURL() || 'en', 21 | disabled_features: ['use_localstorage_for_settings'], 22 | enabled_features: ['study_templates'], 23 | charts_storage_url: 'https://saveload.tradingview.com', 24 | charts_storage_api_version: '1.1', 25 | client_id: 'tradingview.com', 26 | user_id: 'public_user_id', 27 | fullscreen: false, 28 | autosize: true, 29 | studies_overrides: {}, 30 | }); 31 | 32 | widget.onChartReady(() => { 33 | widget.headerReady().then(() => { 34 | const button = widget.createButton(); 35 | 36 | button.setAttribute('title', 'Click to show a notification popup'); 37 | button.classList.add('apply-common-tooltip'); 38 | 39 | button.addEventListener('click', () => widget.showNoticeDialog({ 40 | title: 'Notification', 41 | body: 'TradingView Charting Library API works correctly', 42 | callback: () => { 43 | console.log('Noticed!'); 44 | }, 45 | })); 46 | 47 | button.innerHTML = 'Check API'; 48 | }); 49 | }); 50 | }; 51 | 52 | window.addEventListener('DOMContentLoaded', initOnReady, false); 53 | -------------------------------------------------------------------------------- /sveltekit/README.md: -------------------------------------------------------------------------------- 1 | # TradingView Charting Library and Sveltekit(Svelte) Integration Example 2 | 3 | The earliest supported version of the charting library for these examples is `v28.0.0`. 4 | 5 | ## How to start 6 | 7 | 1. Check that you can view 8 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/). 9 | If you do not have access then you can 10 | [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 11 | 1. Install dependencies `npm install`. 12 | 1. Copy the charting library files 13 | 1. If you are able to run bash scripts then the 14 | `copy_charting_library_files.sh` script can be used to copy the current 15 | stable version's files. 16 | 1. If you are not able to run bash scripts then do the following: 17 | 1. Copy the `charting_library` folder from 18 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/) 19 | to `/static` and `/src/lib` folder. 20 | 1. Copy the `datafeeds` folder from 21 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/) 22 | to `/src/lib`. 23 | 1. Run `npm run dev` to run the app in development mode 24 | with the Charting Library. 25 | 1. Run `npm run build` To create a production version of your app. 26 | > You can preview the production build with `npm run preview`. 27 | 28 | ## What is Charting Library 29 | 30 | Charting Library is a standalone solution for displaying charts. This free, 31 | downloadable library is hosted on your servers and is connected to your data 32 | feed to be used in your website or app. 33 | [Learn more and download](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 34 | 35 | ## Credit 36 | 37 | Example kindly provided by [Razz19](https://github.com/Razz19) 38 | -------------------------------------------------------------------------------- /ruby-on-rails/public/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | We're sorry, but something went wrong (500) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

We're sorry, but something went wrong.

62 |
63 |

If you are the application owner check the logs for more information.

64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /nextjs-javascript/README.md: -------------------------------------------------------------------------------- 1 | # TradingView Charting Library and Nextjs Integration Example (JavaScript) 2 | 3 | The earliest supported version of the charting library for these examples is `v28.0.0`. 4 | 5 | ## How to start 6 | 7 | 1. Check that you can view https://github.com/tradingview/charting_library/. If you do not have access then you can [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 8 | 1. Install dependencies `npm install`. 9 | 1. Copy the charting library files 10 | 1. If you are able to run bash scripts then the `copy_charting_library_files.sh` script can be used to copy the current stable version's files. 11 | 1. If you are not able to run bash scripts then do the following: 12 | 1. Copy `charting_library` folder from https://github.com/tradingview/charting_library/ to `/public/static` folders. 13 | 1. Copy `datafeeds` folder from https://github.com/tradingview/charting_library/ to `/public/static`. 14 | 1. Run `npm run build` and `npm run start`. It will build the project and open a default browser with the Charting Library. 15 | 1. Run `npm run dev` when you start to develop with this project. 16 | 17 | ## What is Charting Library 18 | 19 | Charting Library is a standalone solution for displaying charts. This free, downloadable library is hosted on your servers and is connected to your data feed to be used in your website or app. [Learn more and download](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 20 | 21 | ## What is React 22 | 23 | React is a JavaScript library for building user interfaces. It is maintained by Facebook, Instagram and a community of individual developers and corporations. 24 | 25 | ## What is Nextjs 26 | 27 | Nextjs is React Sever Side Rendering Framework for React with zero-configuration. 28 | 29 | ## About This Project 30 | 31 | This project was bootstrapped with [NextJs](https://github.com/zeit/next.js). 32 | -------------------------------------------------------------------------------- /ruby-on-rails/config/puma.rb: -------------------------------------------------------------------------------- 1 | # Puma can serve each request in a thread from an internal thread pool. 2 | # The `threads` method setting takes two numbers: a minimum and maximum. 3 | # Any libraries that use thread pools should be configured to match 4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum 5 | # and maximum; this matches the default thread size of Active Record. 6 | # 7 | max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } 8 | min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } 9 | threads min_threads_count, max_threads_count 10 | 11 | # Specifies the `worker_timeout` threshold that Puma will use to wait before 12 | # terminating a worker in development environments. 13 | # 14 | worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" 15 | 16 | # Specifies the `port` that Puma will listen on to receive requests; default is 3000. 17 | # 18 | port ENV.fetch("PORT") { 3000 } 19 | 20 | # Specifies the `environment` that Puma will run in. 21 | # 22 | environment ENV.fetch("RAILS_ENV") { "development" } 23 | 24 | # Specifies the `pidfile` that Puma will use. 25 | pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } 26 | 27 | # Specifies the number of `workers` to boot in clustered mode. 28 | # Workers are forked web server processes. If using threads and workers together 29 | # the concurrency of the application would be max `threads` * `workers`. 30 | # Workers do not work on JRuby or Windows (both of which do not support 31 | # processes). 32 | # 33 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 } 34 | 35 | # Use the `preload_app!` method when specifying a `workers` number. 36 | # This directive tells Puma to first boot the application and load code 37 | # before forking the application. This takes advantage of Copy On Write 38 | # process behavior so workers use less memory. 39 | # 40 | # preload_app! 41 | 42 | # Allow puma to be restarted by `bin/rails restart` command. 43 | plugin :tmp_restart 44 | -------------------------------------------------------------------------------- /ruby-on-rails/public/422.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The change you wanted was rejected (422) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The change you wanted was rejected.

62 |

Maybe you tried to change something you didn't have access to.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /nextjs/README.md: -------------------------------------------------------------------------------- 1 | # TradingView Charting Library and Nextjs Integration Example (JavaScript) 2 | 3 | The earliest supported version of the Charting Library for these examples is `v28.0.0`. 4 | 5 | **This example is intended to cover Nextjs from v13 onwards.** 6 | 7 | ## How to start 8 | 9 | 1. Check that you can view . If you do not have access then you can [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 10 | 1. Install dependencies `npm install`. 11 | 1. Copy the charting library files 12 | 1. If you are able to run bash scripts then the `copy_charting_library_files.sh` script can be used to copy the current stable version's files. 13 | 1. If you are not able to run bash scripts then do the following: 14 | 1. Copy `charting_library` folder from to `/public/static` folders. 15 | 1. Copy `datafeeds` folder from to `/public/static`. 16 | 1. Run `npm run build` and `npm run start`. It will build the project and open a default browser with the Charting Library. 17 | 1. Run `npm run dev` when you start to develop with this project. 18 | 19 | ## What is Charting Library 20 | 21 | Charting Library is a standalone solution for displaying charts. This free, downloadable library is hosted on your servers and is connected to your data feed to be used in your website or app. [Learn more and download](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 22 | 23 | ## What is React 24 | 25 | React is a JavaScript library for building user interfaces. It is maintained by Facebook, Instagram and a community of individual developers and corporations. 26 | 27 | ## What is Nextjs 28 | 29 | Nextjs is React Sever Side Rendering Framework for React with zero-configuration. 30 | 31 | ## About This Project 32 | 33 | This project was bootstrapped with [NextJs](https://github.com/zeit/next.js). 34 | -------------------------------------------------------------------------------- /ruby-on-rails/public/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | The page you were looking for doesn't exist (404) 5 | 6 | 55 | 56 | 57 | 58 | 59 |
60 |
61 |

The page you were looking for doesn't exist.

62 |

You may have mistyped the address or the page may have moved.

63 |
64 |

If you are the application owner check the logs for more information.

65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /ios-swift/App/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /react-native/android/app/src/main/assets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TradingView Charting Library demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 49 | 50 | 51 | 52 | 53 |
54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /react-native/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.125.0 29 | 30 | # Use this property to specify which architecture you want to build. 31 | # You can also override it from the CLI using 32 | # ./gradlew -PreactNativeArchitectures=x86_64 33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 34 | 35 | # Use this property to enable support to the new architecture. 36 | # This will allow you to use TurboModules and the Fabric render in 37 | # your application. You should enable this flag either if you want 38 | # to write custom TurboModules/Fabric components OR use libraries that 39 | # are providing them. 40 | newArchEnabled=false 41 | 42 | # Use this property to enable or disable the Hermes JS engine. 43 | # If set to false, you will be using JSC instead. 44 | hermesEnabled=true 45 | -------------------------------------------------------------------------------- /vuejs/README.md: -------------------------------------------------------------------------------- 1 | # TradingView Charting Library and Vue.js 2 Integration Example 2 | 3 | ⚠️ Note: This example is for Vue 2. 4 | 5 | The latest supported version of the charting library for these examples is `v28.0.0`. 6 | 7 | ## How to start 8 | 9 | 1. Check that you can view 10 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/). 11 | If you do not have access then you can 12 | [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 13 | 1. Install dependencies `npm install`. 14 | 1. Copy the charting library files 15 | 1. If you are able to run bash scripts then the 16 | `copy_charting_library_files.sh` script can be used to copy the current 17 | stable version's files. 18 | 1. If you are not able to run bash scripts then do the following: 19 | 1. Copy the `charting_library` folder from 20 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/) 21 | to `/public` folder. 22 | 1. Copy the `datafeeds` folder from 23 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/) 24 | to `/public`. 25 | 1. Run `npm run dev`. It will build the project and open a default browser 26 | with the Charting Library. 27 | 1. Run `npm run build` when you are ready to build the Vue application for deployment. 28 | 29 | ## What is Charting Library 30 | 31 | Charting Library is a standalone solution for displaying charts. This free, 32 | downloadable library is hosted on your servers and is connected to your data 33 | feed to be used in your website or app. 34 | [Learn more and download](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 35 | 36 | ## What is Vue.js 37 | 38 | Vue is a progressive framework for building user interfaces. Unlike other 39 | monolithic frameworks, Vue is designed from the ground up to be incrementally 40 | adoptable. The core library is focused on the view layer only, and is easy to 41 | pick up and integrate with other libraries or existing projects. 42 | -------------------------------------------------------------------------------- /vuejs3/README.md: -------------------------------------------------------------------------------- 1 | # TradingView Charting Library and Vue.js 3 Integration Example 2 | 3 | ⚠️ Note: This example is for Vue 3. 4 | 5 | The latest supported version of the charting library for these examples is `v28.0.0`. 6 | 7 | ## How to start 8 | 9 | 1. Check that you can view 10 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/). 11 | If you do not have access then you can 12 | [request access to this repository here](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 13 | 1. Install dependencies `npm install`. 14 | 1. Copy the charting library files 15 | 1. If you are able to run bash scripts then the 16 | `copy_charting_library_files.sh` script can be used to copy the current 17 | stable version's files. 18 | 1. If you are not able to run bash scripts then do the following: 19 | 1. Copy the `charting_library` folder from 20 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/) 21 | to `/public` folder. 22 | 1. Copy the `datafeeds` folder from 23 | [https://github.com/tradingview/charting_library/](https://github.com/tradingview/charting_library/) 24 | to `/public`. 25 | 1. Run `npm run dev`. It will build the project and open a default browser 26 | with the Charting Library. 27 | 1. Run `npm run build` when you are ready to build the Vue application for deployment. 28 | 29 | ## What is Charting Library 30 | 31 | Charting Library is a standalone solution for displaying charts. This free, 32 | downloadable library is hosted on your servers and is connected to your data 33 | feed to be used in your website or app. 34 | [Learn more and download](https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/). 35 | 36 | ## What is Vue.js 37 | 38 | Vue is a progressive framework for building user interfaces. Unlike other 39 | monolithic frameworks, Vue is designed from the ground up to be incrementally 40 | adoptable. The core library is focused on the view layer only, and is easy to 41 | pick up and integrate with other libraries or existing projects. 42 | -------------------------------------------------------------------------------- /react-native/android/app/src/main/java/com/chartinglibraryexample/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.chartinglibraryexample; 2 | 3 | import android.app.Application; 4 | import com.facebook.react.PackageList; 5 | import com.facebook.react.ReactApplication; 6 | import com.facebook.react.ReactNativeHost; 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 9 | import com.facebook.react.defaults.DefaultReactNativeHost; 10 | import com.facebook.soloader.SoLoader; 11 | import java.util.List; 12 | 13 | public class MainApplication extends Application implements ReactApplication { 14 | 15 | private final ReactNativeHost mReactNativeHost = 16 | new DefaultReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | @SuppressWarnings("UnnecessaryLocalVariable") 25 | List packages = new PackageList(this).getPackages(); 26 | // Packages that cannot be autolinked yet can be added manually here, for example: 27 | // packages.add(new MyReactNativePackage()); 28 | return packages; 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | 36 | @Override 37 | protected boolean isNewArchEnabled() { 38 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 39 | } 40 | 41 | @Override 42 | protected Boolean isHermesEnabled() { 43 | return BuildConfig.IS_HERMES_ENABLED; 44 | } 45 | }; 46 | 47 | @Override 48 | public ReactNativeHost getReactNativeHost() { 49 | return mReactNativeHost; 50 | } 51 | 52 | @Override 53 | public void onCreate() { 54 | super.onCreate(); 55 | SoLoader.init(this, /* native exopackage */ false); 56 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 57 | // If you opted-in for the New Architecture, we load the native entry point for this app. 58 | DefaultNewArchitectureEntryPoint.load(); 59 | } 60 | ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /react-native/ios/ChartingLibraryExampleTests/ChartingLibraryExampleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface ChartingLibraryExampleTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ChartingLibraryExampleTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction( 38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 39 | if (level >= RCTLogLevelError) { 40 | redboxError = message; 41 | } 42 | }); 43 | #endif 44 | 45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | 49 | foundElement = [self findSubviewInView:vc.view 50 | matching:^BOOL(UIView *view) { 51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 52 | return YES; 53 | } 54 | return NO; 55 | }]; 56 | } 57 | 58 | #ifdef DEBUG 59 | RCTSetLogFunction(RCTDefaultLogFunction); 60 | #endif 61 | 62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /ios-swift/App/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // iOS 4 | // 5 | // Created by TradingView on 04.10.2018. 6 | // Copyright © 2018 Example Inc. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /react-native/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, min_ios_version_supported 5 | prepare_react_native_project! 6 | 7 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. 8 | # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded 9 | # 10 | # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` 11 | # ```js 12 | # module.exports = { 13 | # dependencies: { 14 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), 15 | # ``` 16 | flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled 17 | 18 | linkage = ENV['USE_FRAMEWORKS'] 19 | if linkage != nil 20 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 21 | use_frameworks! :linkage => linkage.to_sym 22 | end 23 | 24 | target 'ChartingLibraryExample' do 25 | config = use_native_modules! 26 | 27 | # Flags change depending on the env values. 28 | flags = get_default_flags() 29 | 30 | use_react_native!( 31 | :path => config[:reactNativePath], 32 | # Hermes is now enabled by default. Disable by setting this flag to false. 33 | # Upcoming versions of React Native may rely on get_default_flags(), but 34 | # we make it explicit here to aid in the React Native upgrade process. 35 | :hermes_enabled => flags[:hermes_enabled], 36 | :fabric_enabled => flags[:fabric_enabled], 37 | # Enables Flipper. 38 | # 39 | # Note that if you have use_frameworks! enabled, Flipper will not work and 40 | # you should disable the next line. 41 | :flipper_configuration => flipper_config, 42 | # An absolute path to your application root. 43 | :app_path => "#{Pod::Config.instance.installation_root}/.." 44 | ) 45 | 46 | target 'ChartingLibraryExampleTests' do 47 | inherit! :complete 48 | # Pods for testing 49 | end 50 | 51 | post_install do |installer| 52 | react_native_post_install( 53 | installer, 54 | # Set `mac_catalyst_enabled` to `true` in order to apply patches 55 | # necessary for Mac Catalyst builds 56 | :mac_catalyst_enabled => false 57 | ) 58 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 59 | end 60 | end 61 | -------------------------------------------------------------------------------- /nextjs/components/TVChartContainer/index.tsx: -------------------------------------------------------------------------------- 1 | import styles from "./index.module.css"; 2 | import { useEffect, useRef } from "react"; 3 | import { ChartingLibraryWidgetOptions, LanguageCode, ResolutionString, widget } from "@/public/static/charting_library"; 4 | 5 | export const TVChartContainer = (props: Partial) => { 6 | const chartContainerRef = 7 | useRef() as React.MutableRefObject; 8 | 9 | useEffect(() => { 10 | const widgetOptions: ChartingLibraryWidgetOptions = { 11 | symbol: props.symbol, 12 | // BEWARE: no trailing slash is expected in feed URL 13 | datafeed: new (window as any).Datafeeds.UDFCompatibleDatafeed( 14 | "https://demo_feed.tradingview.com", 15 | undefined, 16 | { 17 | maxResponseLength: 1000, 18 | expectedOrder: "latestFirst", 19 | } 20 | ), 21 | interval: props.interval as ResolutionString, 22 | container: chartContainerRef.current, 23 | library_path: props.library_path, 24 | locale: props.locale as LanguageCode, 25 | disabled_features: ["use_localstorage_for_settings"], 26 | enabled_features: ["study_templates"], 27 | charts_storage_url: props.charts_storage_url, 28 | charts_storage_api_version: props.charts_storage_api_version, 29 | client_id: props.client_id, 30 | user_id: props.user_id, 31 | fullscreen: props.fullscreen, 32 | autosize: props.autosize 33 | }; 34 | 35 | const tvWidget = new widget(widgetOptions); 36 | 37 | tvWidget.onChartReady(() => { 38 | tvWidget.headerReady().then(() => { 39 | const button = tvWidget.createButton(); 40 | button.setAttribute("title", "Click to show a notification popup"); 41 | button.classList.add("apply-common-tooltip"); 42 | button.addEventListener("click", () => 43 | tvWidget.showNoticeDialog({ 44 | title: "Notification", 45 | body: "TradingView Charting Library API works correctly", 46 | callback: () => { 47 | console.log("Noticed!"); 48 | }, 49 | }) 50 | ); 51 | 52 | button.innerHTML = "Check API"; 53 | }); 54 | }); 55 | 56 | return () => { 57 | tvWidget.remove(); 58 | }; 59 | }, [props]); 60 | 61 | return ( 62 | <> 63 |
64 |

65 | TradingView Charting Library and Next.js Integration Example 66 |

67 |
68 |
69 | 70 | ); 71 | }; 72 | --------------------------------------------------------------------------------