JPH05108834A - Graph character string and leader line plotting system - Google Patents

Graph character string and leader line plotting system

Info

Publication number
JPH05108834A
JPH05108834A JP3265789A JP26578991A JPH05108834A JP H05108834 A JPH05108834 A JP H05108834A JP 3265789 A JP3265789 A JP 3265789A JP 26578991 A JP26578991 A JP 26578991A JP H05108834 A JPH05108834 A JP H05108834A
Authority
JP
Japan
Prior art keywords
character string
graph
leader line
character
point
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
JP3265789A
Other languages
Japanese (ja)
Inventor
Noboru Kitazawa
昇 北澤
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP3265789A priority Critical patent/JPH05108834A/en
Publication of JPH05108834A publication Critical patent/JPH05108834A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To prevent the display of each item from being swelled out from a screen by calculating the writing position of each character string, and shifting the writing position of one character string at the time of judging that two character strings are overlapped. CONSTITUTION:The writing position of the character string of each time of a graph is calculated before plotting, and the leader of one character string is extended when the character strings are overlapped, so that the character strings can be prevented from being overlapped. And also, when an another character string is overlapped due to the pertinent prevention, the similar preventing processing is successively operated, and this is repeated until the entire character strings can not be overlapped on plotting. And also, when the display range of the entire graph including the character strings is judged to be beyond a plotting area, the reduction ratio of the entire graphic is calculated, and the entire graph is reduced, so that the graph can be plotted within the plotting area. Thus, the visibility of the graph can be improved, and the display of each item can be prevented from being swelled out from the screen by plotting the graph within a restricted display frame.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、グラフの文字列・引出
し線作図方式に関し、特にグラフを作図する際の各項目
に対応する文字・記号等の文字列を記入する方式に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graph character string / leader line drawing system, and more particularly to a system for writing a character string such as characters / symbols corresponding to each item when drawing a graph.

【0002】[0002]

【従来の技術】従来例のグラフの文字列・引出し線作図
方式について図面を参照して説明する。
2. Description of the Related Art A conventional character string / drawing line drawing system for a graph will be described with reference to the drawings.

【0003】図5は従来例のグラフの文字列・引出し線
作図方式による作図例を示す図である。
FIG. 5 is a diagram showing an example of drawing by a character string / leader line drawing method of a conventional graph.

【0004】従来、円グラフの各項目に対応する文字列
や引出し線を作図する場合には、図5に示すように、円
グラフの各項目から放射状に一定長離れた場所に文字列
を作図している。その場合に、円グラフの各項目と文字
列との間を一定長の引出し線で結ぶように作図すること
もある。
Conventionally, when drawing a character string or a leader line corresponding to each item of a pie chart, as shown in FIG. 5, a character string is drawn at a location radially apart from each item of the pie chart by a certain length. is doing. In that case, it may be drawn such that each item of the pie chart and the character string are connected by a leader line of a constant length.

【0005】[0005]

【発明が解決しようとする課題】上述した従来の円グラ
フの文字列・引出し線作図方式は、円グラフの全体に対
する割合の小さい項目が連続すると、各項目に対応する
文字列が重なり、認識できないもしくは認識しにくくな
るという問題がある。また、文字列の重なりを避けるた
めに引出し線を一様に長くとると、項目名表示が画面か
らはみ出してしまい作図できないという問題がある。
In the above-mentioned conventional character string / drawing line drawing method for pie charts, when items having a small ratio to the whole pie chart continue, the character strings corresponding to the respective items overlap and cannot be recognized. Or there is a problem that it becomes difficult to recognize. Further, if the leader line is made uniformly long in order to avoid overlapping of character strings, there is a problem that the item name display will be out of the screen and drawing will not be possible.

【0006】本発明の目的は、上記の欠点を解消し、作
図前にグラフの各項目の文字列の書き込み位置(表示位
置)を計算し、文字列が重なる場合には、一方の引出し
線を伸ばすことにより、文字列が重ならないように回避
する。また、この回避により更に別の文字列が重なった
場合には、順次同様の回避処理を行い、作図上すべての
文字列が重ならなくなるまでこれを繰り返し、また、文
字列を含むグラフ全体の表示範囲が作図領域を越えると
判断されるときには、グラフ全体の縮小率を計算し、グ
ラフ全体を縮小して作図領域内にグラフを作図すること
により、グラフを囲む文字列を重ならないように作図し
てグラフの視認性を高めるとともに、制限される表示枠
内にグラフを作図することにより、項目名表示が画面か
らはみ出さないようにすることができ、使用性をも高め
ることができるグラフの文字列・引出し線作図方式を提
供することにある。
An object of the present invention is to solve the above drawbacks, calculate the writing position (display position) of the character string of each item of the graph before drawing, and if the character strings overlap, draw one of the leader lines. By stretching, it avoids that the character strings do not overlap. If another character string overlaps due to this avoidance, the same avoidance process is sequentially performed, and this is repeated until all character strings do not overlap in drawing, and the entire graph including the character string is displayed. When it is determined that the range exceeds the drawing area, the reduction ratio of the entire graph is calculated, the entire graph is reduced, and the graph is drawn in the drawing area so that the character strings surrounding the graph do not overlap. By increasing the visibility of the graph and drawing the graph in the restricted display frame, the item name display can be prevented from protruding from the screen, and the usability can be improved. It is to provide a column / leader line drawing method.

