CN114332290A - Display method and device of shaft label, electronic equipment and storage medium - Google Patents

Display method and device of shaft label, electronic equipment and storage medium Download PDF

Info

Publication number
CN114332290A
CN114332290A CN202111477051.XA CN202111477051A CN114332290A CN 114332290 A CN114332290 A CN 114332290A CN 202111477051 A CN202111477051 A CN 202111477051A CN 114332290 A CN114332290 A CN 114332290A
Authority
CN
China
Prior art keywords
label
axis
target
shaft
rotation angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111477051.XA
Other languages
Chinese (zh)
Inventor
杜亨莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111477051.XA priority Critical patent/CN114332290A/en
Publication of CN114332290A publication Critical patent/CN114332290A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The disclosure relates to a display method and device of a shaft label, electronic equipment and a storage medium, and relates to the technical field of page design. The embodiment of the disclosure at least solves the problem that shaft labels are mutually pressed in the related art. The method comprises the following steps: obtaining a target axis label in at least one axis label on a target coordinate axis, wherein the target axis label is the axis label with the longest character string length of a label text in the at least one axis label; acquiring the width of a target label corresponding to the target axis label; under the condition that the width of the target label is larger than the label interval of the shaft label, obtaining a rotating angle corresponding to the target shaft label according to the label interval and a preset minimum interval; and rotating and rendering and displaying at least one axis label according to the rotation angle, wherein the vertical distance between the adjacent rotated axis labels is greater than or equal to the preset minimum distance.

Description

