Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to customize the histogram of a graph by Qt

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "Qt how to customize the graph bar chart", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Qt how to customize the curve bar chart" bar!

I. functional features

You can set the X-axis Y-axis range value.

You can set the background color + text color + grid color.

Can set whether to display positioning crosshairs, can be set horizontally and vertically respectively.

The width and color of the crosshair can be set.

You can set whether to fill the background to form an area map.

Can be set mode-drag + zoom and so on.

The distance between axes can be set + the second coordinate system is visible.

Provides the interface setDataBar to directly set the bar chart to support multiple stacking charts.

Provides interface setLabs to set text labels instead of key, including X-axis and Y-axis.

Provide emptying the data + redrawing the chart + getting QCustomPlot objects externally, so that more detailed parameter settings can be made.

Provides the function start+stop to simulate the sine curve.

The position + accuracy + color of the value of the bar chart can be set.

Support the mouse to move to the data point to highlight the data point and display the data prompt information.

You can set the prompt position automatic processing + top + upper right corner + right + lower right corner + bottom + lower left corner + left + upper left corner.

You can set whether to check whether the data produces a different background color, for example, each column in a column chart can generate a different background color based on the data.

You can set whether to display the legend + the location of the legend + the number of rows of the legend and whether the legend is displayed on a single line.

Support multiple curves + column chart + column grouping chart + horizontal histogram + horizontal grouping chart + columnar stacking chart.

Built-in 15 sets of exquisite colors, automatically take the color of the color collection, save the trouble of color matching.

Each bar chart can be set to a different color, and a grouped bar chart can set alternating colors.

Y-axis values support percentage display and can be extended to other formats.

Both QCustomPlot 1.0 and QCustomPlot 2.0 are supported.

Second, the effect picture

Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report