Get x, Y coordinate values, and database related field values in Dbchart

Source: Internet
Author: User
Get x, Y coordinate values, and database related field values in Dbchart

Generally want to get dbchart x, y coordinate values are very simple, here simply say, double-click Dbchart, Pop-up dialog box, select Tools tab, add Cursor tool, and then check the cursor tool, Find the Cursor tool event (Cursor tool event total two) one is onchange () the other is Onsnapchange (), the difference between the two is the SNAP option in the cursor settings, snap is to keep the cursor on the series, The X-and y-axis coordinates are usually available in the function onchange, but what if you want to show the data segment values in the database and the x and y axes?
This is the problem I completed through the series of Xlabel, specific operations such as.

In this interface, put labels on the database's primary key (my database is ID), X, y is hanging on the curve you need to display the horizontal ordinate field. How to display the data segment values along the x and y axes?
Id:=series[0]. Xlabel[valueindex];
The statement to the right of the equal sign can get the value of the primary key ID in the database that corresponds to the sitting punctuation in the dbchart curve. This ID value allows you to find additional field data in the database through the SQL statement.

The second problem arises

If you hang the database ID into the labels, you will find that the x-axis coordinates of the image you need to display are not correct, it becomes the ID value, but it is normal to display the value of the field hanging on the x-axis, how to solve this problem?
I added a curve in the Dbchart and moved the line to the front, except for the field labels the x-axis, and the other X-and y-axis fields are the same as the other lines.
Then hide the second curve. That's it.

Get x, Y coordinate values, and database related field values in Dbchart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.