!!!###!!!title=3-How to Contribute Documentation——VisActor/VChart Contributing Documents!!!###!!!!!!###!!!description=```markdown---title: 3-How to Contribute Documentationkeywords: VisActor, VChart, VTable, VStory, VMind, VGrammar, VRender, Visualization, Chart, Data, Table, Graph, Gis, LLM---!!!###!!!
---
title: 3-How to Contribute Documentation

keywords: VisActor, VChart, VTable, VStory, VMind, VGrammar, VRender, Visualization, Chart, Data, Table, Graph, Gis, LLM
---
# Create a Branch

The default branch for VChart is the develop branch. Whether it is for feature development, bug fixes, or documentation writing, please create a new branch and then merge it into the develop branch. Use the following command to create a branch:

```bash
// Create a documentation/demo branch
git checkout -b docs/add-funnel-demo

Find or Create an Issue

In principle, we require each PR to have a corresponding issue. Before starting development, please confirm whether there is a corresponding issue, and that the issue has not been claimed.

Search for Documentation Issues

You can search for documentation-related issues using the following filter:

is:open label:docs

Some features may be associated with the doc label, so check if the issue is purely a documentation task.

Create a Documentation Issue

Click "NEW ISSUE" to open the issue selection page, then select “Documentation Request.”

Fill out the relevant information for the documentation issue you want to submit.

Claim an Issue

If you want to write or edit documentation bugs, you can leave a comment on the issue to claim it. An administrator will contact you, and after confirmation, the issue will be assigned to you.

For example:

Create or Modify Documentation

The locations of VChart documentation and demos in the project are as follows:

The current documentation types are as follows:

Find the corresponding location to add or modify the document. Note that some documents need to maintain the “menu.json” file as well.

This file corresponds to the final position and name of the document displayed on the site. For example:

Use Doubao Marscode AI Programming Assistant

Marscode AI Programming Assistant

Using Doubao Marscode AI Programming Assistant can provide comprehensive assistance throughout the entire process of document creation.

If you haven't installed the Marscode AI Programming Assistant, please download it from the following link: https://www.marscode.cn/home?utm_source=developer&utm_medium=oss&utm_campaign=visactor_a

In document writing, using context commands appropriately can improve content accuracy.

**⭐️ #Workspace**

Select the global code from Workspace as context, and the AI will automatically find related code context based on user queries.

**⭐️ #Files**

Search and select files from the code repository as context

**⭐️ #Code**

Search and select functions or classes from the code repository as context

Below is an example of how to use the Marscode AI Programming Assistant for document writing.

5.1 Provide Document Writing Ideas

Here, by invoking #Workspace and then asking it to help generate an outline for a developer document.

5.2 Generate Project Structure Description

Here, by invoking #Workspace and then asking it to help generate a project structure description document.

We can still ask further questions about subfolders.

5.3 Generate File or Code Details

5.3.1 Generate Code Explanation

When we select a piece of code in a file, we can choose the Explain command from the floating menu, and Marscode will generate a detailed code explanation for us. We can use this as a basis for proofreading and adaptation.

You can also directly input the Explain command in the dialogue box.

Here you can also directly use the previously mentioned #Code context to combine Explain with your instructions for more detailed tasks.

5.3.2 Generate Explanations for Entire Files

Explain can be used in conjunction with Context or Files commands to generate explanations for entire files.

5.4 Generate Sample Code

To better explain principles and usage, it is often necessary to provide a demo that can be practically run. You can use Marscode's code generation capabilities to generate sample code for us. However, currently the code generation capabilities of various AIs cannot guarantee accuracy and require further verification.

For each Q&A, Marscode will usually provide reference documentation, which can offer more contextual references for further analysis.

You can also directly perform file searches:

5.6 Translate Documents

VisActor's documentation needs to be provided in both Chinese and English, and Marscode can assist in translation.

Submit Code

After completing the documentation, first push the code to your remote branch. For example:

git commit -a -m "docs: add custom funnel demo and related docs"

VisActor follows the Conventional Commits specification for commit messages:

<type>[optional scope]: <description>

Common types include docs (documentation, log changes), feat (new features), fix (bug fixes), refactor (code refactoring), and others. Please choose according to the actual situation.

Write the description in concise and accurate English.

Before submitting a commit, we will conduct a commit lint check. You can view the rules for checking.

A common issue is when the remote upstream (@visactor/vchart) has new updates, leading to conflicts when submitting a Pull Request. Therefore, before submission, we can merge other developers' remote commits into ours. Use the following command to switch to the develop branch:

git checkout develop

Use the following command to pull the latest code from upstream:

git pull upstream develop

Switch back to your development branch:

git checkout docs/add-funnel-demo

Merge the develop branch's commits into your branch:

git rebase develop

Push the updated code to your branch:

git push origin docs/add-funnel-demo

Submit a PR

You can click the Compare & pull request button on your GitHub repository page.

Or create it through the contribute button:

Fill out the template with the changes submitted:

  • Check the type of modification
  • Fill in the associated issue
  • If there are complex changes, please explain the background and solution

Once the relevant information is filled in, click Create pull request to submit.

The administrator will review the PR to decide whether to approve it. If not approved, modifications are needed and it must be resubmitted.

Next Steps

Among different documentation types, demo documents have some special requirements, which can be referenced in the "How to Contribute a Demo" section.

You can then continue to attempt different types of tasks.

GitHub: github.com/VisActor

Leave a message on the VisActor WeChat public account (you can join the WeChat group through the public account menu):

Official website of VisActor: www.visactor.io/

Feishu group:

Discord: https://discord.com/invite/3wPyxVyH6m


# This Document Was Contributed By
[玄魂](https://github.com/xuanhun)