Display method and device of shaft label, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of page design technologies, and in particular, to a method and an apparatus for displaying a shaft tag, an electronic device, and a storage medium.
Background
In a scene of drawing a coordinate system chart at the front end of the Internet Web, an axis label needs to be drawn for an axis scale of a coordinate axis so as to indicate the meaning of a numerical value in the coordinate axis. Due to the limited space for displaying the coordinate system diagram, in the case of a large number of axis labels or a long single axis label, mutual capping between a plurality of axis labels may be caused. The display mode of mutual overlapping is not beautiful and causes that a user can not quickly acquire data information in the coordinate system chart.
In the related art, the shaft tags are rotated at a fixed angle to reduce the occupied width of the shaft tags, so as to reduce the possibility of the occurrence of the capping between the shaft tags.
Disclosure of Invention
The disclosure provides a display method and device of shaft labels, electronic equipment and a storage medium, which are used for at least solving the problem that the shaft labels are mutually overlapped in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for displaying a shaft label, including: obtaining a target axis label in at least one axis label on a target coordinate axis, wherein the target axis label is the axis label with the longest character string length of a label text in the at least one axis label; acquiring the width of a target label corresponding to the target axis label; under the condition that the width of the target label is larger than the label interval of the shaft label, obtaining a rotating angle corresponding to the target shaft label according to the label interval and a preset minimum interval; and rotating and rendering and displaying at least one axis label according to the rotation angle, wherein the vertical distance between the adjacent rotated axis labels is greater than or equal to the preset minimum distance.
Optionally, the method for displaying the axis label further includes: under the condition that the width of a target label is larger than the label interval, obtaining the label interval according to the length of a target coordinate axis and the number of labels of a shaft label in at least one shaft label before obtaining the rotation angle corresponding to the target shaft label according to the label interval and a preset minimum interval; wherein, the label interval is: and the distance between two adjacent axis labels on the target coordinate axis corresponds to N axis scales, wherein N is more than or equal to 2, and the axis labels are used for marking the axis scales.
Optionally, the "rotating and rendering and displaying at least one axis tag according to the rotation angle" includes: rotating and rendering and displaying at least one axis label according to the rotation angle along a preset rotation direction by taking the rotation starting point of each axis label in the at least one axis label as a center; wherein, the preset rotating direction is as follows: the direction of the target axis label far away from the target coordinate axis is enabled, and the rotation starting point is as follows: the axis label is close to two label vertexes on one side of the target coordinate axis, so that the axis label rotated according to the preset rotation direction is far away from one vertex of the target coordinate axis.
Optionally, when the target coordinate axis is a horizontal axis and the preset rotation direction is a clockwise direction, the rotation starting point is located in two tag vertexes of one side of the axis tag close to the target coordinate axis, so that the axis tag rotated in the clockwise direction is far away from the left vertex of the target coordinate axis.
Optionally, when the target coordinate axis is a horizontal axis and the preset rotation direction is an anticlockwise direction, the rotation starting point is one of two label vertexes of one side of the axis label close to the target coordinate axis, so that at least one axis label rotated in the anticlockwise direction is far away from a right vertex of the target coordinate axis.
Optionally, the method for displaying the axis label further includes: and under the condition that the width of the target label is larger than the label interval, acquiring the preset minimum interval input by the user before obtaining the rotating angle corresponding to the target shaft label according to the label interval and the preset minimum interval.
Optionally, the method for displaying the axis label further includes: and after the preset minimum distance input by the user is obtained, prompting capping alarm information under the condition that the preset minimum distance is less than or equal to the height of the label text.
Optionally, the "obtaining the rotation angle corresponding to the target axis tag according to the tag distance and the preset minimum distance" includes: calculating to obtain a rotation angle corresponding to the target axis label according to the arcsine function, wherein the rotation angle is
Figure BDA0003393837310000021
d1To preset a minimum spacing, d2Is the label spacing.
Optionally, the "rotating and rendering and displaying at least one axis tag according to the rotation angle" includes: responding to user operation, selecting a target rotation angle from a rotation range corresponding to the rotation angle, wherein the rotation range is as follows: supplementary angles from rotation angle to rotation angle; and rotating and rendering and displaying at least one axis label according to the target rotation angle.
Optionally, the "obtaining a target axis label in at least one axis label on a target coordinate axis" includes: according to a preset mapping rule, counting the length of a character string corresponding to a label text in each axis label in at least one axis label; determining that the target axis label is the axis label with the longest character string length of the label text in at least one axis label; the preset mapping rule comprises the following steps: under the condition that a first character in a label text is a foreign language, determining that the length of a character string corresponding to the first character is 1 length unit; and under the condition that the second character in the label text is Chinese, determining that the length of the character string corresponding to the second character is 2 length units.
According to a second aspect of the embodiments of the present disclosure, there is provided a display device of a shaft tag, including: the device comprises an acquisition unit, a first processing unit and a second processing unit; the system comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring a target axis label in at least one axis label on a target coordinate axis, and the target axis label is the axis label with the longest character string length of a label text in the at least one axis label; the acquisition unit is also used for acquiring the target label width corresponding to the target shaft label acquired by the acquisition unit; the first processing unit is used for obtaining a rotating angle corresponding to the target shaft label according to the label space and the preset minimum space under the condition that the width of the target label acquired by the acquisition unit is larger than the label space of the shaft label; and the second processing unit is used for rotating and rendering and displaying at least one axis label according to the rotation angle obtained by the processing of the first processing unit, and the vertical distance between the adjacent rotated axis labels is greater than or equal to the preset minimum distance.
Optionally, the display device of the shaft label further includes: the obtaining unit is further used for obtaining the label spacing according to the length of the target coordinate axis and the label number of the axis label in at least one axis label before the first processing unit obtains the rotation angle corresponding to the target axis label according to the label spacing and the preset minimum spacing under the condition that the width of the target label is larger than the label spacing; wherein, the label interval is: and the distance between two adjacent axis labels on the target coordinate axis corresponds to N axis scales, wherein N is greater than or equal to 2, and the axis labels are used for marking the axis scales.
Optionally, the second processing unit is configured to: the method comprises the following steps of taking the rotation starting point of each axis label in at least one axis label as a center, rotating and rendering and displaying the at least one axis label according to a rotation angle along a preset rotation direction, wherein the preset rotation direction is as follows: the direction of the target axis label far away from the target coordinate axis is enabled, and the rotation starting point is as follows: the axis label is close to two label vertexes on one side of the target coordinate axis, so that the axis label rotated according to the preset rotation direction is far away from one vertex of the target coordinate axis.
Optionally, when the target coordinate axis is a horizontal axis and the preset rotation direction is a clockwise direction, the rotation starting point in the second processing unit is one of two label vertexes of which the axis labels are close to one side of the target coordinate axis, so that at least one axis label rotated in the clockwise direction is far from a left vertex of the target coordinate axis.
Optionally, when the target coordinate axis is a horizontal axis and the preset rotation direction is a counterclockwise direction, the rotation starting point in the second processing unit is one of two label vertexes of which the axis label is close to one side of the target coordinate axis, so that the axis label rotated in the counterclockwise direction is far from a right vertex of the target coordinate axis.
Optionally, the display device of the shaft label further includes: and the obtaining unit is also used for obtaining the preset minimum distance input by the user before the first processing unit obtains the rotating angle corresponding to the target axis label according to the label distance and the preset minimum distance under the condition that the width of the target label is larger than the label distance.
Optionally, the display device of the shaft label further includes: a presentation unit; and the prompting unit is used for prompting the capping alarm information when the preset minimum distance is smaller than or equal to the height of the label text after the preset minimum distance input by the user is acquired by the acquisition unit.
Optionally, the first processing unit is configured to: according toCalculating a rotation angle corresponding to the target axis label by an arcsine function, wherein the rotation angle is
Figure BDA0003393837310000031
d1To preset a minimum spacing, d2Is the label spacing.
Optionally, the second processing unit is further configured to: responding to user operation, selecting a target rotation angle from a rotation range corresponding to the rotation angle, wherein the rotation range is as follows: supplementary angles from rotation angle to rotation angle; and rotating and rendering and displaying at least one axis label according to the target rotation angle.
Optionally, the obtaining unit is specifically configured to: according to a preset mapping rule, counting the length of a character string corresponding to a label text in each axis label in at least one axis label; determining that the target axis label is the axis label with the longest character string length of the label text in at least one axis label; the preset mapping rule comprises the following steps: under the condition that a first character in a label text is a foreign language, determining that the length of a character string corresponding to the first character is 1 length unit; and under the condition that the second character in the label text is Chinese, determining that the length of the character string corresponding to the second character is 2 length units.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor, a memory, and a program or instructions stored on the memory and executable on the processor; wherein the program or instructions when executed by the processor implement the method of displaying the axis label as provided in the first aspect and any one of its possible designs.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a readable storage medium on which a program or instructions are stored, the program or instructions, when executed by a processor, implementing the display method of the axis label as provided in the first aspect and any one of the possible design manners thereof.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product stored in a non-volatile storage medium, which when executed by at least one processor implements the method of displaying a shaft label as provided in the first aspect and any one of its possible designs.
The technical scheme provided by the disclosure at least brings the following beneficial effects: firstly, obtaining a target shaft label in at least one shaft label according to the length of a character string, then obtaining the width of the target shaft label to one target label, then comparing the width of the target label with the distance between labels, if the width of the target label is larger than the distance between labels, the shaft labels may be mutually overlapped, obtaining a rotating angle corresponding to the target shaft label according to the distance between labels and a preset minimum distance, and finally, rotating and rendering and displaying at least one shaft label according to the rotating angle, so that the shaft labels cannot be mutually overlapped. Therefore, the width of the target label and the distance between the labels in different coordinate systems are changed randomly, so that the corresponding rotating angle of the obtained target shaft label is changed dynamically, and can be matched with the current coordinate system and the shaft label in real time, the gland problem between the shaft labels of each coordinate system can be solved, and more shaft labels can be displayed as far as possible through rotation, so that a better visual effect is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is one of the schematic diagrams illustrating a change in store traffic according to one exemplary embodiment;
FIG. 2 is a second schematic diagram illustrating a change in store traffic in accordance with an exemplary embodiment;
FIG. 3 is a third schematic diagram illustrating a change in store traffic in accordance with an exemplary embodiment;
FIG. 4 is one of the flow diagrams illustrating a method of displaying a shaft label in accordance with an exemplary embodiment;
fig. 5 is a second flow chart of a shaft label display method according to an exemplary embodiment;
FIG. 6 is a schematic illustration of one rotation angle shown in accordance with an exemplary embodiment;
FIG. 7 is a third schematic flow chart diagram illustrating a method of displaying a shaft label in accordance with an exemplary embodiment;
FIG. 8 is a fourth schematic diagram illustrating a change in store traffic in accordance with an exemplary embodiment;
FIG. 9 is a fourth flowchart illustrating a method of displaying a shaft label in accordance with an exemplary embodiment;
fig. 10 is a schematic structural view illustrating a display device of a shaft label according to an exemplary embodiment;
fig. 11 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In addition, in the description of the embodiments of the present disclosure, "/" indicates an OR meaning, for example, A/B may indicate A or B, unless otherwise specified. "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "a plurality" means two or more than two.
The display method of the axis label provided by the embodiment of the present disclosure may be executed on an electronic device, which may be, for example, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), an Augmented Reality (AR), a Virtual Reality (VR) device, and the like, and may be a device having a display interface.
Illustratively, the axis label display method is applied to a scene in which a coordinate system diagram is drawn at the front end of the internet Web, as shown in fig. 1, a schematic diagram of a change in the pedestrian volume in a shopping mall is shown, where a horizontal axis is used for identifying time and a vertical axis is used for identifying a change situation of the pedestrian volume. As shown in fig. 1, the axis labels corresponding to the axis scale of the horizontal axis are mutually overlapped, and the label text in the axis label cannot be clearly seen.
On one hand, as shown in fig. 2, the axis labels that cannot be completely displayed in the schematic diagram of the change of the flow rate of people in the shopping mall in fig. 1 may be hidden, so as to reduce the number of displayed axis labels to solve the problem of mutual overlapping, but it may cause inconvenience for the user to quickly acquire data information from the graph.
On the other hand, as shown in fig. 3, a fixed angle value may be set for an axis label identifying a horizontal axis in the schematic diagram of the change of the flow rate of people in the mall in fig. 1, and then the axis label may be rotated according to the fixed angle value to solve the problem of mutual capping.
It should be noted that, in the embodiment of the present disclosure, the target label width, the label distance, the preset minimum distance, the distance between two adjacent axis labels, and the label text height are the same measurement units, or are unified measurement units when performing comparison and operation, where the measurement units include, but are not limited to: centimeters, millimeters, and decimeters.
The following describes a display method of a shaft label provided in an embodiment of the present disclosure with reference to the accompanying drawings, and the method is exemplarily described below by taking a display device with a main execution body as a shaft label as an example, where the display device of the shaft label may be the electronic device.
Fig. 4 is a schematic flowchart of a display method of an axis label according to an embodiment of the present disclosure. As shown in fig. 4, a display method of a shaft label provided by an embodiment of the present disclosure includes the following steps 401 to 404.
401. The axis label display means acquires a target axis label among at least one axis label on the target coordinate axis.
In an embodiment of the present disclosure, the target axis label is an axis label having the longest character string length of the label text in the at least one axis label. It is understood that the target coordinate axis refers to any one of a two-dimensional coordinate system and a three-dimensional coordinate system, and includes a plurality of axis scales on the target coordinate axis, and the axis scales may be identified by axis labels.
In the embodiment of the present disclosure, the axis label refers to a label for identifying a certain axis scale on the coordinate axis, and a label text may be written in the axis label to identify specific meanings of the axis scale, such as time, distance, temperature, and the like.
Optionally, in this embodiment of the present disclosure, as shown in fig. 5, the step 401 of acquiring the target axis label with the longest character string length may specifically be implemented by the steps 501 and 502.
Step 501, the display device of the axis labels counts the length of the character string corresponding to the label text in each axis label in at least one axis label according to a preset mapping rule.
Step 502, the axis label display device determines that the target axis label is the axis label with the longest character string length of the label text in at least one axis label.
In an embodiment of the present disclosure, the presetting of the mapping rule includes: under the condition that a first character in a label text is a foreign language, determining that the length of a character string corresponding to the first character is 1 length unit; and under the condition that the second character in the label text is Chinese, determining that the length of the character string corresponding to the second character is 2 length units.
It should be noted that, because the Chinese and foreign languages have different character structures and occupy different spaces under the same font size, if the length of the character string is counted, only the number of characters is considered, which may cause a large deviation between the counted length of the character string and the width occupied by the actual display.
Illustratively, the label text a of one axis label is "20160324", the label text B of the other axis label is "current geographical position", if the statistics is performed only according to the number of characters, the character string length corresponding to the number of characters of the label text a is 8, the character string length corresponding to the number of characters of the label text B is 6, if the statistics is performed according to the preset mapping rule, the character string length of the label text a is 8, and the character string length of the label text B is 12. Obviously, the length of the character string counted according to the preset mapping rule is more similar to the width of the label actually displayed.
In the embodiment of the present disclosure, each axis tag in the at least one axis tag corresponds to one tag text, and each tag text needs to count the length of the corresponding character string.
In this disclosure, the display device of the axis label may count the length of the character string corresponding to the label text of each axis label in at least one axis label, compare the lengths of the character strings, obtain the longest length of the character strings, and finally determine the target axis label corresponding to the longest length of the character strings.
In this embodiment of the present disclosure, the display device of the axis label may further count the length of the character string corresponding to the label texts of the two axis labels, then perform length comparison, perform length comparison once every time the length of the character string corresponding to one label text is counted, and finally determine the target axis label.
Specifically, the display device of the axis label firstly counts a first character string length and a second character length corresponding to label texts of any two axis labels in at least one axis label, then compares the first character string length and the second character length to determine a longer third character string length (the third character string length is the first character string length or the second character string length), then counts a fourth character string length corresponding to the label text of any one axis label except for the any two axis labels in the at least one axis label, then repeats the comparison determination process (compares and determines the longer character string length of the third character string length and the fourth character string length), and finally determines a target axis label in all the axis labels in the at least one axis label.
The technical scheme provided by the disclosure at least brings the following beneficial effects: in the process of counting the length of the character string of the label text recorded by the axis label, the counted length of the character string is more accurate by distinguishing different types of characters, such as Chinese characters and foreign characters, so that the determined target axis label is more accurate.
402. And the display device of the axis label acquires the width of the target label corresponding to the target axis label.
In the embodiment of the present disclosure, the display device of the axle tag may further set a length of a character string corresponding to the tag text, and adapt to a width displayed by the axle tag, so that the longer the length of the character string in the tag text in the axle tag is, the wider the width of the axle tag is, thereby realizing that the tag text can be completely displayed, on one hand, the problem of hiding part of the tag text due to insufficient width of the axle tag can be avoided, and on the other hand, the waste of a display space due to too wide width of the axle tag can be also avoided.
In the embodiment of the present disclosure, the display device of the axis labels may further directly obtain the label width of each axis label in at least one axis label, and then select the target label width with the widest label width from the respective label widths. However, the manner of directly obtaining the label width needs to consume more hardware resources, and therefore, the manner of obtaining the target axis label first and then obtaining the target label width corresponding to the target axis label in the embodiment of the disclosure is adopted to save the hardware resources.
In the embodiment of the present disclosure, the display device of the axis label may obtain the width of the target label by searching the attribute of the target axis label.
403. And under the condition that the width of the target label is larger than the label interval of the shaft label, the display device of the shaft label obtains the corresponding rotating angle of the target shaft label according to the label interval and the preset minimum interval.
In the embodiment of the present disclosure, since the length of the target coordinate axis is limited, the axis labels of a relatively fixed number of labels are displayed in a limited space, and thus, there may be a capping problem in displaying the axis labels.
In one example, in the case that the target label width is less than or equal to the label pitch of the axis labels, there is no mutual capping between at least one axis label, and therefore, how to display at least one axis label does not need to be rearranged to solve the mutual capping problem.
It is understood that, in the case that the target label width is less than or equal to the label spacing, the display device of the axis labels may be configured to receive the rotation input of the user to indicate that the rotation input may be rotated between at least one axis label to meet the personalized display requirement of the user.
In another example, in the case that the width of the target label is greater than the label pitch, at least one axis label is mutually overlapped, and therefore, the rotation angle of the target coordinate axis needs to be calculated so as to solve the overlapping problem through rotation.
In the embodiment of the present disclosure, the selection of the adjacent axis scales is related to the preset rotation direction, when the preset rotation direction is clockwise rotation, the axis scale adjacent to the right side of the axis scale corresponding to the target axis label is the adjacent axis scale, and when the preset rotation direction is counterclockwise rotation, the axis scale adjacent to the left side of the middle scale corresponding to the target axis label is the adjacent axis scale.
In this disclosure, after the label distance is obtained, a preset minimum distance needs to be obtained, where the preset minimum distance is a vertical distance from the adjacent axis scale to the target axis label, and the preset minimum distance needs to be greater than a height of the target axis label to ensure that the adjacent axis label in at least one axis label is not covered in a longitudinal direction, where the longitudinal direction is a direction perpendicular to a length direction of a label text of the axis label.
Optionally, in this embodiment of the present disclosure, a specific implementation manner of the rotation angle obtained in step 403 is as follows: the display device of the axis label calculates and obtains a rotation angle corresponding to the target axis label according to the arcsine function, wherein the rotation angle is
Figure BDA0003393837310000091
d1To preset a minimum spacing, d2Is the label spacing.
In the embodiment of the present disclosure, the process of obtaining the rotation angle is described by taking two adjacent axis tags of 2016-04-27 and 2016-06-23 as an example on the basis of fig. 1. As shown in fig. 6, where α is the rotation angle and the label spacing d2For sloping sides, with a predetermined minimum spacing d1The angle of rotation is then calculated from the arcsine function. If the two tags are displayed at a rotation angle of 2016-04-27 and 2016-06-23, the two tags do not cover each other.
The technical scheme provided by the disclosure at least brings the following beneficial effects: and calculating by a sine function to obtain a rotation angle, wherein the rotation angle calculated by the calculation mode is the minimum angle for ensuring that the shaft labels are not mutually covered. Like this, when according to this angle rotation axle label, can guarantee under the condition of axle label each other not gland for the rotation amplitude of axle label is minimum, and a plurality of axle labels after according to this minimum angle rotation are more pleasing to the eye moreover, and user visual experience is better.
404. And the display device of the axis label rotates and renders and displays at least one axis label according to the rotation angle.
In embodiments of the present disclosure, the vertical distance between adjacent axis labels after rotation is greater than or equal to a preset minimum distance.
In the embodiment of the present disclosure, if the character string length of the target axis label is the longest character string length, the problem of non-capping can be solved after the target axis label rotates, and then the problem of non-capping can also be solved after other labels in at least one axis label rotate. Therefore, the rotation angle is calculated according to the target axis label, and all the axis labels in the at least one axis label are rotated according to the rotation angle, so that all the axis labels in the at least one axis label can be ensured not to be mutually covered.
In the embodiment of the present disclosure, the display device of the axis label may further set a preset rotation direction, and rotate at least one axis label according to a rotation angle along the preset rotation direction. And rotating according to a preset rotating direction to enable the target axis to be far away from the target coordinate axis.
It can be understood that the rotation directions of all the axis labels in the at least one axis label are the same, and under the condition that the target axis label is ensured to be far away from the target coordinate axis, all the axis labels in the at least one axis label can be far away from the target coordinate axis. If each axle label adopts different direction of rotation when rotatory in at least one axle label, can guarantee that the distance that each axle label took in target coordinate axis direction can be less than the label interval, nevertheless, can not guarantee that two adjacent axle labels do not cover each other.
Illustratively, the first shaft label and the second shaft label are adjacent left and right and mutually cover, the first shaft label rotates in the anticlockwise direction, the second shaft label rotates in the clockwise direction, and on the premise that the target coordinate axis is not covered by the first shaft label and the second shaft label after rotation, the right position of the first shaft label after rotation and the left position of the second shaft label after rotation are still mutually covered. It should be noted that, as can be seen from the above example, if each axis label of at least one axis label generally adopts a different rotation direction, it is necessary to determine whether there is a capping condition one by one according to the display attribute of each axis label, such as a label text in the axis label, and the display attribute of the target coordinate axis, which requires a large amount of calculation time and hardware resources, and the correspondence between the axis label and the axis scale is not obvious, which increases the difficulty in understanding by the user.
In the embodiment of the present disclosure, the label pitch obtained according to the actual length of the target coordinate axis and the actual situation of the currently drawn chart is variable, the rotation angle obtained on the basis of the label pitch is also variable, and the obtained rotation angle is variable for each target coordinate axis, so that the problem of mutual capping between axis labels on the same coordinate axis in any case is solved by the variability of the rotation angle.
Optionally, in this embodiment of the present disclosure, as shown in fig. 7, step 404 may be specifically implemented by step 701 and step 702.
701. The display device of the axis label selects a target rotation angle from the rotation angle-corresponding rotatable range in response to a user operation.
702. And the display device of the axis label rotates and renders and displays at least one axis label according to the target rotation angle.
In the disclosed embodiments, the rotatable range is: the complement angle from the rotation angle to the rotation angle. The rotation angle is a minimum rotation angle that can ensure that the shaft tags of the at least one shaft tag are not mutually overlapped, and if the rotation is performed according to the rotation angle, the visual effect after the rotation of the shaft tags of the at least one shaft tag is ensured to be the best, but the rotation is performed according to any angle in the rotatable range, the shaft tags after the rotation can be prevented from being mutually overlapped.
In the embodiment of the present disclosure, if the target rotation angle is equal to the above rotation angle, or the target rotation angle is equal to a supplementary angle of the above rotation angle, the vertical distance between the rotated adjacent axis labels is equal to a preset minimum distance. And if the target rotation angle is not equal to the rotation angle and is not equal to the complement angle of the rotation angle, the vertical distance between the adjacent rotated shaft labels is greater than the preset minimum distance.
It can be understood that the display device of the axis tag may receive a user operation input by an external device (such as a mouse, a keyboard, and an intelligent wearable device) connected thereto, receive a user operation sent by a remote control device (such as a mobile phone, a tablet computer, and a display device of another axis tag), and receive a user operation sent by a short-range control device (such as an infrared controller).
For example, the user may input a target rotation angle. For another example, the user may drag the rotation axis label based on the minimum rotation angle, and the rotation angle corresponding to the case where the dragging is stopped is the target rotation angle.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the target rotation angle is selected through user operation, so that the rotation flexibility of at least one shaft label can be increased, and personalized customization of shaft label rotation is realized.
In the embodiment of the present disclosure, assuming that the initial image is as shown in fig. 1, after steps 401 to 404, the display manner of the rotated axis label is as shown in fig. 8.
The technical scheme provided by the disclosure at least brings the following beneficial effects: firstly, obtaining a target shaft label in at least one shaft label according to the length of a character string, then obtaining the width of the target shaft label to one target label, then comparing the width of the target label with the distance between labels, if the width of the target label is larger than the distance between labels, the shaft labels may be mutually overlapped, obtaining a rotating angle corresponding to the target shaft label according to the distance between labels and a preset minimum distance, and finally, rotating and rendering and displaying at least one shaft label according to the rotating angle, so that the shaft labels cannot be mutually overlapped. Therefore, the width of the target label and the distance between the labels in different coordinate systems are changed randomly, so that the corresponding rotating angle of the obtained target shaft label is changed dynamically, and can be matched with the current coordinate system and the shaft label in real time, the gland problem between the shaft labels of each coordinate system can be solved, and more shaft labels can be displayed as far as possible through rotation, so that a better visual effect is achieved.
Optionally, in the embodiment of the present disclosure, before step 403, as shown in fig. 9, the method for displaying the shaft label provided by the embodiment of the present disclosure includes the following step 901.
901. And the display device of the axis labels acquires the label space according to the length of the target coordinate axis and the label quantity of the axis labels in at least one axis label.
In an embodiment of the present disclosure, the tag spacing is: and the distance between two adjacent axis labels on the target coordinate axis corresponds to N axis scales, wherein N is greater than or equal to 2, and the axis labels are used for marking the axis scales.
It should be noted that, in general, the label spacing between two adjacent axle labels in at least one axle label is the same, and therefore, the label spacing is the distance between any two adjacent axle labels in at least one axle label.
It should be further noted that, for a special case, if the label distance between two adjacent shaft labels in at least one shaft label is different, and the character string lengths of the label texts in the shaft labels are also different, when it is determined whether there is a gland, only the shaft label with the longest gland length can be determined one by one, and the shaft label with the longest gland length is taken as a target shaft label, and according to the preset rotation direction, the label adjacent to the target shaft label on the side with the larger position change amplitude after the shaft label rotates is determined as the adjacent shaft label, and the distance between the target shaft label and the adjacent shaft label is determined as the label distance.
In the embodiment of the present disclosure, the shaft scales and the shaft labels may be in one-to-one correspondence, and the label interval is the shaft scale interval. Generally, the number of axis scales is greater than the number of axis labels, and therefore, the label pitch is used as a basis for obtaining the rotation angle. Illustratively, the target axis is used to identify time in periods of "week" and the target axis has a maximum time of 5 weeks, and the axis labels may be set to identify one period, but in the middle of adjacent periods, the "day" of each period may also be identified by setting 6 scales.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the label spacing is obtained by displaying the state in real time according to the length of the current target coordinate axis and the number of the labels of at least one current axis label, accurately judging whether the axis label needs to be rotated or not according to the real-time property of the label spacing, and accurately calculating the rotation angle.
Optionally, before step 403, as shown in fig. 9, the method for displaying the axis label provided by the embodiment of the present disclosure includes the following step 902.
902. The display device of the axis label acquires a preset minimum distance input by a user.
In the embodiment of the present disclosure, the preset minimum distance is a vertical distance between adjacent axis scales and a target axis label, and the preset minimum distance needs to be greater than a height of the target axis label to ensure that adjacent axis labels in at least one axis label are not covered in a longitudinal direction, where the longitudinal direction is a direction perpendicular to a length direction of a label text of the axis label.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the preset minimum distance in the user input is obtained, so that the preset minimum distance can be flexibly set according to the user requirement, and the personalized setting of the user is realized.
Further optionally, before step 403, after step 902, as shown in fig. 9, the method for displaying a shaft label provided by the embodiment of the present disclosure includes the following step 903.
903. And under the condition that the preset minimum distance is smaller than or equal to the height of the label text, the display device of the shaft label prompts the capping alarm information.
In the embodiment of the disclosure, under the condition that the preset minimum distance is input by a user, because the user input is uncontrollable, the preset minimum distance input by the user is assumed to be small, then adjacent shaft labels may be mutually overlapped in the longitudinal direction, in order to avoid that the preset minimum distance is re-input in a passive selection area after the shaft labels are mutually overlapped in a display mode, the user experience is poor, the display device of the shaft labels can prompt the cover alarm information, the follow-up possible display state is actively prompted, the probability of the preset minimum distance which can be used by the user through one-time input is increased, and the webpage design efficiency is improved.
It can be understood that, in the embodiment of the present disclosure, the display device of the shaft label may further prompt the alarm information that cannot be completely displayed in the case that the preset minimum distance is greater than the preset height, where the preset height is: the distance of the target coordinate axis to the boundary of the coordinate system in which the target axis is located.
The technical scheme provided by the disclosure at least brings the following beneficial effects: because the preset minimum distance is randomly input by a user, the influence of the user on the preset minimum distance possibly cannot be pre-judged, and therefore, the capping alarm information is prompted under the condition that the preset minimum distance is smaller than or equal to the height of the label text, and the adjacent shaft labels are prevented from being capped mutually after rotating.
Optionally, the step 404 may specifically be: and rotating and rendering and displaying at least one axis label according to the rotation angle along a preset rotation direction by taking the rotation starting point of each axis label in the at least one axis label as a center.
In the embodiment of the present disclosure, the preset rotation direction is: the direction of the target axis label far away from the target coordinate axis is enabled, and the rotation starting point is as follows: and the axis labels are close to two label vertexes on one side of the target coordinate axis, so that at least one axis label rotated according to the preset rotation direction is far away from the vertex of the target coordinate axis. It can be understood that each axis tag corresponds to a rotation starting point, and when the axis tag is rotated according to the rotation angle, each axis tag is respectively rotated according to the corresponding rotation starting point.
In the embodiment of the present disclosure, when the shaft tag rotates, a rotation start point is determined first, and then the shaft tag rotates along a preset rotation direction by a rotation angle with the rotation start point as a center.
Further optionally, in this embodiment of the disclosure, when the target coordinate axis is a horizontal axis and the preset rotation direction is a clockwise direction, the rotation starting point is two label vertexes of which each axis label is close to one side of the target coordinate axis, so that the axis label rotated in the clockwise direction is far away from the left vertex of the target coordinate axis.
The technical scheme provided by the disclosure at least brings the following beneficial effects: in view of the current habit of transversely reading, the mutual cover condition appears more easily in the axle label on the cross axle, consequently, under the condition that the target coordinate axis is the cross axle, can set up preset direction of rotation and be clockwise, further confirm according to preset direction of rotation that the rotation starting point is the left side summit in two label summits that the axle label is close to target coordinate axis one side for on the one hand, make the axle label distance after the rotation still can make clear and determine the scale that the marker corresponds, on the other hand, can guarantee axle label and target coordinate axis, and a plurality of axle labels between each other do not cover.
Further optionally, in this embodiment of the disclosure, when the target coordinate axis is a horizontal axis and the preset rotation direction is a counterclockwise direction, the rotation starting point of the axis label is one of two label vertexes of the axis label close to the target coordinate axis, so that the axis label rotated in the counterclockwise direction is far from the right vertex of the target coordinate axis.
The technical scheme provided by the disclosure at least brings the following beneficial effects: in view of the current habit of transversely reading, the mutual cover condition appears more easily in the axle label on the cross axle, consequently, under the condition that the target coordinate axis is the cross axle, can set up preset direction of rotation and be anticlockwise, further confirm according to preset direction of rotation that the rotation starting point is the right side summit in two label summits that the axle label is close to target coordinate axis one side for on the one hand, make the axle label distance after the rotation still can make clear and determine the scale that the marker corresponds, on the other hand, can guarantee axle label and target coordinate axis, and a plurality of axle labels between each other do not cover.
Further optionally, in the embodiment of the present disclosure, assuming that the target coordinate axis is a vertical axis or a linear coordinate axis in another direction, the rotation starting point corresponding to the rotation direction may be determined by referring to a case that the target coordinate axis is a horizontal axis.
In the embodiments of the present disclosure, the rotation axis tag may be implemented by changing a tag property of each of at least one axis tag.
The technical scheme provided by the disclosure at least brings the following beneficial effects: according to the preset rotating direction, the rotating starting point is determined, and at least one shaft label is rotated according to the rotating angle along the preset rotating direction by taking the rotating starting point as a center, so that on one hand, the distance between the rotated shaft label can still clearly determine the scale corresponding to the marker, and on the other hand, the shaft label and the target coordinate axis and a plurality of shaft labels are not mutually pressed.
The foregoing describes aspects of embodiments of the present disclosure primarily from a methodological perspective. It is to be understood that the display device of the axis label includes at least one of a hardware structure and a software module corresponding to each function in order to implement the above-described functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The display device of the shaft label can be divided into the functional units according to the method, for example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the units in the embodiments of the present disclosure is schematic, and is only one logical function division, and there may be another division manner in actual implementation.
Fig. 10 is a schematic structural diagram illustrating a display device of a shaft tag according to an exemplary embodiment. Referring to fig. 10, the display device of the shaft label provided by the embodiment of the present disclosure includes an obtaining unit 1001, a first processing unit 1002, and a second processing unit 1003;
an obtaining unit 1001, configured to obtain a target axis label in at least one axis label on a target coordinate axis, where the target axis label is an axis label with a longest character string length of a label text in the at least one axis label; for example, as shown in fig. 4, the obtaining unit 1001 may be configured to perform step 401.
An obtaining unit 1001, further configured to obtain a target label width corresponding to the target axis label obtained by the obtaining unit 1001; for example, as shown in fig. 4, the obtaining unit 1001 may be configured to perform step 402.
The first processing unit 1002 is configured to, when the width of the target label acquired by the acquiring unit 1001 is greater than the label pitch of the axle labels, obtain a rotation angle corresponding to the target axle label according to the label pitch and a preset minimum pitch; for example, as shown in fig. 4, the first processing unit 1002 may be configured to perform step 403.
The second processing unit 1003 is configured to rotate and render and display at least one axis label according to the rotation angle obtained through the processing by the first processing unit 1002, where a vertical distance between adjacent axis labels after rotation is greater than or equal to a preset minimum distance. For example, as shown in fig. 4, the second processing unit 1003 may be configured to execute step 404.
Optionally, as shown in fig. 10, the display device for a shaft label provided in the embodiment of the present disclosure further includes: the obtaining unit 1001 is further configured to, when the width of the target label is greater than the label distance, obtain, by the first processing unit 1002, the label distance according to the length of the target coordinate axis and the number of labels of the axis label in at least one axis label before obtaining the rotation angle corresponding to the target axis label according to the label distance and the preset minimum distance; wherein, the label interval is: and the distance between two adjacent axis labels on the target coordinate axis corresponds to N axis scales, wherein N is greater than or equal to 2, and the axis labels are used for marking the axis scales. For example, as shown in fig. 9, the obtaining unit 1001 may be configured to perform step 901.
Optionally, as shown in fig. 10, the second processing unit 1003 provided in the embodiment of the present disclosure is configured to: the method comprises the following steps of taking the rotation starting point of each axis label in at least one axis label as a center, rotating and rendering and displaying the at least one axis label according to a rotation angle along a preset rotation direction, wherein the preset rotation direction is as follows: the direction of the target axis label far away from the target coordinate axis is enabled, and the rotation starting point is as follows: the axis label is close to two label vertexes on one side of the target coordinate axis, so that the axis label rotated according to the preset rotation direction is far away from one vertex of the target coordinate axis.
Optionally, when the target coordinate axis is a horizontal axis and the preset rotation direction is a clockwise direction, the rotation starting point in the second processing unit is one of two label vertexes of which the axis labels are close to one side of the target coordinate axis, so that at least one axis label rotated in the clockwise direction is far from a left vertex of the target coordinate axis.
Optionally, when the target coordinate axis is a horizontal axis and the preset rotation direction is a counterclockwise direction, the rotation starting point in the second processing unit is one of two label vertexes of which the axis label is close to one side of the target coordinate axis, so that the axis label rotated in the counterclockwise direction is far from a right vertex of the target coordinate axis.
Optionally, as shown in fig. 10, the display device for a shaft label provided in the embodiment of the present disclosure further includes: the obtaining unit 1001 is further configured to, when the width of the target label is greater than the label distance, obtain the preset minimum distance input by the user before obtaining the rotation angle corresponding to the target axis label according to the label distance and the preset minimum distance by the first processing unit 1002. For example, as shown in fig. 9, the obtaining unit 1001 may be configured to perform step 902.
Optionally, as shown in fig. 10, the display device for a shaft label provided in the embodiment of the present disclosure further includes: a presentation unit 1004; a prompting unit 1004, configured to prompt capping alarm information when the preset minimum distance is smaller than or equal to the height of the label text after the preset minimum distance input by the user is acquired by the acquisition unit 1001. For example, as shown in fig. 9, the prompting unit 1004 may be used to execute step 903.
Optionally, as shown in fig. 10, the first processing unit 1002 unit provided in this embodiment of the disclosure is configured to: calculating to obtain a rotation angle corresponding to the target axis label according to the arcsine function, wherein the rotation angle is
Figure BDA0003393837310000161
d1To preset a minimum spacing, d2Is the label spacing.
Optionally, as shown in fig. 10, the second processing unit 1003 provided in the embodiment of the present disclosure is further configured to: responding to user operation, selecting a target rotation angle from a rotation range corresponding to the rotation angle, wherein the rotation range is as follows: supplementary angles from rotation angle to rotation angle; and rotating and rendering and displaying at least one axis label according to the target rotation angle. For example, as shown in fig. 7, the second processing unit 1003 may be configured to perform step 701 and step 702.
Optionally, as shown in fig. 10, the obtaining unit 1001 provided in the embodiment of the present disclosure is specifically configured to: according to a preset mapping rule, counting the length of a character string corresponding to a label text in each axis label in at least one axis label; determining that the target axis label is the axis label with the longest character string length of the label text in at least one axis label; the preset mapping rule comprises the following steps: under the condition that a first character in a label text is a foreign language, determining that the length of a character string corresponding to the first character is 1 length unit; and under the condition that the second character in the label text is Chinese, determining that the length of the character string corresponding to the second character is 2 length units. For example, as shown in fig. 5, the obtaining unit 1001 may be configured to perform step 501 and step 502.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 11 is a schematic structural diagram of an electronic device provided by the present disclosure. As in fig. 11, the electronic device may include a processor 1101, a memory 1102, and programs or instructions stored on the memory 1102 and executable on the processor 1101; wherein the program or instructions when executed by the processor 1101 implement the display method of the axis label in the above-described embodiments.
Additionally, the electronic device may include a communication bus 1103 and at least one communication interface 1104.
The processor 1101 may be a Central Processing Unit (CPU), a micro-processing unit, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to control the execution of programs in accordance with the disclosed aspects.
The communication bus 1103 is a signal path for transferring information between the above components.
Communication interface 1104, which may be any transceiver or other communication network, may be used for communicating with other devices or communication networks, such as ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc.
The memory 1102 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 1102, which may be separate, is coupled to the processor 1101 by a communication bus 1104. The memory 1102 may also be integrated with the processor 1101.
The memory 1102 is used for storing instructions for implementing aspects of the present disclosure, and is controlled by the processor 1101 for execution. The processor 1101 is configured to execute programs or instructions stored in the memory 1102 to implement the functions in the disclosed method.
As an example, in conjunction with fig. 10, the functions implemented by the acquisition unit 1001, the first processing unit 1002, and the second processing unit 1003 in the display device of the axis label are the same as those of the processor 1101 in fig. 11.
In particular implementations, processor 1101 may include one or more CPUs such as CPU0 and CPU1 in fig. 11 for one embodiment.
In particular implementations, an electronic device may include multiple processors 1101, as one embodiment. Each of the processors 1101 may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Processor 1101 herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In particular implementations, the electronic device may also include an output device 1105 and an input device 1106, as one embodiment. The output device 1105 is in communication with the processor 1101 and may display information in a variety of ways. For example, the output device 1105 may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device 1106 is in communication with the processor 1101 and can accept user input in a variety of ways. For example, the input device 1106 may be a mouse, keyboard, touch screen device or sensing device, etc.
Those skilled in the art will appreciate that the configuration shown in fig. 11 does not constitute a limitation of the electronic device, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components. The electronic device in fig. 11 may be a server, a client, or other devices.
In addition, the present disclosure also provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, enables an electronic device to perform the display method of the axis label as provided in the above embodiments.
In addition, the present disclosure also provides a computer program product, which is stored in a non-volatile storage medium, and when being executed by at least one processor, causes an electronic device to perform the display method of the axis label as provided in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method of displaying a shaft label, comprising:
obtaining a target axis label in at least one axis label on a target coordinate axis, wherein the target axis label is the axis label with the longest character string length of a label text in the at least one axis label;
acquiring the target label width corresponding to the target axis label;
under the condition that the width of the target label is larger than the label interval of the shaft labels, obtaining a rotating angle corresponding to the target shaft label according to the label interval and a preset minimum interval;
and rotating and rendering and displaying the at least one axis label according to the rotation angle, wherein the vertical distance between the adjacent rotated axis labels is greater than or equal to the preset minimum distance.
2. The method for displaying the shaft label according to claim 1, wherein before obtaining the rotation angle corresponding to the target shaft label according to the label interval and a preset minimum interval when the width of the target label is greater than the label interval, the method further comprises:
acquiring the label space according to the length of the target coordinate axis and the label quantity of the axis labels in the at least one axis label;
wherein the label spacing is: and the distance between two adjacent shaft labels on the target coordinate axis corresponds to N shaft scales, wherein N is greater than or equal to 2, and the shaft labels are used for marking the shaft scales.
3. The method for displaying an axis label according to claim 1, wherein the rotating and rendering the at least one axis label according to the rotation angle comprises:
rotating and rendering and displaying at least one axis label according to the rotation angle along a preset rotation direction by taking the rotation starting point of each axis label in the at least one axis label as a center; wherein the preset rotation direction is: enabling the target axis label to be far away from the direction of the target coordinate axis, wherein the rotation starting point is as follows: and the axis label is close to two label vertexes on one side of the target coordinate axis, so that the axis label rotated according to the preset rotation direction is far away from one vertex of the target coordinate axis.
4. The method for displaying the shaft label according to claim 1, wherein before obtaining the rotation angle corresponding to the target shaft label according to the label interval and a preset minimum interval when the width of the target label is greater than the label interval, the method further comprises:
and acquiring the preset minimum distance input by the user.
5. The method for displaying an axis label according to claim 1, wherein the rotating and rendering the at least one axis label according to the rotation angle comprises:
responding to user operation, selecting a target rotation angle from a rotatable range corresponding to the rotation angle, wherein the rotatable range is as follows: a supplementary angle from the rotation angle to the rotation angle;
and rotating and rendering and displaying the at least one axis label according to the target rotation angle.
6. The method for displaying axis labels according to claim 1, wherein the obtaining a target axis label of the at least one axis label on the target coordinate axis comprises:
according to a preset mapping rule, counting the length of a character string corresponding to a label text in each axis label in at least one axis label;
determining the target axis label as an axis label with the longest character string length of a label text in the at least one axis label;
wherein the preset mapping rule comprises:
under the condition that a first character in the label text is a foreign language, determining that the length of a character string corresponding to the first character is 1 length unit;
and under the condition that a second character in the label text is Chinese, determining that the length of a character string corresponding to the second character is 2 length units.
7. A display device for a shaft label, comprising: the device comprises an acquisition unit, a first processing unit and a second processing unit;
the acquiring unit is used for acquiring a target axis label in at least one axis label on a target coordinate axis, wherein the target axis label is an axis label with the longest character string length of a label text in the at least one axis label;
the acquiring unit is further configured to acquire a target label width corresponding to the target axis label acquired by the acquiring unit;
the first processing unit is used for obtaining a rotation angle corresponding to the target shaft label according to the label space and a preset minimum space under the condition that the width of the target label acquired by the acquisition unit is larger than the label space of the shaft label;
the second processing unit is used for rotating and rendering and displaying the at least one axis label according to the rotation angle obtained by the processing of the first processing unit, and the vertical distance between the adjacent axis labels after rotation is larger than or equal to the preset minimum distance.
8. An electronic device, comprising: a processor, a memory, and a program or instructions stored on the memory and executable on the processor; wherein the program or instructions, when executed by the processor, implement the display method of the axis label according to any one of claims 1-6.
9. A readable storage medium, characterized in that the readable storage medium stores thereon a program or instructions which, when executed by a processor, implements the display method of the axis label according to any one of claims 1 to 6.
10. A computer program product comprising instructions, characterized in that the computer program product is stored in a non-volatile storage medium, which computer program product, when executed by at least one processor, implements the display method of the axis label according to any of claims 1-6.
CN202111477051.XA 2021-12-06 2021-12-06 Display method and device of shaft label, electronic equipment and storage medium Pending CN114332290A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111477051.XA CN114332290A (en) 2021-12-06 2021-12-06 Display method and device of shaft label, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111477051.XA CN114332290A (en) 2021-12-06 2021-12-06 Display method and device of shaft label, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114332290A true CN114332290A (en) 2022-04-12

