Вверх ↑
Ответов: 494
Рейтинг: 163
#1: 2022-10-22 22:46:53 ЛС | профиль | цитата
andrewproffi, тоже в одном проекте округление нужно было оси Y, а ещё вторая Y ось и по оси Х временная шкала.
Другого способа не придумал , как отрисовать шкалы самому.
Пример скриншота отрисованных осей из ... проекта
И часть вырезанный схемы из проекта как пример

Add(MainForm,662542,350,280)
{
Width=829
Height=668
}
Add(ChildPanel,6202571,476,266)
{
link(Data1,1061595:Value,[])
}
BEGIN_SDK
Add(EditMulti,8452163,21,21)
{
WorkCount=1
DataCount=1
Width=412
Height=284
VOffset=70
HOffset=140
link(doWork1,15846404:doEvent1,[])
}
Add(Panel,7655291,42,231)
{
Left=7
Top=32
Width=800
Height=590
Color=16777215
Point(Handle)
}
Add(Plotter,8230296,364,49)
{
Width=800
Height=590
Color=16777215
Name="plot"
MinH=-1
MaxH=70
LeftMargin=50
RightMargin=50
BottomMargin=30
MouseControl=1
Point(doMinH)
Point(doMaxH)
Point(MinX)
Point(MaxX)
Point(onMouseDown)
Point(onMouseUp)
Point(doMinW)
Point(doMaxW)
}
Add(ChildPanel,8334680,154,91)
{
@Hint=#13:Шкала время X|
link(Data1,3417767:Text,[])
link(Data2,4750631:Count,[(167,83)(209,83)])
AddHint(-30,50,93,13,@Hint)
}
BEGIN_SDK
Add(EditMulti,4291821,21,21)
{
WorkCount=1
DataCount=2
Width=762
Height=501
VOffset=70
HOffset=70
link(doWork1,7199587:doEvent1,[(56,97)(56,181)])
}
Add(Panel,2118246,42,385)
{
Top=560
Width=860
Height=30
BorderWidth=0
BevelInner=0
BevelWidth=0
}
Add(PaintBox,10039800,399,182)
{
Width=800
Height=30
Align=5
Color=16777215
Point(onMouseDown)
link(onBeforeDraw,9715670:doWork2,[])
link(onMouseDown,9715670:doWork3,[(438,195)])
}
Add(Img_Line,11688626,399,385)
{
Size=2
Point(Point1)
Point(Point2)
link(onDraw,101909:doOperation,[])
link(Bitmap,9296726:Var2,[])
link(Point1,11662347:Point,[])
link(Point2,13447052:Point,[])
}
Add(For,8914712,189,210)
{
Start=500
End=7500
Step=700
link(onEvent,13701620:doEvent1,[])
link(onStop,10019326:doDraw,[(243,223)(243,391)])
}
Add(PointXY,11662347,406,266)
{
Y=3
link(X,16433030:Var3,[(412,251)])
}
Add(PointXY,13447052,413,336)
{
Y=6
link(X,557971:Var2,[])
}
Add(LineBreak,1892439,28,203)
{
Caption="1"
link(Out,1308356:doCalc,[])
Primary=[3429213,427,-21]
}
Add(Math,9815017,322,210)
{
OpType=3
Op2=10.01
link(onResult,11688626:doDraw,[(376,216)(376,391)])
}
Add(Hub,7199587,350,175)
{
link(onEvent1,10039800:doClear,[(382,181)(382,195)])
link(onEvent2,10039800:doRefresh,[])
}
Add(Img_Text,3152125,553,385)
{
Y=7
Font=[Arial,9,0,0,204]
Text="00:00"
Point(X)
link(Bitmap,5597568:Var3,[(559,229)])
link(Text,5402292:Value,[])
link(X,101909:Result,[(573,373)(599,373)(599,433)(468,433)])
}
Add(GetDataEx,5597568,399,224)
{
link(Data,10039800:Bitmap,[])
}
Add(MathParse,1308356,91,203)
{
MathStr="( %2 - %1 ) / 10"
link(onResult,15685406:doEvent1,[])
link(X1,3849649:Var2,[])
link(X2,4291821:Data2,[])
}
Add(HubEx,9715670,434,182)
{
link(onEvent,3429213:In,[])
}
Add(Math,14977570,399,98)
{
Point(doDefault)
link(onResult,8971610:doEvent1,[(446,104)(446,139)])
link(Op1,14977570:Result,[(405,86)(388,86)(388,139)(405,139)])
link(Op2,1308356:Result,[(412,79)(73,79)(73,253)(97,253)])
}
Add(Hub,13701620,266,210)
{
link(onEvent1,9815017:doOperation,[])
link(onEvent2,14977570:doOperation,[(303,223)(303,104)])
}
Add(Memory,5402292,560,133)
{
Default=String( )
}
Add(DoData,11006955,189,133)
{
link(onEventData,15037146:doEvent1,[])
link(Data,3849649:Var3,[(195,117)])
}
Add(Hub,15685406,140,203)
{
link(onEvent1,11006955:doData,[(163,209)(163,139)])
link(onEvent2,8914712:doFor,[])
}
Add(GetDataEx,3849649,91,112)
{
link(Data,4291821:Data1,[])
}
Add(Hub,8971610,462,133)
{
InCount=2
OutCount=1
link(onEvent1,9595966:doConvert,[])
}
Add(Hub,15037146,350,133)
{
link(onEvent1,14977570:doDefault,[(378,139)(378,111)])
link(onEvent2,8971610:doEvent2,[])
}
Add(GetDataEx,16433030,322,246)
{
link(Data,9815017:Result,[])
}
Add(DateConvertor,9595966,497,133)
{
Mode=16
Format="HH:mm:ss"
link(onResult,5402292:doValue,[])
}
Add(Math,101909,462,385)
{
OpType=1
Op2=25
link(onResult,9710622:doData,[])
link(Op1,557971:Var3,[(468,314)])
}
Add(Img_Line,10019326,266,385)
{
Point(Point1)
Point(Point2)
link(Bitmap,9296726:Var1,[(272,362)])
link(Point1,12737631:Point,[])
link(Point2,16728682:Point,[])
}
Add(PointXY,12737631,273,259)
{
X=50
Y=3
}
Add(PointXY,16728682,280,315)
{
X=750
Y=3
}
Add(GetDataEx,9296726,399,357)
{
link(Data,5597568:Var2,[])
}
Add(GetDataEx,557971,413,309)
{
Angle=3
link(Data,16433030:Var2,[(328,314)])
}
Add(DoData,9710622,504,385)
{
link(onEventData,3152125:doDraw,[])
}
END_SDK
Add(Hub,15846404,56,91)
{
OutCount=4
link(onEvent1,8334680:doWork1,[])
link(onEvent2,7794351:doWork1,[(119,104)(119,181)])
link(onEvent3,8492962:doWork1,[(104,111)(104,244)])
link(onEvent4,4750631:doNext,[(85,118)(85,48)])
}
Add(ChildPanel,7794351,245,175)
{
@Hint=#8:Шкала RY|
link(Data1,7909334:Text,[])
link(Data2,4501370:Text,[(258,167)(293,167)])
link(Data3,8452163:Data1,[(265,36)(167,36)])
AddHint(53,11,66,13,@Hint)
}
BEGIN_SDK
Add(EditMulti,8322098,21,21)
{
EventCount=1
WorkCount=1
DataCount=3
Width=846
Height=494
VOffset=70
HOffset=70
link(doWork1,16216591:doEvent1,[(65,97)(65,167)])
}
Add(Panel,9901053,49,385)
{
Left=750
Width=50
Height=565
Color=15780518
BorderWidth=0
BevelInner=0
BevelWidth=0
}
Add(PaintBox,11812728,420,168)
{
Width=50
Height=565
Align=5
Color=16777215
Point(onMouseDown)
link(onBeforeDraw,10021834:doWork2,[])
link(onMouseDown,10021834:doWork3,[(459,181)])
}
Add(Img_Line,11644787,420,392)
{
Size=2
Point(Point1)
Point(Point2)
link(onDraw,793777:doOperation,[])
link(Bitmap,10581742:Var2,[])
link(Point1,469164:Point,[])
link(Point2,6768916:Point,[])
}
Add(For,204863,210,210)
{
Start=5600
End=90
Step=-545
link(onEvent,6446009:doEvent1,[])
link(onStop,4281616:doDraw,[(264,223)(264,398)])
}
Add(PointXY,469164,427,273)
{
X=3
link(Y,1892278:Var3,[(440,258)])
}
Add(PointXY,6768916,434,343)
{
X=6
link(Y,8227634:Var2,[])
}
Add(LineBreak,5680182,42,203)
{
Caption="1"
link(Out,12265773:doCalc,[])
Primary=[16707017,434,-35]
}
Add(Math,2300369,343,210)
{
OpType=3
Op2=10
link(onResult,11644787:doDraw,[(397,216)(397,398)])
}
Add(Hub,16216591,371,161)
{
link(onEvent1,11812728:doClear,[(403,167)(403,181)])
link(onEvent2,11812728:doRefresh,[])
}
Add(Img_Text,5564329,630,392)
{
X=12
Font=[Arial,9,0,255,204]
Text="00"
Point(Y)
link(Bitmap,8548766:Var3,[(636,236)])
link(Text,753780:Value,[])
link(Y,793777:Result,[(650,380)(679,380)(679,448)(489,448)])
}
Add(GetDataEx,8548766,420,231)
{
link(Data,11812728:Bitmap,[])
}
Add(MathParse,12265773,91,203)
{
MathStr="( %2 - %1 ) / 10"
link(onResult,15524132:doEvent1,[])
link(X1,15875221:Var2,[])
link(X2,8322098:Data2,[])
}
Add(HubEx,10021834,455,168)
{
link(onEvent,16707017:In,[])
}
Add(Hub,6446009,287,210)
{
link(onEvent1,2300369:doOperation,[])
link(onEvent2,11931450:doOperation,[(314,223)(314,76)])
}
Add(Hub,15524132,161,203)
{
link(onEvent1,2449569:doData,[(193,209)(193,111)])
link(onEvent2,204863:doFor,[])
}
Add(GetDataEx,1892278,343,253)
{
link(Data,2300369:Result,[])
}
Add(Math,793777,483,392)
{
OpType=1
Op2=8
link(onResult,10554152:doData,[])
}
Add(Img_Line,4281616,287,392)
{
Point(Point1)
Point(Point2)
link(Bitmap,10581742:Var1,[(293,369)])
link(Point1,1637837:Point,[])
link(Point2,2139122:Point,[])
}
Add(PointXY,1637837,294,266)
{
X=3
Y=14
}
Add(PointXY,2139122,301,322)
{
X=3
Y=560
}
Add(GetDataEx,10581742,420,364)
{
link(Data,8548766:Var2,[])
}
Add(GetDataEx,8227634,441,316)
{
Angle=3
link(Data,1892278:Var2,[(349,321)])
}
Add(DoData,10554152,525,392)
{
link(onEventData,5564329:doDraw,[])
}
Add(Math,11931450,476,70)
{
Point(doDefault)
link(onResult,5588566:doEvent1,[(523,76)(523,111)])
link(Op1,11931450:Result,[(482,58)(465,58)(465,111)(482,111)])
link(Op2,12265773:Result,[(489,44)(140,44)(140,255)(97,255)])
}
Add(Hub,5588566,539,105)
{
InCount=2
OutCount=1
link(onEvent1,5264981:doOperation,[])
}
Add(Hub,10382704,427,105)
{
link(onEvent1,11931450:doDefault,[(455,111)(455,83)])
link(onEvent2,5588566:doEvent2,[])
}
Add(Memory,753780,637,105)
{
}
Add(DoData,2449569,217,105)
{
link(onEventData,10382704:doEvent1,[])
link(Data,15875221:Var3,[(223,75)])
}
Add(GetDataEx,15875221,91,70)
{
link(Data,8322098:Data1,[])
}
Add(Math,5264981,581,105)
{
OpType=35
Op2=0.01
link(onResult,753780:doValue,[])
link(Op2,8322098:Data3,[(594,32)(111,32)])
}
END_SDK
Add(ChildPanel,8492962,140,238)
{
@Hint=#8:Шкала LY|
link(Data1,1538783:Text,[])
link(Data2,5812581:Text,[(153,222)(181,222)])
AddHint(57,10,64,13,@Hint)
}
BEGIN_SDK
Add(EditMulti,2233548,21,21)
{
WorkCount=1
DataCount=2
Width=713
Height=480
VOffset=70
HOffset=70
link(doWork1,7018817:doEvent1,[(265,97)(265,167)])
}
Add(Panel,12272954,49,378)
{
Width=50
Height=565
Color=15780518
BorderWidth=0
BevelInner=0
BevelWidth=0
}
Add(PaintBox,505042,420,168)
{
Width=50
Height=565
Align=5
Color=16777215
Point(onMouseDown)
link(onBeforeDraw,5562234:doWork2,[])
link(onMouseDown,5562234:doWork3,[(466,181)])
}
Add(Img_Line,6170130,420,385)
{
Size=2
Point(Point1)
Point(Point2)
link(onDraw,1120601:doOperation,[])
link(Bitmap,11993115:Var2,[])
link(Point1,2547486:Point,[])
link(Point2,8000438:Point,[])
}
Add(For,1490083,210,203)
{
Start=5600
End=90
Step=-545
link(onEvent,6534780:doEvent1,[])
link(onStop,12702408:doDraw,[(264,216)(264,391)])
}
Add(PointXY,2547486,427,266)
{
X=46
link(Y,16184967:Var3,[(440,251)])
}
Add(PointXY,8000438,434,336)
{
X=43
link(Y,16184967:Var2,[(447,314)(349,314)])
}
Add(LineBreak,8030261,49,196)
{
Caption="1"
link(Out,8559460:doCalc,[])
Primary=[4100906,434,-28]
}
Add(Math,505442,343,203)
{
OpType=3
Op2=10
link(onResult,6170130:doDraw,[(397,209)(397,391)])
}
Add(Hub,7018817,371,161)
{
link(onEvent1,505042:doClear,[(403,167)(403,181)])
link(onEvent2,505042:doRefresh,[])
}
Add(Img_Text,16094575,574,385)
{
X=15
Font=[Arial,9,0,16711680,204]
Text="00"
Point(Y)
link(Bitmap,7018362:Var3,[(580,215)])
link(Text,15141588:Value,[])
link(Y,1120601:Result,[(594,373)(634,373)(634,438)(489,438)])
}
Add(GetDataEx,7018362,420,210)
{
link(Data,505042:Bitmap,[])
}
Add(MathParse,8559460,91,196)
{
MathStr="( %2 - %1 ) / 10"
link(onResult,6538859:doEvent1,[])
link(X1,1487832:Var2,[])
link(X2,2233548:Data2,[])
}
Add(HubEx,5562234,462,168)
{
link(onEvent,4100906:In,[])
}
Add(Hub,6534780,287,203)
{
link(onEvent1,505442:doOperation,[])
link(onEvent2,6534797:doOperation,[(326,216)(326,97)])
}
Add(Hub,6538859,161,196)
{
link(onEvent1,5547060:doData,[(196,202)(196,132)])
link(onEvent2,1490083:doFor,[])
}
Add(GetDataEx,16184967,343,246)
{
link(Data,505442:Result,[])
}
Add(Math,1120601,483,385)
{
OpType=1
Op2=8
link(onResult,14330589:doData,[])
}
Add(Img_Line,12702408,287,385)
{
Point(Point1)
Point(Point2)
link(Bitmap,11993115:Var1,[(293,362)])
link(Point1,9632407:Point,[])
link(Point2,1113303:Point,[])
}
Add(PointXY,9632407,294,259)
{
X=46
Y=15
}
Add(PointXY,1113303,301,315)
{
X=46
Y=560
}
Add(GetDataEx,11993115,420,357)
{
link(Data,7018362:Var2,[])
}
Add(DoData,14330589,525,385)
{
link(onEventData,16094575:doDraw,[])
}
Add(Math,6534797,399,91)
{
Point(doDefault)
link(onResult,4444007:doEvent1,[(446,97)(446,132)])
link(Op1,6534797:Result,[(405,79)(388,79)(388,132)(405,132)])
link(Op2,8559460:Result,[(412,54)(142,54)(142,251)(97,251)])
}
Add(Hub,4444007,462,126)
{
InCount=2
OutCount=1
link(onEvent1,8154361:doOperation,[])
}
Add(Hub,7204542,350,126)
{
link(onEvent1,6534797:doDefault,[(378,132)(378,104)])
link(onEvent2,4444007:doEvent2,[])
}
Add(Memory,15141588,581,126)
{
}
Add(DoData,5547060,210,126)
{
link(onEventData,7204542:doEvent1,[])
link(Data,1487832:Var3,[(216,75)])
}
Add(GetDataEx,1487832,91,70)
{
link(Data,2233548:Data1,[])
}
Add(Math,8154361,518,126)
{
OpType=35
Op2=0.01
link(onResult,15141588:doValue,[])
AddHint(-10,-39,36,13,Op2)
}
END_SDK
Add(VisualStrings,7909334,245,126)
{
Lines=#1:1|
}
Add(VisualStrings,1538783,140,196)
{
Lines=#1:0|
}
Add(VisualStrings,5812581,175,196)
{
Lines=#1:9|
}
Add(VisualStrings,3417767,154,56)
{
Lines=#1:0|
}
Add(VisualStrings,4501370,287,126)
{
Lines=#6:33.333|
Width=67
}
Add(CounterEx,4750631,203,42)
{
Max=10000000
}
END_SDK
Add(ScrollBar,173203,357,203)
{
Left=705
Top=10
Hint="Кол. знаков после запятой"
Max=3
Page=1
link(onPosition,14846278:doGetString,[])
}
Add(StrList,14846278,420,175)
{
Strings=#1:1|3:0.1|4:0.01|5:0.001|
Point(doGetString)
Point(onGetString)
link(onGetString,1061595:doValue,[])
}
Add(Memory,1061595,476,182)
{
Default=Real(1)
}
Add(Timer,16071841,420,266)
{
Interval=100
link(onTimer,6202571:doWork1,[])
}


Gunta писал(а):
Вот сделал пример на dll-ке ScottPlot

Gunta, а как используя Ваш пример передать БОЛЬШОЙ(1000000) массив с данными для построения графика,?
карма: 4

0
Редактировалось 4 раз(а), последний 2022-10-23 13:14:26