Re: RMChart UserLib V4.12
Posted: Sun May 29, 2011 4:17 am
Hit a limitation!
If you know the pixel pitch required for your chart grid, you can pre-size the chart accordingly. Great, but there seems to be an imposed limit to a charts width x height (or maybe a clipboard image size limit?). I'm finding that the max size chart I can define without failure is approx W6200 x H800. If the height is less, the width can be more. Is there a way around this limit?
If you know the pixel pitch required for your chart grid, you can pre-size the chart accordingly. Great, but there seems to be an imposed limit to a charts width x height (or maybe a clipboard image size limit?). I'm finding that the max size chart I can define without failure is approx W6200 x H800. If the height is less, the width can be more. Is there a way around this limit?
Code: Select all
#ID_WINDOW = 0
#ID_PANEL = 10
#ID_CHART1 = 1
#ID_REGION1 = 1
#ID_SCROLL1 = 3
#IMAGE1 = 4
#IMAGE_GDG1 = 5
Procedure PBMain()
;-----------------
iChartW.l = 6200
iChartH.l = 800
If OpenWindow(#ID_WINDOW, 0, 0, 800, 500, "Scatter Charts using RMCHART.DLL", #PB_Window_SystemMenu|#PB_Window_SizeGadget| #PB_Window_MinimizeGadget|#PB_Window_TitleBar| #PB_Window_MaximizeGadget| #PB_Window_ScreenCentered)
PanelGadget(#ID_PANEL,0,0,800,600)
AddGadgetItem (#ID_PANEL, -1, "Tab 1")
ScrollAreaGadget(#ID_SCROLL1, 8, 8, 760, 450, iChartW + 20, iChartH + 20, 10, #PB_ScrollArea_Flat)
CreateImage(#IMAGE1,4,4)
ImageGadget(#IMAGE_GDG1,10,10,10,10,ImageID(#IMAGE1))
CloseGadgetList()
CloseGadgetList()
If RMC_CreateChart(GadgetID(#ID_SCROLL1),#ID_CHART1,10,10,iChartW,iChartH,White,#RMC_CTRLSTYLEFLATSHADOW,#False,"","Tahoma") = #RMC_NO_ERROR
RMC_AddRegion(#ID_CHART1,5,5,-5,-5,"",#False)
RMC_AddGrid(#ID_CHART1,#ID_REGION1,Lavender,#False,0,0,0,0,#RMC_BICOLOR_NONE)
RMC_AddXAxis(#ID_CHART1,#ID_REGION1,#RMC_XAXISBOTTOM,1,100,100,8,0,0,#RMC_LINESTYLEDOT,0,"","Number","",#RMC_TEXTCENTER)
RMC_AddYAxis(#ID_CHART1,#ID_REGION1,#RMC_YAXISLEFT,1,15,15,8,0,0,#RMC_LINESTYLEDOT,0,"","Merits","",#RMC_TEXTCENTER)
RMC_AddXYSeries(#ID_CHART1, #ID_REGION1, ?LabX, 500, ?LabY, 500, Blue,#RMC_XY_SYMBOL,0,#RMC_SYMBOL_POINT,#RMC_XAXISBOTTOM,#RMC_YAXISLEFT,#RMC_VLABEL_NONE)
RMC_Draw2Clipboard(#ID_CHART1,#RMC_BMP)
GetClipboardImage(#IMAGE1)
SetGadgetState(#IMAGE_GDG1,ImageID(#IMAGE1))
ClearClipboard()
EndIf
EndIf
EndProcedure
PBMain()
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
FreeImage(#IMAGE1)
CloseWindow(#ID_WINDOW)
End
DataSection
LabX:
Data.d 100,100,100,100,100,99,99,99,99,99,98,98,98,98,98,97,97,97,97,97
Data.d 96,96,96,96,96,95,95,95,95,95,94,94,94,94,94,93,93,93,93,93,92,92
Data.d 92,92,92,91,91,91,91,91,90,90,90,90,90,89,89,89,89,89,88,88,88,88
Data.d 88,87,87,87,87,87,86,86,86,86,86,85,85,85,85,85,84,84,84,84,84,83,83,83
Data.d 83,83,82,82,82,82,82,81,81,81,81,81,80,80,80,80,80,79,79,79,79,79,78,78
Data.d 78,78,78,77,77,77,77,77,76,76,76,76,76,75,75,75,75,75,74,74,74,74,74,73
Data.d 73,73,73,73,72,72,72,72,72,71,71,71,71,71,70,70,70,70,70,69,69,69,69,69
Data.d 68,68,68,68,68,67,67,67,67,67,66,66,66,66,66,65,65,65,65,65,64,64,64,64
Data.d 64,63,63,63,63,63,62,62,62,62,62,61,61,61,61,61,60,60,60,60,60,59,59,59
Data.d 59,59,58,58,58,58,58,57,57,57,57,57,56,56,56,56,56,55,55,55,55,55,54,54
Data.d 54,54,54,53,53,53,53,53,52,52,52,52,52,51,51,51,51,51,50,50,50,50,50,49
Data.d 49,49,49,49,48,48,48,48,48,47,47,47,47,47,46,46,46,46,46,45,45,45,45,45
Data.d 44,44,44,44,44,43,43,43,43,43,42,42,42,42,42,41,41,41,41,41,40,40,40,40
Data.d 40,39,39,39,39,39,38,38,38,38,38,37,37,37,37,37,36,36,36,36,36,35,35,35
Data.d 35,35,34,34,34,34,34,33,33,33,33,33,32,32,32,32,32,31,31,31,31,31,30,30
Data.d 30,30,30,29,29,29,29,29,28,28,28,28,28,27,27,27,27,27,26,26,26,26,26,25
Data.d 25,25,25,25,24,24,24,24,24,23,23,23,23,23,22,22,22,22,22,21,21,21,21,21
Data.d 20,20,20,20,20,19,19,19,19,19,18,18,18,18,18,17,17,17,17,17,16,16,16,16
Data.d 16,15,15,15,15,15,14,14,14,14,14,13,13,13,13,13,12,12,12,12,12,11,11,11
Data.d 11,11,10,10,10,10,10,9,9,9,9,9,8,8,8,8,8,7,7,7,7,7,6,6,6,6,6,5,5,5,5,5
Data.d 4,4,4,4,4,3,3,3,3,3,2,2,2,2,2,1,1,1,1,1
LabY:
Data.d 1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1
Data.d 2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5
Data.d 10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7
Data.d 6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3
Data.d 4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9
Data.d 8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1,2
Data.d 3,4,5,10,9,8,7,6,1,2,3,4,5,10,9,8,7,6,1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