【0007】[0007]

【課題を解決するための手段】本第一の発明のグラフの
文字列・引出し線作図方式は、グラフの各項目の近傍に
各項目に対応する項目名、数値及び記号等からなる文字
列を記入し、グラフの各項目と各文字列との間を引出し
線で結ぶグラフ文字列記入方式において、各文字列の書
き込み位置を計算し、二つの文字列が重なると判断した
場合には一方の書き込み位置をずらしている。
In the character string / drawer line drawing method of the graph of the first invention, a character string consisting of an item name, a numerical value and a symbol corresponding to each item is provided in the vicinity of each item of the graph. In the graph character string writing method that connects each item of the graph and each character string with a leader line, calculate the writing position of each character string, and if it is determined that two character strings overlap, The writing position is shifted.

【0008】本第二の発明のグラフの文字列・引出し線
作図方式は、上記第一の発明のグラフの文字列・引出し
線作図方式において、円グラフの場合においては円グラ
フの各項目の占める角の二等分線上の一点を引出し線始
点、引出し線始点から半径方向円の外側に一定距離にあ
る点を引出し線仮終点、引出し線始点と引出し線仮終点
を結ぶ直線を仮引出し線とそれぞれ定義し、円グラフの
各項目の仮引出し線の円グラフ基線からの角度を算出し
て引出し線仮終点の座標位置を計算し、これを起点とす
る二つの相隣合う文字列が互いに重ならなければ前記座
標位置を引出し線終点とし、互いに重なると判断した時
には二つの文字列の配置される象限によって決められる
いずれか一方の文字列の起点の座標位置の修正をおこな
い、この修正された座標位置を引出し線終点として引出
し線及び文字列を作図している。
In the character string / leader line drawing method of the graph of the second invention, in the character string / leader line drawing method of the graph of the first invention, in the case of a pie chart, each item of the pie chart occupies A point on the bisector of the corner is a leader line start point, a point at a certain distance outside the radial line circle from the leader line start point is a leader line temporary end point, and a straight line connecting the leader line start point and the leader line temporary end point is a temporary leader line. After defining each, calculate the angle of the temporary leader line of each item of the pie chart from the pie chart base line to calculate the coordinate position of the temporary leader line end point, and the two adjacent character strings starting from this will overlap each other. Otherwise, the coordinate position is set as the leader line end point, and when it is determined that they overlap each other, the coordinate position of the starting point of one of the character strings determined by the quadrant in which the two character strings are arranged is corrected, and this correction is performed. It is plotted the lead lines and string coordinate position as lead line end point.

【0009】本第三の発明のグラフの文字列・引出し線
作図方式は、上記第二の発明のグラフの文字列・引出し
線作図方式において、二つの文字列のいずれかの文字列
の配置する位置の修正をおこなうことによって、その修
正された文字列がさらに別の文字列に重なると判断され
たときには、重ねられた文字列に対してさらにその表示
位置の修正を加えていくというように文字列表示位置の
修正作業をおこなっている。
The character string / leader line drawing method of the graph of the third invention is the arrangement of any one of two character strings in the character string / leader line drawing method of the graph of the second invention. When it is determined that the corrected character string overlaps with another character string by correcting the position, the display position is further corrected for the overlapped character string. The column display position is being corrected.

【0010】本第四の発明のグラフの文字列・引出し線
作図方式は、文字列を含むグラフが表示可能な画面作図
領域を越えるか否かを判断し、文字列を含むグラフ全体
が表示装置画面作図領域を越えると判断した場合には、
文字列を含むグラフ全体を表示装置画面作図領域内に表
示することが可能な大きさに縮小するための縮小率を計
算し、その縮小率を、縮小するグラフの全ての表示位置
座標に掛けて新たな表示位置を求めたのち、引き出線及
び文字列を作図している。
In the character string / leader line drawing method for a graph according to the fourth aspect of the present invention, it is determined whether or not a graph including a character string exceeds a screen drawing area capable of being displayed, and the entire graph including the character string is displayed on the display device. If it is judged that the screen drawing area is exceeded,
Calculate the reduction ratio for reducing the entire graph including the character string to the size that can be displayed in the display device screen drawing area, and multiply the reduction ratio by all the display position coordinates of the graph to be reduced. After obtaining the new display position, the leader line and the character string are drawn.

【0011】[0011]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0012】図1は本発明の一実施例のグラフの文字列
・引出し線作図方式による円グラフの作成動作処理のフ
ローチャート、図2は図1の方式による作図の領域を示
す図、図3は図1の方式による作図の一般形を示す図、
図4は図1の方式による作図例を示す図である。まず、
図1、図2を参照して本実施例である円グラフの作成動
作を説明する。
FIG. 1 is a flow chart of an operation process for creating a pie chart by a character string / leader line drawing method of a graph according to an embodiment of the present invention, FIG. 2 is a diagram showing a drawing area by the method of FIG. 1, and FIG. Diagram showing the general form of drawing by the method of FIG. 1,
FIG. 4 is a diagram showing an example of drawing by the method of FIG. First,
The operation of creating a pie chart according to this embodiment will be described with reference to FIGS. 1 and 2.

【0013】図1において、作図データ入力ステップ1
では、文字列と数値の2フィールドからなる有限なレコ
ードを入力する。角度計算ステップ2では、作図データ
入力ステップ1より各項目の占める百分率、角度を計算
する。表示用円角度計算ステップ3では、角度計算ステ
ップ2の角度からの情報により累計された角度を計算す
る。文字列表示高さ計算ステップ4では、表示用円角度
計算ステップ3からの情報により、文字列表示の高さを
計算する。文字列表示位置判断ステップ5では、図2の
ように、作図領域を決めた第1象限、第4象限、第3象
限、第2象限の順序で、文字列表示高さ計算ステップ4
の情報により、隣合う項目の文字列が共に円の左右半分
のどちらか一方のみに存在するとき、隣合う項目の文字
列表示の高さの差から文字列が重なるか否かの判断をす
る。
In FIG. 1, step 1 for inputting drawing data
Then, enter a finite record consisting of two fields, a character string and a numerical value. In the angle calculation step 2, the percentage and angle occupied by each item are calculated from the drawing data input step 1. In the display circle angle calculation step 3, the accumulated angle is calculated based on the information from the angle in the angle calculation step 2. In the character string display height calculation step 4, the height of the character string display is calculated based on the information from the display circle angle calculation step 3. In the character string display position determination step 5, as shown in FIG. 2, the character string display height calculation step 4 is performed in the order of the first quadrant, the fourth quadrant, the third quadrant, and the second quadrant in which the drawing area is determined.
When the character strings of the adjacent items are present in only one of the left and right half of the circle, it is judged whether the character strings overlap based on the difference in the height of the character string display of the adjacent items. .

【0014】文字列表示位置修正ステップ6では、文字
列表示位置判断ステップ5の情報により文字列が重なる
場合には、相隣合う文字列が重ならないように高さ補正
及び水平方向表示位置の補正を行って引出し線終点の座
標を求める。
In the character string display position correcting step 6, if the character strings overlap according to the information in the character string display position determining step 5, the height correction and the horizontal display position correction are performed so that adjacent character strings do not overlap. To determine the coordinates of the end point of the leader line.

【0015】文字列修正ステップ7では、作図データ入
力ステップ1のレコードに百分率とパーセント記号を付
加する。文字列描画位置計算ステップ8では、y軸正方
向の線分から円グラフn番目文字列(以下、文字列M
(n) と書く)の文字列M(n) の占める扇形の角の2等分
線までの角度θn の大きさから文字列を円グラフの右半
面側あるいは左半面側に描くかを判断し、左側に描くと
判断した場合には、引出し線終点よりも文字列長さ分だ
け水平方向の距離にある位置を文字列描画開始点とし、
右側に描くと判断した場合には、引出し線終点を文字列
描画開始点とする。文字列表示枠判断ステップ9では、
円グラフの占める面積に対して円グラフの制限された表
示枠が大きいかを判断する。縮小率計算ステップ10で
は、文字列表示枠判断ステップ9の情報により円グラフ
の縮小率を計算し、文字列表示高さ計算ステップ4以降
で計算された文字列表示位置を、縮小率を掛けて再度算
出する。引出し線作図ステップ11では、円周上の引出
し線始点から、文字列表示位置修正ステップ6で補正さ
れた引出し線終点を結ぶ引出し線を作図する。文字列作
図ステップ12では、文字列描画位置計算ステップ8か
らの情報により文字列を作図する。
In the character string correction step 7, a percentage and a percent symbol are added to the record of the drawing data input step 1. In the character string drawing position calculation step 8, from the line segment in the positive direction of the y-axis, the nth character string in the pie chart (hereinafter, character string M
(n) and Write) determine drawn from the magnitude of the angle theta n up to the bisector of the fan-shaped corners occupied by the string M (n) of the string on the right half side or the left half side of the pie However, if it is determined to draw on the left side, the position at the horizontal distance of the character string length from the end of the leader line is the character string drawing start point,
When it is determined to draw on the right side, the leader line end point is set as the character string drawing start point. In the character string display frame determination step 9,
Judge whether the restricted display frame of the pie chart is larger than the area occupied by the pie chart. In the reduction rate calculation step 10, the reduction rate of the pie chart is calculated based on the information in the character string display frame determination step 9, and the character string display position calculated after the character string display height calculation step 4 is multiplied by the reduction rate. Calculate again. In the drawing line drawing step 11, a drawing line connecting the drawing line starting point on the circumference to the drawing line end point corrected in the character string display position correcting step 6 is drawn. In the character string drawing step 12, the character string is drawn based on the information from the character string drawing position calculating step 8.

【0016】次に、図3を参照して本実施例である円グ
ラフの作成の計算方法を詳細に説明する。
Next, a calculation method for creating a pie chart according to this embodiment will be described in detail with reference to FIG.

【0017】円原点O、x軸、y軸を図3のように定め
る。
The circle origin O, the x axis and the y axis are defined as shown in FIG.

【0018】文字列表示高さ計算ステップ4において
は、以下の手順で計算する。
In the character string display height calculation step 4, calculation is performed in the following procedure.

【0019】文字列固有高さをH(=一定)、円グラフ
半径をrとする。
Let H (= constant) be the unique height of the character string and r be the radius of the pie chart.

【0020】円グラフの文字列(項目)の占有角度の2
等分線と円グラフ円弧との交点Bn から半径方向内側に
一定距離dにある点An 〔円グラフの中心から距離(r
−d)の点〕を引出し線始点、点Bn から半径方向外側
に一定距離にある(円グラフ原点Oから距離r1 にあ
る)点を修正作業を行う前の引出し線仮終点Cn (Mx
n 、Myn )、点An と点Cn を結ぶ直線を仮引出し線
と、それぞれ定義する。文字列表示位置を修正していな
いときは、点Oから文字列Mn の仮引出し線終点Cn
での距離は(r+dr)であるので、点Cn の座標(M
n ,Myn)は以下のように求めることができる。
2 of the occupation angle of the character string (item) of the pie chart
Bisectrix a distance from the center of A n [pie point which is a predetermined distance d in the radially inward from the intersection B n of the pie arc (r
-D)]], and a point at a constant distance radially outward from the point B n (at a distance r 1 from the origin O of the circle graph) from the point B n, the temporary end point C n ( Mx
n , My n ), and the straight lines connecting the points A n and C n are defined as provisional leader lines, respectively. When the character string display position is not corrected, the distance from the point O to the temporary leader line end point C n of the character string M n is (r + dr), so the coordinates of the point C n (M
x n , My n ) can be obtained as follows.

【0021】 [0021]

【0022】よって Mxn =(r+dr)sinθn Myn =(r+dr)cosθn 文字列表示位置判断ステップ5において、文字列Mn
の表示位置である点Cn と文字列M(n-1) の表示位置で
ある点Cn-1 のy座標を比較し、文字列が重なるか否か
を判断する。
Therefore, Mxn= (R + dr) sin θn  Myn= (R + dr) cos θn  In the character string display position determination step 5, the character string Mn
Point C which is the display position ofnAnd the string M(n-1)At the display position of
Some point Cn-1Whether the character strings overlap by comparing the y-coordinates of
To judge.

【0023】このときの条件式は次式で表せる。The conditional expression at this time can be expressed by the following expression.

【0024】文字列高さ差:Δhn Δhn =Myn −Myn-1 =(r+dr)cosθn −(r+dr)cosθn-1 =(r+dr)(cosθn −cos
θn-1 ) 上式において、以下の4つ場合に文字列が重なると判断
する。
Character string height difference: Δhn  Δhn= Myn-Myn-1 = (R + dr) cos θn− (R + dr) cos θn-1  = (R + dr) (cos θn-Cos
θn-1) In the above formula, it is judged that the character strings overlap in the following four cases:
To do.

【0025】(1)第1象限または第4象限で、−H<
Δhn <0のとき (2)第2象限または第3象限で、0<Δhn <Hのと
き (3)第1象限または第4象限で、Δhn >0のとき (4)第2象限または第3象限で、Δhn <0のとき ここで、(3)及び(4)は、表示位置修正作業が生じ
た場合におこることがある。
(1) In the first quadrant or the fourth quadrant, -H <
When Δh n <0 (2) In the second or third quadrant, when 0 <Δh n <H (3) In the first or fourth quadrant, and when Δh n > 0 (4) Second quadrant Alternatively, in the third quadrant, when Δh n <0, (3) and (4) may occur when the display position correcting work occurs.

【0026】また、第1番目文字列M(1) 以降の文字列
について判断するときには、点D1 から点Dn をそれぞ
れ点C1から点Cn として上記と同様に文字列の重なり
を判断する。
When judging the character strings after the first character string M (1) , the points D 1 to D n are respectively set to the points C 1 to C n and the overlapping of the character strings is judged in the same manner as above. To do.

【0027】文字列表示位置判断ステップ5で相隣合う
文字列が重ならないと判断されたときには、仮引出し線
終点Cn を引出し線終点Dn とする。
When it is determined in the character string display position determination step 5 that adjacent character strings do not overlap, the temporary leader line end point C n is set as the leader line end point D n .

【0028】文字列が重なると判断したときについて以
下に示す。
The case where it is determined that the character strings overlap will be described below.

【0029】文字列表示位置修正ステップ6における修
正手順は、第1象限または第3象限のときは、文字列M
(n-1) の引出し線仮終点Cnー1 に対して修正を加えて新
たに引出し線終点Dnー1 を計算し、次にこの点Dnー1
点Cnー2 とを比較し、文字列どうしが重なると判断した
場合には、文字列M(n-2) の表示位置についても修正を
加えるというように、相隣合う文字列が重ならないと判
断するまで、前の文字列に対して修正を加える。また、
第2象限または第4象限のときは、文字列M(n) の引出
し線仮終点Cn に対して修正を加えて新たに引出し線終
点Dn を計算する。
In the character string display position correcting step 6, the correction procedure is as follows: in the first quadrant or the third quadrant, the character string M
(n-1) The leader line tentative end point C n-1 is modified to newly calculate the leader line end point D n-1 , and then this point D n-1 and point C n-2 are calculated. If it is determined that the character strings overlap each other by comparison, the display position of the character string M (n-2) is also corrected, and so on. Make corrections to the string. Also,
In the case of the second quadrant or the fourth quadrant, the leader line temporary end point C n of the character string M (n) is corrected to newly calculate the leader line end point D n .

【0030】次に、文字列が重なると判断される基準が
文字列表示位置判断ステップ5の(1)または(2)の
場合の修正方法を以下に示す。
Next, the correction method when the criterion for judging that the character strings overlap is (1) or (2) of the character string display position judging step 5 is shown below.

【0031】引出し線終点のy軸方向の修正値をΔyn
とすると、 第1象限:Δyn =H+Δhn 第2象限:Δy
n =H−Δhn 第3象限:Δyn =−H+Δhn 第4象限:
Δyn =−H−Δhn と表せる。
The correction value in the y-axis direction at the end of the leader line is Δyn
Then, the first quadrant: Δyn= H + Δhn Second quadrant: Δy
n= H-Δhn  Third quadrant: Δyn= -H + Δhn Fourth quadrant:
Δyn= -H-Δhn  Can be expressed as

【0032】第1象限及び第3象限では、文字列M
(nー1) について修正するので、 MYn-1 =Myn-1 +Δyn と表せ、第2象限及び第4象限では、文字列M(n) につ
いて修正するので、 MYn =Myn +Δyn と表せる。文字列M(n) の水平方向の修正分をΔxn
すると,次式で表せる。
In the first and third quadrants, the character string M
(n-1)I am going to correctn-1= Myn-1+ Δyn  And the character string M in the second and fourth quadrants.(n)Nitsu
I will correct it, so MYn= Myn+ Δyn  Can be expressed as Character string M(n)Δx is the horizontal correction ofnWhen
Then, it can be expressed by the following equation.

【0033】 [0033]

【0034】文字列M(n) の修正後の文字列表示位置を
点Dn(MXn ,MYn )、文字列M(n-1) の修正後の
文字列表示位置を点Dn-1 (MXn-1 ,MYn-1 )とす
ると、第1象限及び第3象限では、文字列M(nー1) につ
いて修正するので、 MXn-1 =Mxn-1 +Δxn と表せ、第2象限及び第4象限では、文字列M(n) につ
いて修正するので、 MXn =Mxn +Δxn と表せる。このようにして、文字列M(n) または文字列
(n-1) の仮引出し線終点Cに対して修正を行って得ら
れた座標(MXn ,MYn )または座標(MXn-1 ,M
n-1 )を新たにそれぞれ座標(Mxn 、Myn )また
は(Mxnー1 ,Myn-1 )とし、あらたな引出し線終点
n またはDn-1 とする。
Character string M(n)After the correction of the character string display position
Point Dn(MXn, MYn), The character string M(n-1)After the correction of
Character string display position is point Dn-1(MXn-1, MYn-1)
Then, in the first and third quadrants, the character string M(n-1)Nitsu
I will correct it, so MXn-1= Mxn-1+ Δxn  And the character string M in the second and fourth quadrants.(n)Nitsu
I will correct it, so MXn = Mxn+ Δxn  Can be expressed as In this way, the character string M(n)Or string
M(n-1)Obtained by modifying the temporary leader line end point C of
Coordinates (MXn, MYn) Or coordinates (MXn-1, M
Yn-1) Are newly added as coordinates (Mxn, Myn)Also
Is (Mxn-1, Myn-1) And the end of the new leader line
DnOr Dn-1And

【0035】文字列が重なると判断する基準が文字列表
示位置判断ステップ5の(3)または(4)の場合の修
正方法を以下に示す。 第1象限:MYn-1 =Myn +H 第2象限:MYn
=Myn-1 −H 第3象限:MYn-1 =Myn −H 第4象限:MYn
=Myn-1 +H のようにMy(MY)を求めてから、Mx(MX)を計
算することによって、修正位置を求める。 以上の修正
方法によって、新たに別の文字列と重なってしまう場合
には、さらに上記の修正作業を行う。
The correction method when the criterion for judging that the character strings are overlapped is (3) or (4) of the character string display position judging step 5 will be shown below. First quadrant: MY n-1 = My n + H Second quadrant: MY n
= My n-1 -H 3rd quadrant: MY n-1 = My n -H 4th quadrant: MY n
= My n-1 + H, then My (MY) is calculated, and then Mx (MX) is calculated to calculate the corrected position. In the case where another character string is newly overlapped by the above correction method, the above correction work is further performed.

【0036】なお、第1象限の文字列と第4象限の文字
列、第2象限の文字列と第3象限の文字列が重なる場合
には、それぞれ第4象限、第2象限の文字列に修正を加
えることにより、文字列が重なるのを回避する。文字列
表示枠判断ステップ9においては、円グラフの占める領
域を以下のように計算する。
When the character string in the first quadrant and the character string in the fourth quadrant and the character string in the second quadrant and the character string in the third quadrant overlap each other, the character string in the fourth quadrant and the character string in the second quadrant are respectively overlapped. Avoid the overlapping of character strings by making corrections. In the character string display frame determination step 9, the area occupied by the pie chart is calculated as follows.

【0037】グラフの表示装置が横Xh 、縦Yh の幅を
持つとする。この時、文字列M(1) から文字列M(n)
でのなかで、x座標とy座標の最大値をそれぞれMax
Mx,MaxMyとし、最小値をそれぞれMinMx,
MinMyとすれば、 Xh < MaxMx−MinMx+H またはYh < MaxMy−MinMy+H である場合には、グラフが表示枠を越えると判断する。
縮小率計算ステップ10においては、文字列表示枠判断
ステップ9の情報により、例えば、円グラフの必要最低
限の縮小率をx方向Sx、y方向Syと定義し、
It is assumed that the graph display device has a width of X h and a width of Y h . At this time, in the character strings M (1) to M (n) , the maximum values of the x coordinate and the y coordinate are respectively Max.
Let Mx and MaxMy be the minimum values MinMx and
If MinMy, in the case of X h <MaxMx-MinMx + H or Y h <MaxMy-MinMy + H determines the graph exceeds display frame.
In the reduction rate calculation step 10, the minimum required reduction rate of the pie chart is defined as x direction Sx and y direction Sy based on the information of the character string display frame determination step 9,

【0038】 [0038]

【0039】と求め、このSxとSyのうちの大きい値
を縮小率Sとし、文字列表示高さ計算ステップ4以降で
計算された文字列表示位置を、この縮小率Sを掛けて再
度算出する。
Then, the larger value of Sx and Sy is set as the reduction ratio S, and the character string display position calculated in the character string display height calculation step 4 and thereafter is multiplied again by this reduction ratio S to be calculated again. ..

【0040】[0040]

【発明の効果】以上説明したように、本発明のグラフの
文字列・引出し線作図方式は、作図前にグラフの各項目
の文字列の書き込み位置(表示位置)を計算し、文字列
が重なる場合には、一方の引出し線を伸ばすことによ
り、文字列が重ならないように回避する。また、この回
避により更に別の文字列が重なった場合には、順次同様
の回避処理を行い、作図上すべての文字列が重ならなく
なるまでこれを繰り返し、また、文字列を含むグラフ全
体の表示範囲が作図領域を越えると判断されるときに
は、グラフ全体の縮小率を計算し、グラフ全体を縮小し
て作図領域内にグラフを作図することにより、グラフを
囲む文字列を重ならないように作図してグラフの視認性
を高めるとともに、制限される表示枠内にグラフを作図
することにより、項目名表示が画面からはみ出さないよ
うにすることができ、使用性をも高めることができると
いう効果がある。
As described above, in the character string / leader line drawing method of the graph of the present invention, the writing position (display position) of the character string of each item of the graph is calculated before drawing, and the character strings are overlapped. In this case, one of the leader lines is extended to avoid overlapping of character strings. If another character string overlaps due to this avoidance, the same avoidance process is sequentially performed, and this is repeated until all character strings do not overlap in drawing, and the entire graph including the character string is displayed. When it is determined that the range exceeds the drawing area, the reduction ratio of the entire graph is calculated, the entire graph is reduced, and the graph is drawn in the drawing area so that the character strings surrounding the graph do not overlap. In addition to improving the visibility of the graph and drawing the graph in the restricted display frame, it is possible to prevent the item name display from protruding from the screen and improve the usability. is there.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例のグラフの文字列・引出し線
作図方式による円グラフの作成動作処理のフローチャー
トである。
FIG. 1 is a flowchart of a pie chart creation operation process by a character string / leader line drawing method of a graph according to an embodiment of the present invention.

【図2】図1の方式による作図の領域を示す図である。FIG. 2 is a diagram showing a drawing area according to the method of FIG.

【図3】図1の方式による作図の一般形を示す図であ
る。
FIG. 3 is a diagram showing a general form of drawing by the method of FIG.

【図4】図1の方式による作図例を示す図である。FIG. 4 is a diagram showing an example of drawing by the method of FIG.

