DEV Community

方帅
方帅

Posted on

In the VTable integrated VChart chart scene, how to deal with the truncation of dots at the edge?

Description
In the VTable integrated VChart chart scenario, how to avoid the edge points being truncated when drawing points on the chart.

Image description

Solution
Configure innerOffset on the axes axis. After adding it as above, there will be a certain distance between the elements on the chart and the edge of the table.

Image description

Code Example

const option = {
axes: [
{
orient: 'left',
type: 'linear',
innerOffset: {
top: 4,
bottom: 4,
}
},
{
orient: 'bottom',
type: 'band',
innerOffset: {
left: 4,
right: 4,
}
}
]
...
}

const tableInstance = new VTable.ListTable(container, option);
Results
Online effect reference:https://visactor.io/vtable/demo/table-type/pivot-chart-scatter

Image description

Related Documents
Related api:https://visactor.io/vtable/option/PivotTable#axes
github:https://github.com/VisActor/VTable

API Trace View

Struggling with slow API calls? 🕒

Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay