Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing the devices, modules or units, and are not used for limiting the devices, modules or units to be different devices, modules or units, and also for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Referring to fig. 1, the present disclosure provides a method for adjusting a dimension tag, where the method may be specifically executed by an electronic device, where the electronic device may be a terminal device, and the terminal device may be a desktop device or a mobile terminal, and the method includes:
step S101: determining the number M of labels of any dimensionality of data to be displayed, a preset first distance between the labels and a corresponding displayable length of the dimensionality on a display interface, wherein M is an integer larger than 0;
in the embodiment of the present disclosure, data to be displayed may be displayed from at least one dimension, and for any dimension, the labels and the distance between the labels may be adjusted by the method for adjusting the dimension labels shown in the embodiment of the present disclosure, so as to display a greater number of labels for the dimension.
The terminal equipment determines that the number of the labels in any dimension is M, a preset first distance between the labels and a corresponding displayable length of the labels in the dimension when the labels in the dimension are displayed on a display interface of the terminal equipment, wherein the displayable length is fixed, M is an integer larger than 0, it can be understood that the distance between any two labels in the dimension is the same, and the first distance is the distance between any two labels when the labels are displayed in an initial font size and an initial label display mode.
Step S102, determining a first length required for displaying M labels based on the number M of the labels and a first distance;
the terminal device can determine a first length required if the M tags of the dimension are displayed on the display interface at the first distance based on the number M of tags and the first distance.
And 103, if the first length is greater than the displayable length, adjusting the labels and/or the distance between the labels based on a preset label display mode, and displaying data through the adjusted labels and/or the distance between the labels, wherein the adjusted distance between the labels is less than the first distance.
If the first length is larger than the displayable length, the displayable length cannot display M labels, the terminal device adjusts the labels and/or the distance between the labels based on a preset label display mode, the distance between the labels after adjustment is smaller than the first distance, which is equivalent to reducing the display distance between the labels, the adjusted labels are displayed in the dimension, the labels are in one-to-one correspondence with the data to be displayed, and the data display can be performed on the data to be displayed based on the adjusted labels and/or the distance between the labels, so that a greater number of labels can be displayed in the dimension, and a greater number of data to be displayed can be further displayed.
And if the first length is less than or equal to the exposable length, the label is directly displayed in the initial font size and the initial label display mode after the partial label is discarded.
In the implementation, the number M of the tags in any dimension of the data to be displayed, the first distance between the tags, and the corresponding displayable length of the dimension on the display interface are determined, after the first length required for displaying the M tags is determined based on the number M of the tags and the first distance between the tags, if the first length is greater than the displayable length, the distance between the tags and/or the distance between the tags is adjusted based on a preset tag display adjustment mode, and the adjusted distance between the tags is smaller than the first distance, so that the display distance required for displaying the tags can be reduced, the purpose of displaying a greater number of tags in one dimension is achieved, the data display is performed through the adjusted tags and/or the adjusted distance between the tags, a greater number of data to be displayed can be displayed, the fineness of the displayed data is improved, and the visualization information of the data is more complete, the method can be applied to visualization scenes of large-scale data.
Optionally, the preset tag display mode includes at least one of the following:
the method comprises the following steps of arranging labels in N lines, displaying the labels at a preset angle, and displaying the labels in a mode of reducing the font size to a specific font size, wherein N is an integer larger than 1.
In this embodiment, the preset tag display mode may be a mode in which the tags are arranged in N rows, for example, for the X-dimensional tags, the tags are initially arranged in one row, and the preset tag display mode may be adjusted to arrange the tags in N rows, where N is an integer greater than 1, that is, the tags and the distances between the tags are all adjusted, and obviously, the distances between the tags become smaller after adjustment.
The preset label displaying manner may also be a manner of displaying the labels at a preset angle, for example, for the label in the X dimension, the distance between the labels is the largest when the labels are displayed in the initial transverse direction (180 degrees), the distance between the labels is the first distance when the labels are displayed in the initial transverse direction (180 degrees), the distance between the labels is reduced by the present disclosure in the manner of displaying the labels at the preset angle, and preferably, the preset angle may be 45 degrees, 90 degrees, 135 degrees, and the like. In this embodiment, when the labels are displayed at the preset angle, the distance between the labels may be adjusted (for example, the labels are displayed at 180 degrees and 45 degrees), or only the distance between the labels may be adjusted (for example, the labels are displayed at 45 degrees and 135 degrees).
The preset label display mode can also be a mode of displaying the label from reducing the font size to a specific font size, after the font size of the label is reduced, the distance between the labels is inevitably reduced, and the distance between the labels are adjusted under the condition.
Any dimension of this embodiment is exemplified by an X dimension, and it can be understood that, for a Y dimension, the manner of adjusting labels may refer to the dimension label adjusting method of the present disclosure, and the principle is the same, but for the Y dimension, the distance between labels is reduced by arranging labels in multiple columns, and meanwhile, for the Y dimension, the distance between labels is the largest when the labels are displayed at 90 degrees, and the distance between labels is the smallest when the labels are displayed at 180 degrees.
To above-mentioned preset label show mode, terminal equipment is inside to be provided with the algorithm rule, can adjust the label with the mode that each label was arranged in N row earlier, if still can't all show M labels according to this kind of mode, then adjust the label with the mode of presetting angle show label again, and is specific:
optionally, if the preset tag display mode includes a mode of arranging tags in N rows;
before adjusting the labels and/or the distance between the labels based on the preset label display mode, the method further comprises the following steps:
determining a second distance between the labels when the labels are arranged through the N rows, wherein the second distance is smaller than the first distance;
determining a second length required for displaying the M tags based on the number M of the tags and the second distance;
adjusting the labels and/or the distance between the labels based on a preset label display mode, comprising:
if the second length is less than or equal to the displayable length, the labels and/or the distance between the labels are adjusted in a mode of arranging the labels in N rows.
Optionally, if the preset label display mode includes a mode of displaying the label at a preset angle;
adjusting the labels and/or the distance between the labels based on a preset label display adjustment mode, comprising:
if the second length is greater than the displayable length, the labels and/or the distance between the labels is adjusted by displaying each label at a preset angle.
As shown in fig. 2, in this embodiment, the length required for displaying the M tags according to the initial font size and the initial tag display manner is a first length, if the first length is greater than the displayable length, the initial font size is kept unchanged, the terminal device determines a second distance between the tags when the tags are all arranged in N rows, and the second distance is smaller than the first distance, so that the terminal device can determine, based on the number M of the tags and the second distance, the second length required for displaying the M tags of the dimension on the display interface.
And if the second length is less than or equal to the displayable length, keeping the size of the initial font of the label unchanged, adjusting the distance between the labels and/or the labels in a mode of arranging the labels in N rows, displaying the adjusted labels, and displaying the data to be displayed based on the labels and the distance between the labels.
If the second length is larger than the displayable length, the label is adjusted in a mode that N rows of arranged labels or all M labels cannot be displayed, the size of the initial font is kept unchanged, the distance between the labels and/or the distance between the labels is adjusted in a mode that each label is displayed at a preset angle, the distance between the labels when each label is displayed at the preset angle is smaller than the second distance, namely the distance between the labels is further reduced, and therefore more labels can be displayed in the dimension.
In this embodiment, as above, the display angle of each label is adjusted, each label can be displayed at a preset angle, and on this basis, if all M labels cannot be displayed, the initial font size of each label can be adjusted, specifically:
optionally, before the adjusting of the labels and/or the distance between the labels is performed by displaying the labels at a preset angle, the method further includes:
if the second length is larger than the displayable length, determining a third distance between the labels when the labels are displayed at a preset angle, wherein the third distance is smaller than or equal to the second distance;
determining a third length required for displaying the M tags based on the number M of the tags and the third distance;
the adjustment of the labels and/or the distance between the labels by presenting the labels at a preset angle comprises:
if the third length is less than or equal to the displayable length, the labels and/or the distance between the labels are adjusted in a manner of displaying the labels at a preset angle.
Optionally, if the preset tag display mode includes a mode of displaying the tag by reducing the font size to a specific font size;
the adjustment of the labels and/or the distance between the labels by presenting the labels at a preset angle comprises:
if the third length is larger than the displayable length, executing the steps of determining a specific font size, determining a fourth distance between the labels when the labels are displayed at a preset angle and the specific font size, and determining the fourth length required by displaying the M labels based on the number M of the labels and the fourth distance until the determined fourth length is smaller than or equal to the displayable length, wherein the fourth distance is smaller than the third distance;
the labels and/or the distance between the labels are adjusted in such a way that the labels are presented at a preset angle and in a specific font size.
Optionally, determining a specific font size includes:
determining a specific font size based on a preset font size reduction rule;
wherein the particular font size is greater than the font size threshold.
Referring to fig. 2, the terminal device may determine a third distance between the labels when the labels are displayed at the initial font size and the preset angle, where the third distance is generally smaller than the second distance, and if the labels are displayed at the preset angle, the labels just occupy N rows, the second distance is equal to the third distance, for example, for label "123", each row displays 1 number when displayed in 3 rows, and if the labels are adjusted to be displayed at 90 degrees, that is, adjusted for vertical display by horizontal display, it is equivalent to displaying 1 number when displayed in 3 rows, in which case the second distance and the third distance are the same. And after the terminal equipment obtains a third distance, determining a third length required for displaying the M labels according to the third distance, if the third length is less than or equal to the displayable length, keeping the size of the initial font unchanged by the terminal equipment, adjusting the labels and/or the distance between the labels in a mode of displaying each label at a preset angle, displaying the adjusted labels, and displaying the data to be displayed based on the adjusted labels and the distance between the labels.
If the third length is greater than the displayable length, the M labels cannot be displayed completely when the labels are displayed at a preset angle, further, the terminal device can reduce the initial font size of the labels to a specific font size, the terminal device determines the specific font size, determines a fourth distance between the labels when the labels are displayed at the preset angle and the specific font size, and determines a fourth length required by displaying the M labels at the fourth distance, and if the fourth length is less than or equal to the displayable length, the distance between each label and the label is adjusted at the preset angle and the specific font size, so that each adjusted label is displayed, and the data to be displayed is displayed based on the adjusted labels and the distance between the labels; if the fourth length is greater than the exposable length, the above-mentioned step of determining the specific font size and thus the fourth length is performed in a loop until the determined fourth length is less than or equal to the exposable length.
In this embodiment, the initial font size may be reduced to a specific font size according to a preset font size reduction rule, specifically, the font size of the font may be reduced by 1 each time, and reducing the font size is not an unlimited reduction process, and it is to be ensured that the specific font size is greater than a font size threshold, and if the specific font size is less than or equal to the font size threshold, after directly deleting a part of the tags in the M tags, the rest of the part of the tags are displayed with an acceptable minimum font size and a preset angle.
In summary, please refer to fig. 2, the scheme of the present disclosure can be summarized as the following steps:
s1: calculating the exposable length of any dimension;
s2: determining a first length required by the display of the M labels according to the size of the initial font and the display mode of the initial labels;
s3: judging whether the first length is larger than the displayable length;
s4: if the first length is less than or equal to the displayable length, displaying each label in the initial font size and the initial label display mode, and ending the algorithm;
fig. 3(a) is an effect diagram when each label is displayed in an initial font size and an initial label display manner;
s5: if the first length is larger than the displayable length and the font size is unchanged, determining a second length required by displaying each label in N lines;
s6: judging whether the second length is larger than the displayable length;
s7: if the second length is less than or equal to the displayable length, displaying each label by N lines of the initial font size, and ending the algorithm;
as shown in fig. 3(b) which is an effect diagram when each label is displayed in N lines of the initial font size, it is obvious that the distance between the labels is reduced and a larger number of labels can be displayed compared to fig. 3 (a).
S8: if the second length is larger than the displayable length and the font size is unchanged, determining a third length required when the M labels are displayed at a preset angle;
s9: judging whether the third length is greater than the displayable length;
s10: if the third length is larger than the displayable length, displaying each label according to the initial font size and the preset angle, and ending the algorithm;
as shown in fig. 3(c) which is an effect diagram when the labels are displayed at the initial font size and the preset angle, it is obvious that the distance between the labels is reduced and a larger number of labels can be displayed compared to fig. 3 (b).
S11: if the third length is less than or equal to the exposable length, determining a specific font size;
s12, determining a fourth length required when the M labels are displayed in a specific font size and a preset angle;
s13: judging whether the fourth length is greater than the displayable length;
s14, if the fourth length is larger than the displayable length, returning to S11;
and returning to the step of S11 and the subsequent steps until the fourth length is less than or equal to the exposable length, and ensuring that the specific font size is greater than the font size threshold, otherwise, discarding part of the tags in a traditional manner, and then displaying at intervals, and ending the algorithm.
S15: and if the fourth length is less than or equal to the displayable length, displaying each label by using a specific font size and a preset angle, and ending the algorithm.
As shown in fig. 3(d) which is an effect diagram when each label is displayed at a specific font size and preset angle, it is obvious that the distance between the labels is reduced and a larger number of labels can be displayed compared to fig. 3 (c).
Fig. 4 is a schematic structural diagram of an adjusting apparatus for a dimension tag according to an embodiment of the present disclosure, and as shown in fig. 4, the apparatus according to the embodiment of the present disclosure may include:
a first determining module 401, configured to determine a number M of tags in any dimension of data to be displayed, a preset first distance between the tags, and a corresponding displayable length of the dimension on a display interface, where M is an integer greater than 0;
a second determining module 402, configured to determine a first length required for displaying M tags based on the number M of tags and the first distance;
an adjusting module 403, configured to adjust the tags and/or the distances between the tags based on a preset tag display manner if the first length is greater than the displayable length, and display data according to the adjusted tags and/or the distances between the tags, where the adjusted distances between the tags are smaller than the first distance.
Optionally, the preset tag display mode includes at least one of the following:
the method comprises the following steps of arranging labels in N lines, displaying the labels at a preset angle, and displaying the labels in a mode of reducing the font size to a specific font size, wherein N is an integer larger than 1.
Optionally, if the preset tag display mode includes a mode of arranging tags in N rows;
the device further comprises a third determining module and a fourth determining module, wherein before the adjusting module 403 adjusts the labels and/or the distances among the labels based on the preset label display mode, the third determining module is used for determining a second distance among the labels when the labels are arranged in N rows, and the second distance is smaller than the first distance;
a fourth determining module, configured to determine a second length required for displaying the M tags based on the number M of tags and the second distance;
the adjusting module 403, when adjusting the labels and/or the distance between the labels based on the preset label display manner, is specifically configured to:
if the second length is less than or equal to the displayable length, the labels and/or the distance between the labels are adjusted in a mode of arranging the labels in N rows.
Optionally, if the preset label display mode includes a mode of displaying the label at a preset angle;
when the adjustment module 403 adjusts the labels and/or the distance between the labels based on the preset label display adjustment manner, it is specifically configured to:
if the second length is greater than the displayable length, the labels and/or the distance between the labels is adjusted by displaying each label at a preset angle.
Optionally, the apparatus further includes a fifth determining module and a sixth determining module, before the adjusting module 403 adjusts the tags and/or the distance between the tags in a manner of displaying the tags at a preset angle, where the fifth determining module is configured to determine a third distance between the tags when the tags are displayed at the preset angle if the second length is greater than the displayable length, and the third distance is less than or equal to the second distance;
a sixth determining module, configured to determine a third length required for displaying the M tags based on the number M of tags and the third distance;
the adjusting module 403 is specifically configured to, when adjusting the labels and/or the distance between the labels in a manner of displaying the labels at a preset angle:
if the third length is less than or equal to the displayable length, the labels and/or the distance between the labels are adjusted in a manner of displaying the labels at a preset angle.
Optionally, if the preset tag display mode includes a mode of displaying the tag by reducing the font size to a specific font size;
the adjusting module 403 is specifically configured to, when adjusting the labels and/or the distance between the labels in a manner of displaying the labels at a preset angle:
if the third length is larger than the displayable length, executing the steps of determining a specific font size, determining a fourth distance between the labels when the labels are displayed at a preset angle and the specific font size, and determining the fourth length required by displaying the M labels based on the number M of the labels and the fourth distance until the determined fourth length is smaller than or equal to the displayable length, wherein the fourth distance is smaller than the third distance;
the labels and/or the distance between the labels are adjusted in such a way that the labels are presented at a preset angle and in a specific font size.
Optionally, if the preset tag display mode includes a mode of displaying the tag by reducing the font size to a specific font size;
the adjusting module 403 is specifically configured to, when adjusting the labels and/or the distance between the labels in a manner of displaying the labels at a preset angle:
if the third length is larger than the displayable length, executing the steps of determining a specific font size, determining a fourth distance between the labels when the labels are displayed at a preset angle and the specific font size, and determining the fourth length required by displaying the M labels based on the number M of the labels and the fourth distance until the determined fourth length is smaller than or equal to the displayable length, wherein the fourth distance is smaller than the third distance;
the labels and/or the distance between the labels are adjusted in such a way that the labels are presented at a preset angle and in a specific font size.
Optionally, when determining the specific font size, the adjusting module 403 is specifically configured to:
determining a specific font size based on a preset font size reduction rule;
wherein the particular font size is greater than the font size threshold.
Referring now to fig. 5, a schematic diagram of an electronic device (e.g., the terminal device of fig. 1) 600 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as the processing device 601 hereinafter, and the memory may include at least one of a Read Only Memory (ROM)602, a Random Access Memory (RAM)603 and a storage device 608 hereinafter, which are specifically shown as follows:
as shown in fig. 5, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (hypertext transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determining the number M of labels of any dimensionality of data to be displayed, a preset first distance between the labels and a corresponding displayable length of the dimensionality on a display interface, wherein M is an integer larger than 0; determining a first length required for displaying the M labels based on the number M of the labels and the first distance; and if the first length is greater than the displayable length, adjusting the labels and/or the distance between the labels based on a preset label display mode, and displaying data through the adjusted labels and/or the distance between the labels, wherein the adjusted distance between the labels is less than the first distance.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. The name of a module or a unit does not in some cases constitute a limitation on the unit itself, for example, the first determination module may also be described as a "module that determines the number M of tags of any dimension of the data to be presented, a preset first distance between the tags, and a corresponding exposable length of the dimension on the presentation interface".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a method for adjusting a dimension tag, including:
determining the number M of labels of any dimensionality of data to be displayed, a preset first distance between the labels and a corresponding displayable length of the dimensionality on a display interface, wherein M is an integer larger than 0;
determining a first length required for displaying the M labels based on the number M of the labels and the first distance;
and if the first length is greater than the displayable length, adjusting the labels and/or the distance between the labels based on a preset label display mode, and displaying data through the adjusted labels and/or the distance between the labels, wherein the adjusted distance between the labels is less than the first distance.
Optionally, the preset tag display mode includes at least one of the following:
the method comprises the following steps of arranging labels in N lines, displaying the labels at a preset angle, and displaying the labels in a mode of reducing the font size to a specific font size, wherein N is an integer larger than 1.
Optionally, if the preset tag display mode includes a mode of arranging tags in N rows;
before adjusting the labels and/or the distance between the labels based on the preset label display mode, the method further comprises the following steps:
determining a second distance between the labels when the labels are arranged through the N rows, wherein the second distance is smaller than the first distance;
determining a second length required for displaying the M tags based on the number M of the tags and the second distance;
adjusting the labels and/or the distance between the labels based on a preset label display mode, comprising:
if the second length is less than or equal to the displayable length, the labels and/or the distance between the labels are adjusted in a mode of arranging the labels in N rows.
Optionally, if the preset label display mode includes a mode of displaying the label at a preset angle;
adjusting the labels and/or the distance between the labels based on a preset label display adjustment mode, comprising:
if the second length is greater than the displayable length, the labels and/or the distance between the labels is adjusted by displaying each label at a preset angle.
Optionally, before the adjusting of the labels and/or the distance between the labels is performed by displaying the labels at a preset angle, the method further includes:
if the second length is larger than the displayable length, determining a third distance between the labels when the labels are displayed at a preset angle, wherein the third distance is smaller than or equal to the second distance;
determining a third length required for displaying the M tags based on the number M of the tags and the third distance;
the adjustment of the labels and/or the distance between the labels by presenting the labels at a preset angle comprises:
if the third length is less than or equal to the displayable length, the labels and/or the distance between the labels are adjusted in a manner of displaying the labels at a preset angle.
Optionally, if the preset tag display mode includes a mode of displaying the tag by reducing the font size to a specific font size;
the adjustment of the labels and/or the distance between the labels by presenting the labels at a preset angle comprises:
if the third length is larger than the displayable length, executing the steps of determining a specific font size, determining a fourth distance between the labels when the labels are displayed at a preset angle and the specific font size, and determining the fourth length required by displaying the M labels based on the number M of the labels and the fourth distance until the determined fourth length is smaller than or equal to the displayable length, wherein the fourth distance is smaller than the third distance;
the labels and/or the distance between the labels are adjusted in such a way that the labels are presented at a preset angle and in a specific font size.
Optionally, determining a specific font size includes:
determining a specific font size based on a preset font size reduction rule;
wherein the particular font size is greater than the font size threshold.
According to one or more embodiments of the present disclosure, there is also provided a device for adjusting a dimension tag, the device including:
the display device comprises a first determining module, a second determining module and a display interface, wherein the first determining module is used for determining the number M of labels of any dimension of data to be displayed, a preset first distance between the labels and a corresponding displayable length of the dimension on the display interface, and M is an integer larger than 0;
the second determining module is used for determining a first length required for displaying the M labels based on the number M of the labels and the first distance;
and the adjusting module is used for adjusting the labels and/or the distances among the labels based on a preset label display mode and displaying data through the adjusted labels and/or the distances among the labels if the first length is greater than the displayable length, wherein the adjusted distances among the labels are less than the first distance.
Optionally, the preset tag display mode includes at least one of the following:
the method comprises the following steps of arranging labels in N lines, displaying the labels at a preset angle, and displaying the labels in a mode of reducing the font size to a specific font size, wherein N is an integer larger than 1.
Optionally, if the preset tag display mode includes a mode of arranging tags in N rows;
the device also comprises a third determining module and a fourth determining module, wherein before the adjusting module adjusts the labels and/or the distances among the labels based on a preset label display mode, the third determining module is used for determining a second distance among the labels when the labels are arranged in N rows, and the second distance is smaller than the first distance;
a fourth determining module, configured to determine a second length required for displaying the M tags based on the number M of tags and the second distance;
when the adjustment module adjusts the labels and/or the distance between the labels based on the preset label display mode, the adjustment module is specifically configured to:
if the second length is less than or equal to the displayable length, the labels and/or the distance between the labels are adjusted in a mode of arranging the labels in N rows.
Optionally, if the preset label display mode includes a mode of displaying the label at a preset angle;
when the adjustment module adjusts the labels and/or the distance between the labels based on the preset label display adjustment mode, the adjustment module is specifically configured to:
if the second length is greater than the displayable length, the labels and/or the distance between the labels is adjusted by displaying each label at a preset angle.
Optionally, the apparatus further includes a fifth determining module and a sixth determining module, before the adjusting module adjusts the tags and/or the distance between the tags in a manner of displaying the tags at a preset angle, the fifth determining module is configured to determine a third distance between the tags when the tags are displayed at the preset angle if the second length is greater than the displayable length, where the third distance is less than or equal to the second distance;
a sixth determining module, configured to determine a third length required for displaying the M tags based on the number M of tags and the third distance;
when the adjustment module adjusts the labels and/or the distance between the labels in a manner of displaying the labels at a preset angle, the adjustment module is specifically configured to:
if the third length is less than or equal to the displayable length, the labels and/or the distance between the labels are adjusted in a manner of displaying the labels at a preset angle.
Optionally, if the preset tag display mode includes a mode of displaying the tag by reducing the font size to a specific font size;
when the adjustment module adjusts the labels and/or the distance between the labels in a manner of displaying the labels at a preset angle, the adjustment module is specifically configured to:
if the third length is larger than the displayable length, executing the steps of determining a specific font size, determining a fourth distance between the labels when the labels are displayed at a preset angle and the specific font size, and determining the fourth length required by displaying the M labels based on the number M of the labels and the fourth distance until the determined fourth length is smaller than or equal to the displayable length, wherein the fourth distance is smaller than the third distance;
the labels and/or the distance between the labels are adjusted in such a way that the labels are presented at a preset angle and in a specific font size.
Optionally, if the preset tag display mode includes a mode of displaying the tag by reducing the font size to a specific font size;
when the adjustment module adjusts the labels and/or the distance between the labels in a manner of displaying the labels at a preset angle, the adjustment module is specifically configured to:
if the third length is larger than the displayable length, executing the steps of determining a specific font size, determining a fourth distance between the labels when the labels are displayed at a preset angle and the specific font size, and determining the fourth length required by displaying the M labels based on the number M of the labels and the fourth distance until the determined fourth length is smaller than or equal to the displayable length, wherein the fourth distance is smaller than the third distance;
the labels and/or the distance between the labels are adjusted in such a way that the labels are presented at a preset angle and in a specific font size.
Optionally, when determining the specific font size, the adjusting module is specifically configured to:
determining a specific font size based on a preset font size reduction rule;
wherein the particular font size is greater than the font size threshold.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.