【図5】従来例のグラフの文字列・引出し線作図方式に
よる作図例を示す図である。
FIG. 5 is a diagram showing a drawing example of a character string / leader line drawing method of a graph of a conventional example.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 グラフの各項目の近傍に各項目に対応す
る項目名、数値及び記号等からなる文字列を記入し、グ
ラフの各項目と各文字列との間を引出し線で結ぶグラフ
文字列記入方式において、前記各文字列の書き込み位置
を計算し、二つの文字列が重なると判断した場合には一
方の書き込み位置をずらすことを特徴とするグラフの文
字列・引出し線作図方式。
1. A graph character in which a character string consisting of an item name, a numerical value, a symbol, etc. corresponding to each item is entered near each item of the graph, and each item of the graph and each character string are connected by a leader line. In the column writing method, a writing position of each character string is calculated, and when it is determined that two character strings overlap, one writing position is shifted, and a character string / leader line drawing method of a graph.
【請求項2】 請求項1記載のグラフの文字列・引出し
線作図方式において、円グラフの場合においては円グラ
フの各項目の占める角の二等分線上の一点を引出し線始
点、前記引出し線始点から半径方向円の外側に一定距離
にある点を引出し線仮終点、前記引出し線始点と前記引
出し線仮終点を結ぶ直線を仮引出し線とそれぞれ定義
し、円グラフの各項目の仮引出し線の円グラフ基線から
の角度を算出して引出し線仮終点の座標位置を計算し、
これを起点とする二つの相隣合う文字列が互いに重なら
なければ前記座標位置を引出し線終点とし、互いに重な
ると判断した時には二つの文字列の配置される象限によ
って決められるいずれか一方の文字列の起点の座標位置
の修正をおこない、この修正された座標位置を引出し線
終点として引出し線及び文字列を作図することを特徴と
するグラフの文字列・引出し線作図方式。
2. The character string / leader line drawing method for a graph according to claim 1, wherein in the case of a pie chart, a point on the bisector of the angle occupied by each item of the pie chart is a leader line start point and the leader line. A point that is a certain distance from the start point to the outside of the radial circle is defined as a temporary leader line, and a straight line that connects the leader line start point and the temporary leader line end point is defined as a temporary leader line. Calculating the angle from the pie chart base line to calculate the coordinate position of the temporary end point of the leader line,
If two adjacent character strings starting from this point do not overlap with each other, the coordinate position is used as the leader line end point, and when it is determined that they overlap with each other, one of the characters determined by the quadrant in which the two character strings are placed A character string / leader line drawing method for a graph, characterized in that a coordinate position of a starting point of a column is corrected and a line and a character line are drawn by using the corrected coordinate position as a leader line end point.
【請求項3】 請求項2記載のグラフの文字列・引出し
線作図方式において、二つの文字列のいずれかの文字列
の配置する位置の修正をおこなうことによって、その修
正された文字列がさらに別の文字列に重なると判断され
たときには、重ねられた文字列に対してさらにその表示
位置の修正を加えていくというように文字列表示位置の
修正作業をおこなうことを特徴とするグラフの文字列・
引出し線作図方式。
3. The character string / leader line drawing method for a graph according to claim 2, wherein the position where one of the two character strings is arranged is corrected so that the corrected character string is further improved. When it is determined that the character string is overlapped with another character string, the character string display position is corrected by further correcting the display position of the overlapped character string. Row
Drawing line drawing method.
【請求項4】 文字列を含むグラフが表示可能な画面作
図領域を越えるか否かを判断し、文字列を含むグラフ全
体が表示装置画面作図領域を越えると判断した場合に
は、文字列を含むグラフ全体を表示装置画面作図領域内
に表示することが可能な大きさに縮小するための縮小率
を計算し、その縮小率を、縮小するグラフの全ての表示
位置座標に掛けて新たな表示位置を求めたのち、引き出
線及び文字列を作図することを特徴とするグラフの文字
列・引出し線作図方式。
4. It is determined whether or not a graph including a character string exceeds a displayable screen drawing area, and if it is determined that the entire graph including the character string exceeds the display device screen drawing area, the character string is Calculates the reduction ratio for reducing the entire graph including the size to a size that can be displayed in the drawing area of the display device screen, and multiplies the reduction ratio to all the display position coordinates of the graph to be reduced and displays a new display. A character string / leader line drawing method for a graph, which is characterized by drawing a leader line and a character string after obtaining the position.
JP3265789A 1991-10-15 1991-10-15 Graph character string and leader line plotting system Pending JPH05108834A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3265789A JPH05108834A (en) 1991-10-15 1991-10-15 Graph character string and leader line plotting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3265789A JPH05108834A (en) 1991-10-15 1991-10-15 Graph character string and leader line plotting system

Publications (1)

Publication Number Publication Date
JPH05108834A true JPH05108834A (en) 1993-04-30

Family

ID=17422068

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3265789A Pending JPH05108834A (en) 1991-10-15 1991-10-15 Graph character string and leader line plotting system

Country Status (1)

Country Link
JP (1) JPH05108834A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5091565A (en) * 1985-10-02 1992-02-25 Sandoz Ltd. Poly-dicaboxylic acid anhydrides, their production and use
JP2006114013A (en) * 2004-10-18 2006-04-27 Microsoft Corp System and method for automatic label placement on chart

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5091565A (en) * 1985-10-02 1992-02-25 Sandoz Ltd. Poly-dicaboxylic acid anhydrides, their production and use
JP2006114013A (en) * 2004-10-18 2006-04-27 Microsoft Corp System and method for automatic label placement on chart

Similar Documents

Publication Publication Date Title
JPH0727349B2 (en) Multi-window display control method
JPH06274586A (en) Displaying system
JP3123887B2 (en) Coordinate detection / display device
JPH05108834A (en) Graph character string and leader line plotting system
WO2005004105A1 (en) Character display apparatus, character display method, character display program, and recording medium
US6836566B1 (en) System for pointing
JP2001154779A (en) Mouse cursor control method
JP2849308B2 (en) Drawing input management method
JPH05242262A (en) Graph display system
JP2751114B2 (en) Character processing method
JP2014157399A (en) Information processing device, information processing method, and program
JP3038840B2 (en) Data converter
JP2984272B2 (en) Character processing method and apparatus
JPS61138375A (en) Pattern information processing device
JP3154844B2 (en) Graphic input method and graphic input device
JPH0428153Y2 (en)
JPH07234868A (en) Document preparing device
JP3443840B2 (en) Ruled line output method and ruled line output device
JPH10188005A (en) Plotting method for broken line circle
JPH10116347A (en) Circular arc plotting method
JP2770331B2 (en) Data converter
JPH0916787A (en) Start point/end point plotting method for frame line for graphic painting-out
JP3154343B2 (en) How to fill in polygonal shapes
JPS59193491A (en) Character pattern expansion system
JPS6265080A (en) Graph display system