Вопросов несколько:
1)Как сделать растягивание графика по оси X колесиком мышки, не изменяя величину деления в оси Y.
2)Как сделать так, что-бы при пересечение двух графиков, последний график накладывался на предыдущий. ( в примере видно что зеленые точки всегда рисуются поверх красных независимо от времени построения этого графика. )
Add(MainForm,16184661,497,49)
{
Left=20
Top=105
Width=1260
Height=722
Caption="Mouse plotter"
}
Add(Plotter,3809982,1211,210)
{
Top=168
Width=1244
Height=515
Align=4
Cursor=7
Name="g1"
ModeSp=2
MinOwn=1
MinRest=10
GridX=60
LeftMargin=100
RightMargin=40
TopMargin=0
BottomMargin=20
Point(doMinH)
Point(doMaxH)
Point(doMinW)
Point(doMaxW)
Point(MouseX)
Point(MouseY)
Point(onMouseMove)
Point(onMouseEnter)
Point(onMouseDown)
Point(onSplitUp)
Point(onMouseUp)
Point(onMouseWheel)
link(onMouseWheel,3015880:doEvent1,[])
}
Add(PlotPoints,13221991,434,511)
{
Grapher="g1"
Size=4
MaxValues=200000
Name="test"
Shape=1
Point(doColor)
link(ValueY,5366700:Var3,[(440,453)(384,453)(384,464)])
link(ValueX,9979559:Var1,[(447,485)])
}
Add(PlotLines,5768736,364,315)
{
Grapher="g1"
Color=-16777198
link(ValueY,5366700:Var1,[(370,303)(356,303)])
link(ValueX,7210831:Result,[(377,289)(391,289)])
}
Add(MathParse,7210831,385,231)
{
MathStr="100 + %2"
link(onResult,13994250:doEvent1,[])
link(X2,13057663:GetData,[])
}
Add(EventFromData,13057663,392,161)
{
}
Add(Hub,13994250,434,231)
{
OutCount=4
link(onEvent1,13057663:doData,[(472,237)(472,147)(369,147)(369,167)])
link(onEvent2,7484754:doEvent1,[])
}
Add(DoData,16400222,280,231)
{
Data=Integer(100)
link(onEventData,12771386:doEvent1,[])
}
Add(Hub,12771386,322,231)
{
link(onEvent1,7210831:doCalc,[])
link(onEvent2,5768736:doAdd,[(343,244)(343,321)])
}
Add(Timer,13280309,203,231)
{
link(onTimer,16400222:doData,[])
}
Add(Random,13405581,280,399)
{
Min=2900
Max=3200
link(onRandom,15563774:doEvent1,[])
}
Add(PlotPoints,16683084,462,672)
{
Grapher="g1"
Color=32768
Size=4
MaxValues=200000
Name="test"
Shape=1
Point(doColor)
link(ValueY,5832022:Random,[(468,628)(426,628)])
link(ValueX,9979559:Var2,[(475,580)(503,580)])
}
Add(Timer,1587097,168,490)
{
Interval=100
link(onTimer,9933845:doEvent1,[])
}
Add(Hub,9933845,238,490)
{
OutCount=6
link(onEvent1,14137486:doData,[])
link(onEvent2,13405581:doRandom,[(266,503)(266,405)])
link(onEvent3,5832022:doRandom,[(280,510)(280,587)])
link(onEvent4,13221991:doAdd,[])
link(onEvent5,16683084:doAdd,[(357,524)(357,678)])
}
Add(GetDataEx,5366700,350,459)
{
Angle=3
link(Data,13405581:Random,[(286,464)])
}
Add(MathParse,6429216,679,490)
{
MathStr="10 + %2"
link(onResult,224861:doEvent1,[])
link(X2,7135719:GetData,[])
}
Add(EventFromData,7135719,686,427)
{
}
Add(Hub,224861,728,490)
{
OutCount=4
link(onEvent1,7135719:doData,[(754,496)(754,472)(673,472)(673,433)])
}
Add(DoData,14137486,574,490)
{
Data=Integer(100)
link(onEventData,11564792:doEvent1,[])
}
Add(Hub,11564792,616,490)
{
link(onEvent1,6429216:doCalc,[])
}
Add(Random,5832022,420,581)
{
Min=2900
Max=3200
}
Add(MathParse,16300842,1078,651)
{
MathStr=" %1 + (%1 * %2)"
link(onResult,3809982:doMaxH,[(1195,657)(1195,230)])
link(X1,13117179:Value,[])
link(X2,8045542:Var2,[(1091,567)(1112,567)])
}
Add(MathParse,4578141,1134,532)
{
MathStr="%1 - (%1 * %2)"
link(onResult,3809982:doMinH,[(1188,538)(1188,223)])
link(X1,4914341:Value,[])
link(X2,8045542:Var3,[(1147,460)])
}
Add(LineBreak,6643228,714,665)
{
Type=1
link(Data,4438146:Item,[])
Primary=[13269833,392,-294]
}
Add(GetDataEx,8045542,1106,455)
{
link(Data,13269833:Var,[])
}
Add(DoData,7641006,1029,532)
{
link(onEventData,4578141:doCalc,[])
}
Add(DoData,2948628,1015,651)
{
link(onEventData,16300842:doCalc,[])
}
Add(Hub,1544216,945,609)
{
InCount=3
link(onEvent1,7641006:doData,[(977,615)(977,538)])
link(onEvent2,2948628:doData,[(973,622)(973,657)])
}
Add(Memory,13117179,1078,574)
{
}
Add(StrList,2144302,700,525)
{
Strings=#4:0.05|4:0.06|5:0.065|4:0.07|5:0.075|4:0.08|5:0.085|4:0.09|5:0.095|3:0.1|3:1.1|3:1.1|3:1.2|3:1.3|3:1.4|3:1.5|3:1.6|3:1.7|3:1.8|3:1.9|1:2|3:2.1|3:2.2|3:2.3|0:|
}
Add(ArrayRW,4438146,714,609)
{
link(onRead,12561458:doEvent1,[])
link(Array,2144302:Array,[])
}
Add(ScrollBar,13605258,637,609)
{
Left=1215
Top=165
Width=15
Height=510
Max=28
Kind=1
link(onPosition,4438146:doRead,[])
}
Add(Label,7777130,833,623)
{
Left=1205
Top=145
Width=30
Caption="Скрол"
}
Add(Hub,12561458,763,609)
{
link(onEvent1,1544216:doEvent1,[])
link(onEvent2,7777130:doText,[(812,622)(812,629)])
}
Add(Hub,12092684,987,406)
{
OutCount=3
link(onEvent1,4914341:doValue,[])
link(onEvent2,13117179:doValue,[(1067,419)(1067,580)])
}
Add(Memory,4914341,1134,406)
{
}
Add(GetDataEx,9979559,497,480)
{
Angle=1
link(Data,6429216:Result,[(566,485)(566,534)(685,534)])
}
Add(IndexToChanel,9236031,805,357)
{
Count=4
Point(Index)
link(onEvent2,12668247:doData,[(845,370)(845,363)])
link(Index,1982659:Count,[(811,345)(629,345)])
link(onEvent3,11108890:doData,[(845,377)(845,412)])
}
Add(CounterEx,1982659,623,301)
{
Max=10
Point(onThroughMax)
Point(Max)
Point(doValue)
link(onThroughMax,1713101:doData,[(678,314)(678,367)(541,367)(541,314)])
}
Add(Hub,15563774,322,399)
{
OutCount=3
link(onEvent1,1982659:doNext,[(375,405)(375,307)])
link(onEvent2,9236031:doEvent,[(726,412)(726,363)])
}
Add(EventFromData,12668247,854,357)
{
}
Add(DoData,11108890,854,406)
{
link(onEventData,12092684:doEvent1,[])
link(Data,12668247:GetData,[])
}
Add(DoData,1713101,553,308)
{
Data=Integer(5)
link(onEventData,1982659:doValue,[])
}
Add(Edit,8404691,1484,441)
{
Left=115
Top=45
}
Add(LineBreak,2379188,840,679)
{
Caption="MousWhel"
link(Out,1544216:doEvent2,[(925,685)(925,622)])
Primary=[629306,532,-434]
}
Add(Hub,3015880,1253,245)
{
link(onEvent1,629306:In,[])
link(onEvent2,15095304:In,[])
}
Add(Hub,7484754,1008,238)
{
link(onEvent1,14132836:doEvent1,[])
link(onEvent2,5908964:doData,[(1032,251)(1032,258)])
}
Add(EventFromData,5908964,1043,252)
{
}
Add(Hub,14132836,1134,238)
{
InCount=2
OutCount=1
link(onEvent1,3809982:doMaxW,[])
}
Add(DoData,14692629,1043,301)
{
link(onEventData,14132836:doEvent2,[(1105,307)(1105,251)])
link(Data,5908964:GetData,[])
}
Add(Hub,8677804,994,301)
{
InCount=2
link(onEvent1,14692629:doData,[])
}
Add(LineBreak,2401785,875,301)
{
Caption="MousWhel"
link(Out,8677804:doEvent1,[])
Primary=[15095304,427,-49]
}