Valval used a whole new idea to implement the template function; inspired by Vue’s system.
Has the following advantages:
You don’t need to spend time learning how to use templates, if you have used Vue before.
If you haven’t used Vue, you also can learn it fast, because it’s so easy.
It can integrate some commonly used UI frameworks, such as: element, mint, vant, antd, bootstrap…
I don’t need to spend time developing built-in templates 😁.
An example for template:
server.v:
importvalvalimportjsonstructUser {
name string
age int
sex bool
}
fnusers(req valval.Request) valval.Response {
// create a view by template file (`test6.html` can be a relative or absolute path)// use `element` (https://github.com/ElemeFE/element) as ui frameworkmutview:= valval.new_view(req, 'users.html', 'element') or {
return valval.response_bad(err)
}
users:= [
User{'Lucy', 13, false},
User{'Lily', 13, false},
User{'Jim', 12, true},
]
msg:='This is a page of three user'// use view.set to bind data for rendering template// the second parameter must be a json string
view.set('users', json.encode(users))
view.set('msg', json.encode(msg))
return valval.response_view(view)
}
Modify the config.ini file with your database credentials.
Ensure that the required database is set up and accessible.
Run the code examples and Examples using Poetry:
poetry run python script_name.py
Example
Example 1: Database Migrations with Alembic
Learn how to manage database migrations using Alembic, a powerful database migration tool for SQLAlchemy. Understand the process of synchronizing the database schema with your application code as it evolves over time.
Example Highlights:
Setting up Alembic configuration
Creating and running migrations
Handling offline and online migrations
Example 2: CRUD Operations
Master the basic CRUD operations (Create, Read, Update, Delete) in SQLAlchemy. Explore different techniques for creating, reading, updating, and deleting records from a database using SQLAlchemy’s powerful ORM capabilities.
Example Highlights:
Creating records
Retrieving records
Updating records
Deleting records
Example 3: Seeding Sample Data
Learn how to seed your database with sample data using Faker, a Python library for generating fake data. Discover techniques for populating your database with realistic test data to facilitate development and testing.
Example Highlights:
Generating fake data with Faker
Seeding records for teachers, students, subjects, grades, and groups
Example 4: CLI for Database Operations
Build a command-line interface (CLI) tool to perform database operations. Create a user-friendly interface that allows users to execute CRUD operations on the database using command-line arguments.
Example Highlights:
Parsing command-line arguments with argparse
Implementing create, read, update, and delete functionality
Handling exceptions and error messages
Example 5: Advanced Database Queries
Explore advanced database query techniques using SQLAlchemy. Learn how to perform complex queries to retrieve specific information from the database, such as aggregations, filtering, sorting, and joining multiple tables.
Example Highlights:
Aggregating data and calculating averages
Filtering and sorting results
Joining tables and retrieving related data
Executing complex queries
Contributing
Contributions to this repository are welcome! If you have any improvements, bug fixes, or additional Examples/code examples to share, feel free to submit a pull request or open an issue. Let’s learn and grow together!
Welcome to Synology-Homebrew – the easiest and safest way to get Homebrew running on your Synology NAS or macOS device.
This installer:
Ensures Homebrew is correctly mounted on DSM 7.2+
Avoids overwriting or deleting existing Synology packages
Comes with a full uninstall option
Mirrors your terminal setup on macOS (Intel & Apple Silicon)
📦 Whether you’re setting up Neovim, configuring plugins with config.yaml, or building a powerful shell with zsh and oh-my-zsh, this repo helps you do it cleanly and consistently.
💡 Why Homebrew on Synology or macOS?
Homebrew, the package manager for macOS and Linux, unlocks a vast ecosystem of open-source tools. On Synology NAS, this means:
Installing modern CLI tools without waiting for package updates
Using advanced dev environments on low-power NAS devices
Sharing dotfiles/config across macOS & NAS seamlessly
🔧 Key Features
Installation Modes: Minimal or Advanced setups based on your needs.
Synology Integration: Coexists with Synology packages without removing or breaking system services.
Cross-Platform: Use the same config on Synology NAS, Intel Macs, and Apple Silicon.
Safe Uninstall: Revert your system to its original state using the provided script.
Zsh & Theme Setup: Comes with oh-my-zsh, powerlevel10k, and aliases for a powerful terminal experience.
Neovim Ready: Optional full Neovim configuration via kickstart.nvim or your custom dotfiles.
🛡️ Security & Trust
This script is designed with safety in mind:
No hidden network calls to unknown sources.
Does not capture credentials or sudo passwords.
Respects your Synology environment – does not remove or conflict with built-in packages.
Full uninstall script included for rollback.
All code is open-source and auditable. Submit issues or PRs to improve security.
⚙️ Installation Guide
🚀 Quick Start (Synology NAS)
SSH into your Synology NAS (DSM 7.2 or newer).
Run the following command to clone the repo and launch the installer:
#!/bin/bash# Ensure /home exists
[[ !-d /home ]] && sudo mkdir /home
# Only mount if it's not already a mountpointif! grep -qs ' /home ' /proc/mounts;then
sudo mount -o bind"$(readlink -f /var/services/homes)" /home
fi# Permission fixes
sudo chown root:root /home
sudo chmod 775 /home
if [[ -d /home/linuxbrew ]];then
sudo chown root:root /home/linuxbrew
sudo chmod 775 /home/linuxbrew
fi
🛠️ Configure Packages with config.yaml
If you chose Advanced Install, your setup is driven by a YAML configuration file.
This file lets you define exactly what packages, plugins, themes, and aliases to install. It’s fully customizable — just edit the actions or add your own!
📂 File Location
After cloning this repo, you’ll find the config file at:
~/Synology-Homebrew/config.yaml
Open it in your favorite editor:
nvim ~/Synology-Homebrew/config.yaml
# or
nano ~/Synology-Homebrew/config.yaml
⚙️ Available Actions
Each item (package, plugin, etc.) supports three actions:
This project will attempt to convert the FAR into separate database entries, each ontaining HTML text for each of its’ respective sections. This way, regulation information can be pulled whenever required, centrally stored in one secure location, and updated securely as a result.
2.0 – Possibilities
The main reason I wanted to create an API for the FAR was to implement a web app that will allow users to search for any number of regulations simultaneously. Acquisition professional must do this everyday anyway, and the way the regulations are currently established online, only one regulation can be viewed at a same time. People have been doing this for years, so I guess this isn’t too big of a problem, but there is room for at least some improvement.
Having an API for the FAR will allow the web app to automatically detect when a selected reference from the FAR is available in another reference. Viewing regulations side-by-side can greatly help with the day-to-day searching and reading since all verbiage pertaining to the users’ desired subject can now be had quicker in one tab, instead of having to find it in multiple tabs.
In theory, if the FAR were stored in a database and referenced at ease, the system will be able to tell if a supplemental regulation further implements the FAR. Even if it doesn’t apply, at least the API will allow the user to view the text (HTML) conveniently in front of them regardless. Utilizing proper hyperlinks will allow for faster and easier browsing (see problem below) as well as faster, easier, and more accurate analyzing of the regulations.
3.0 – Problems With the Current System
In addition to creating a web app, the current regulations posted on acquisition.gov have several problems.
3.1 – Paragraphs and Lists
The HTML structure of the FAR is not consistent among each regulation. Here is a table of how each regulation indents their paragraphs:
As you can see, the vast majority of the regulations don’t even have indents. Those that do never have their text line up with the indent itself and end up trail well past the indentation, which defeats the purpose of showing a list.
If all the regulation had the same formatting and structure, perusing their contents will easier and more efficient. The current version of the FAR isn’t unreadable, but it could use some improvements.
3.3.- Hyperlinks with Arbitrary Names
Scoring through the HTML code, you can find numerous examples of hyperlink ID’s that make no sense at all. Take HHSAR part 317: the contents of this has almost not a single id that makes logical sense. For example, what exactly is P8_300 supposed to mean in a section that direcetly preceeds P18_1718?
Each section should have a hyperlink of course, but how about a more generalized format such as the actual reference of the text in the regulation? P8_300 is the hyperlink ID for HHSAR 317.105-1. What if it was called 0317_105_1 so that we can parse this ID and easily get the part, section, and subsection? Having links like this in a more standardized format will allow setting up the webpage so much easier and more convenient. A solid foundation eases future edits.
3.3 – Separate HTML Files for Every Subsection
I believe that each subsection for every regulation deserves to be it’s own object in some sort of database to be pulled or edited at will. However, each of these subsections absolutely does not need to be their own HTML file.
Individuals in the acquisition field are not trained to read just the specific verbiage of text that relates to their requirement: they are taught to ‘zoom-out’ to the prescription of said text, then to ‘zoom-out’ even further to see if it still applies. This ‘zooming-out’ is crucial to ensuring any and all text applies to the issues at hand, and having one HTML file per subsection is inefficient, unnecessary, and wasteful of space.
The good news is, much of the regulations are already strcutured this way. This problem isn’t too big among the supplements, but when it gets to the DFARS, all the text pertaining to each section and subsection brings users to individual links for not only each text, but the Table of Contents for each section. Above all, this is annoying since ‘zooming-out’ entitles you to hit the back button about four or five times before you actually get to where you need to reference.
If every part of every regulation were just one HTML file, searching through contents will be so much easier. Once users find the paragraph they require, they simple just scroll up to read the prescription, scroll-up even more to read more prescriptions, and finally scroll to the top to insure everything complies. Again, this feature does exist but there are still separate HTML files lurking through the website waiting to catch users in a sticky web of inefficiency.
In conclusion, having separate HTML files for each subsection:
makes it harder to manage code, since there would need to be a # in links to distinguish separate files
increases file bloat and system capacity
makes the users’ jobs harder by spending more energy trying to find prescriptions
is completely unnecessary
Why mention this with the API? The database will store the HTML for each subsection and generating the one HTML file for the regulation’s part will just be a matter of combining all the appropriate objects together. This may even be how it is managed…
3.4 – Mobile Versions an Unneeded Luxury
The current system uses a DITA system to manage their content which seems perfect for this but in all honesty, a mobile version of the FAR is just not warranted. Users who routinely seach trough the FAR don’t use it on mobile devices, but on computers. This may seem counterintuitive to today’s society, but a mobile version is just not required for the vast majority of acquisitions professionals.
But in either case, a FAR API will be able to send information to any device which will reduce the need to have multiple formats for the same publication.
4.0 – Complications with an API
This project will not be without its problems. There are of course many things that could go wrong with this approach, which will be explained below for transparency.
4.1 – It won’t be Searchable
Part of why having the FAR is valuable in HTML is that google can do its thing and search for exactly where a regulation is required. This puts acquisition.gov above the rest, as their layouts are very clean and obviously well taken care-of. Besides from both of the problems above, I don’t see any other website taking the reigns off of them to house the FAR.
This supposed web app may be very useful and convenient, but it will lack the searching power of having these regs in HTML. This alone almost begs the question as to why even build this thing if you can’t search in it? Maybe there is a way to integrate searching in this, which would make this even greater, but that’s another project within this project.
So with all this said, this web app will primarily be a nice tool to supplement the FAR – meant for people who already know where to look for a specific reference and needing to see whether this reference is referenced in any number of regulations. Limited capablities, but convenient.
4.3.- Text Will Still Need to be Manually Updated
Either way, the FAR will need to be updated to reflect the many changes that update on a normal basis. This means that there will probably be more work involved with managing an API along with the text itself. Perhaps the DITA packages currently in use are perfect for the job already.
4.3 – Potentially Costly
Having an API with constant data calls could potentially be more costly than just having HTML sitting on a website. The traditional website design that isn’t like a web app is tried and true and more than likely isn’t generating heavy costs. An AWS account that gets charged by the click could rack up many expenses.
4.4 – Lack of Other Users
This goes with 4.3 above, but if the sole purpose of this API is to provide a more dynamic FAR, then it may not be as useful as we can imagine. What would be great is if there were many sources of information pulling the API to get text. Perhaps the contracting systems can pull this information to apply clauses, but there is no guarantee that this will even be a possibility among them.
This project will attempt to convert the FAR into separate database entries, each ontaining HTML text for each of its’ respective sections. This way, regulation information can be pulled whenever required, centrally stored in one secure location, and updated securely as a result.
2.0 – Possibilities
The main reason I wanted to create an API for the FAR was to implement a web app that will allow users to search for any number of regulations simultaneously. Acquisition professional must do this everyday anyway, and the way the regulations are currently established online, only one regulation can be viewed at a same time. People have been doing this for years, so I guess this isn’t too big of a problem, but there is room for at least some improvement.
Having an API for the FAR will allow the web app to automatically detect when a selected reference from the FAR is available in another reference. Viewing regulations side-by-side can greatly help with the day-to-day searching and reading since all verbiage pertaining to the users’ desired subject can now be had quicker in one tab, instead of having to find it in multiple tabs.
In theory, if the FAR were stored in a database and referenced at ease, the system will be able to tell if a supplemental regulation further implements the FAR. Even if it doesn’t apply, at least the API will allow the user to view the text (HTML) conveniently in front of them regardless. Utilizing proper hyperlinks will allow for faster and easier browsing (see problem below) as well as faster, easier, and more accurate analyzing of the regulations.
3.0 – Problems With the Current System
In addition to creating a web app, the current regulations posted on acquisition.gov have several problems.
3.1 – Paragraphs and Lists
The HTML structure of the FAR is not consistent among each regulation. Here is a table of how each regulation indents their paragraphs:
As you can see, the vast majority of the regulations don’t even have indents. Those that do never have their text line up with the indent itself and end up trail well past the indentation, which defeats the purpose of showing a list.
If all the regulation had the same formatting and structure, perusing their contents will easier and more efficient. The current version of the FAR isn’t unreadable, but it could use some improvements.
3.3.- Hyperlinks with Arbitrary Names
Scoring through the HTML code, you can find numerous examples of hyperlink ID’s that make no sense at all. Take HHSAR part 317: the contents of this has almost not a single id that makes logical sense. For example, what exactly is P8_300 supposed to mean in a section that direcetly preceeds P18_1718?
Each section should have a hyperlink of course, but how about a more generalized format such as the actual reference of the text in the regulation? P8_300 is the hyperlink ID for HHSAR 317.105-1. What if it was called 0317_105_1 so that we can parse this ID and easily get the part, section, and subsection? Having links like this in a more standardized format will allow setting up the webpage so much easier and more convenient. A solid foundation eases future edits.
3.3 – Separate HTML Files for Every Subsection
I believe that each subsection for every regulation deserves to be it’s own object in some sort of database to be pulled or edited at will. However, each of these subsections absolutely does not need to be their own HTML file.
Individuals in the acquisition field are not trained to read just the specific verbiage of text that relates to their requirement: they are taught to ‘zoom-out’ to the prescription of said text, then to ‘zoom-out’ even further to see if it still applies. This ‘zooming-out’ is crucial to ensuring any and all text applies to the issues at hand, and having one HTML file per subsection is inefficient, unnecessary, and wasteful of space.
The good news is, much of the regulations are already strcutured this way. This problem isn’t too big among the supplements, but when it gets to the DFARS, all the text pertaining to each section and subsection brings users to individual links for not only each text, but the Table of Contents for each section. Above all, this is annoying since ‘zooming-out’ entitles you to hit the back button about four or five times before you actually get to where you need to reference.
If every part of every regulation were just one HTML file, searching through contents will be so much easier. Once users find the paragraph they require, they simple just scroll up to read the prescription, scroll-up even more to read more prescriptions, and finally scroll to the top to insure everything complies. Again, this feature does exist but there are still separate HTML files lurking through the website waiting to catch users in a sticky web of inefficiency.
In conclusion, having separate HTML files for each subsection:
makes it harder to manage code, since there would need to be a # in links to distinguish separate files
increases file bloat and system capacity
makes the users’ jobs harder by spending more energy trying to find prescriptions
is completely unnecessary
Why mention this with the API? The database will store the HTML for each subsection and generating the one HTML file for the regulation’s part will just be a matter of combining all the appropriate objects together. This may even be how it is managed…
3.4 – Mobile Versions an Unneeded Luxury
The current system uses a DITA system to manage their content which seems perfect for this but in all honesty, a mobile version of the FAR is just not warranted. Users who routinely seach trough the FAR don’t use it on mobile devices, but on computers. This may seem counterintuitive to today’s society, but a mobile version is just not required for the vast majority of acquisitions professionals.
But in either case, a FAR API will be able to send information to any device which will reduce the need to have multiple formats for the same publication.
4.0 – Complications with an API
This project will not be without its problems. There are of course many things that could go wrong with this approach, which will be explained below for transparency.
4.1 – It won’t be Searchable
Part of why having the FAR is valuable in HTML is that google can do its thing and search for exactly where a regulation is required. This puts acquisition.gov above the rest, as their layouts are very clean and obviously well taken care-of. Besides from both of the problems above, I don’t see any other website taking the reigns off of them to house the FAR.
This supposed web app may be very useful and convenient, but it will lack the searching power of having these regs in HTML. This alone almost begs the question as to why even build this thing if you can’t search in it? Maybe there is a way to integrate searching in this, which would make this even greater, but that’s another project within this project.
So with all this said, this web app will primarily be a nice tool to supplement the FAR – meant for people who already know where to look for a specific reference and needing to see whether this reference is referenced in any number of regulations. Limited capablities, but convenient.
4.3.- Text Will Still Need to be Manually Updated
Either way, the FAR will need to be updated to reflect the many changes that update on a normal basis. This means that there will probably be more work involved with managing an API along with the text itself. Perhaps the DITA packages currently in use are perfect for the job already.
4.3 – Potentially Costly
Having an API with constant data calls could potentially be more costly than just having HTML sitting on a website. The traditional website design that isn’t like a web app is tried and true and more than likely isn’t generating heavy costs. An AWS account that gets charged by the click could rack up many expenses.
4.4 – Lack of Other Users
This goes with 4.3 above, but if the sole purpose of this API is to provide a more dynamic FAR, then it may not be as useful as we can imagine. What would be great is if there were many sources of information pulling the API to get text. Perhaps the contracting systems can pull this information to apply clauses, but there is no guarantee that this will even be a possibility among them.
const observer = component.observe( 'answer', answer => {
console.log( `the answer is ${answer}` );
});
// 会立即出发修改过后的answer
// -> 'the answer is ask your mother'
component.set({ answer: 'google it' });
// -> 'the answer is google it'
observer.cancel(); // further changes will be ignored
<p>
The time is
<strong>{{hours}}:{{minutes}}:{{seconds}}</strong></p><script>exportdefault{data(){return{time: newDate()};},computed: {hours: time=>time.getHours(),minutes: time=>time.getMinutes(),seconds: time=>time.getSeconds()}};</script>
<p>
The time is
<strong>{{hours}}:{{minutes}}:{{seconds}}</strong></p><script>exportdefault{oncreate(){this.interval=setInterval(()=>{this.set({time: newDate()});},1000);},ondestroy(){clearInterval(this.interval);},data(){return{time: newDate()};},computed: {hours: time=>time.getHours(),minutes: time=>time.getMinutes(),seconds: time=>time.getSeconds()}};</script>
This project demonstrates how to integrate an Arduino RF handshake process with a Next.js application to approve Ethereum transactions before sending them through Metamask. The handshake is performed between two Arduino devices communicating via RF waves, utilizing frequency hopping to increase security and prevent unauthorized interception of the communication.
A Next.js frontend application that allows users to enter a recipient address and an amount of ETH to send. When the user clicks the “Send” button, the application communicates with an API route to check if the transaction is approved by the Arduino devices.
A Python script that communicates with the sender Arduino device over a serial connection to initiate the RF handshake process and receive the approval status.
Two Arduino devices (sender and receiver) equipped with RF modules that communicate with each other using frequency hopping to approve or reject the transaction based on certain conditions.
How it Works
The user enters the recipient address and the amount of ETH to send in the Next.js frontend application.
When the user clicks the “Send” button, the startPayment function in ETHTransfers.tsx is triggered.
The startPayment function makes a POST request to the /arduino-handshake API route, passing the recipient address and amount as request body.
The API route (/arduino-handshake.js) receives the request and spawns a child process to run the arduino_handshake.py Python script, passing the necessary arguments (action, recipient, and amount).
The arduino_handshake.py script communicates with the sender Arduino device over a serial connection, sending the transaction details (recipient and amount) to the sender Arduino.
The sender Arduino device initiates the RF handshake process by sending the transaction details to the receiver Arduino device via RF waves, using frequency hopping to change the communication channel at predefined intervals.
The receiver Arduino device, also employing frequency hopping, receives the transaction details and determines whether to approve or reject the transaction based on its internal logic (not provided in this example).
The receiver Arduino sends the approval status back to the sender Arduino via RF waves, using frequency hopping to maintain secure communication.
The sender Arduino receives the approval status and sends it back to the Python script over the serial connection.
The Python script prints the approval status (True or False) to the console, which is captured by the API route.
The API route sends a response back to the Next.js frontend application, indicating whether the transaction is approved or not.
If the transaction is approved, the Next.js application proceeds to send the transaction through Metamask using the ethers.js library.
If the transaction is not approved, an error is thrown, and the transaction is not sent. An error toast notification is displayed to the user.
Dependencies
Next.js
React
Chakra UI
Moralis API
MetaMask APO
ethers.js
Python
pyserial
Arduino IDE
RF modules (nRF24L01)
License
WaveWallet is open-sourced software licensed under the MIT license.
This project demonstrates how to integrate an Arduino RF handshake process with a Next.js application to approve Ethereum transactions before sending them through Metamask. The handshake is performed between two Arduino devices communicating via RF waves, utilizing frequency hopping to increase security and prevent unauthorized interception of the communication.
A Next.js frontend application that allows users to enter a recipient address and an amount of ETH to send. When the user clicks the “Send” button, the application communicates with an API route to check if the transaction is approved by the Arduino devices.
A Python script that communicates with the sender Arduino device over a serial connection to initiate the RF handshake process and receive the approval status.
Two Arduino devices (sender and receiver) equipped with RF modules that communicate with each other using frequency hopping to approve or reject the transaction based on certain conditions.
How it Works
The user enters the recipient address and the amount of ETH to send in the Next.js frontend application.
When the user clicks the “Send” button, the startPayment function in ETHTransfers.tsx is triggered.
The startPayment function makes a POST request to the /arduino-handshake API route, passing the recipient address and amount as request body.
The API route (/arduino-handshake.js) receives the request and spawns a child process to run the arduino_handshake.py Python script, passing the necessary arguments (action, recipient, and amount).
The arduino_handshake.py script communicates with the sender Arduino device over a serial connection, sending the transaction details (recipient and amount) to the sender Arduino.
The sender Arduino device initiates the RF handshake process by sending the transaction details to the receiver Arduino device via RF waves, using frequency hopping to change the communication channel at predefined intervals.
The receiver Arduino device, also employing frequency hopping, receives the transaction details and determines whether to approve or reject the transaction based on its internal logic (not provided in this example).
The receiver Arduino sends the approval status back to the sender Arduino via RF waves, using frequency hopping to maintain secure communication.
The sender Arduino receives the approval status and sends it back to the Python script over the serial connection.
The Python script prints the approval status (True or False) to the console, which is captured by the API route.
The API route sends a response back to the Next.js frontend application, indicating whether the transaction is approved or not.
If the transaction is approved, the Next.js application proceeds to send the transaction through Metamask using the ethers.js library.
If the transaction is not approved, an error is thrown, and the transaction is not sent. An error toast notification is displayed to the user.
Dependencies
Next.js
React
Chakra UI
Moralis API
MetaMask APO
ethers.js
Python
pyserial
Arduino IDE
RF modules (nRF24L01)
License
WaveWallet is open-sourced software licensed under the MIT license.
This demo application belongs to the set of examples for LightningChart JS, data visualization library for JavaScript.
LightningChart JS is entirely GPU accelerated and performance optimized charting library for presenting massive amounts of data. It offers an easy way of creating sophisticated and interactive charts and adding them to your website or web application.
The demo can be used as an example or a seed project. Local execution requires the following steps:
Make sure that relevant version of Node.js is installed
Open the project folder in a terminal:
npm install # fetches dependencies
npm start # builds an application and starts the development server
The application is available at http://localhost:8080 in your browser, webpack-dev-server provides hot reload functionality.
Description
Also known as a Area Graph or Area Chart
The example shows the basic usage of a monopolar area series. The area series is based on line series with the area between the baseline and the given data filled with color. It is drawn on a Cartesian coordinate system and represents the quantitative data.
Current example chart contains two monopolar area series. They are drawn on different sides of the specified baseline and the selected area type specifies the direction. The first area has a positive direction, the second one has a negative direction.
The simple area chart can be created with few simple lines of code:
// Create a new ChartXY.constchart=lightningChart().ChartXY()// Add an area series with positive direction using default X and Y axes.constareaPositive=chart.addAreaSeries({baseline: 0,type: AreaSeriesTypes.Positive,})// Add an area series with negative direction using default X and Y axes.constareaNegative=chart.addAreaSeries({baseline: 0,type: AreaSeriesTypes.Negative,})
The baseline value the type of number and the type can be specified only during the creation of a series instance, where
The baseline is a fixed reference level of minimum or starting point used for comparisons, which allow customizing the position of the area.
The type of area series is an enum selector which defines the type of area series:
Select AreaSeriesTypes.Positive to show the data only above the baseline.
Select AreaSeriesTypes.Negative to show the data only below the baseline.
Select AreaSeriesTypes.Both to show the data from both sides of the baseline. Bipolar area series will be explained in the future example.
The series accepts points in format { x: number, y: number }. Any number of points can be added with a single call.
// Single point.series.add({x: 50,y: 60})// Multiple points at once.series.add([{x: 55,y: 60},{x: 60,y: 62},{x: 65,y: 65},])