Family

ID=81048666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111477051.XA Pending CN114332290A (en) 2021-12-06 2021-12-06 Display method and device of shaft label, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114332290A (en)

Similar Documents

Publication Publication Date Title
US8928657B2 (en) Progressive disclosure of indoor maps
US8972295B2 (en) Dynamic visual statistical data display and method for limited display device
US9417777B2 (en) Enabling quick display transitions between indoor and outdoor map data
US20180052594A1 (en) Providing graphical indication of label boundaries in digital maps
US9721363B2 (en) Encoding polygon data for fast retrieval and rendering
RU2678077C2 (en) Method for drawing search results on map displayed on electronic device
US9134886B2 (en) Providing indoor facility information on a digital map
US11315296B2 (en) Dynamically varying visual properties of indicators on a digital map
US20150187337A1 (en) Resolving label collisions on a digital map
CN112100795B (en) Computer aided design drawing comparison method and device
CN110083286B (en) System and method for disambiguating item selections
US10783687B2 (en) Efficient duplicate label handling
US10147162B2 (en) Method and system for recognizing POI outside map screen
US9483496B1 (en) Label placement for line features
US10832463B2 (en) Efficient label insertion and collision handling
US9678645B2 (en) Interactive map markers
CN114332290A (en) Display method and device of shaft label, electronic equipment and storage medium
CN109189537A (en) The dynamic display method of page info calculates equipment and computer storage medium
US10482635B2 (en) Chart labeling system
CN111694921A (en) Method and apparatus for displaying point of interest identification
CN111881230A (en) Rendering method and device for map area and electronic equipment
CN111179174B (en) Image stretching method and device based on face recognition points
RU2637901C2 (en) Method and data storing computer device for drawing graphic objects
CN115713613A (en) Text identification method and device for line, electronic equipment and medium
CN113487704A (en) Method and device for drawing dovetail arrow head, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination