//@Name:Fill Below Close //@Description: Fills the area below the close line // Care has been taken in preparing this code but it is provided without guarantee. // You are welcome to modify and extend it. Please add your name as a modifier if you distribute it. // Coded by: Philip Tolhurst var colour1 = 11316479; function init(status) { if (status == Loading || status == Editing) { if(storage.getAt(0)==undefined) colour1 = Colour.Red; else colour1 = storage.getAt(0); } if(status == Adding|| status == Editing) { drawDialogBox(); } buttonHandle = createButton("Settings", onButton0); } function onButton0() { colour1 = storage.getAt(0); drawDialogBox(); } function drawDialogBox() { var dlg = new Dialog("Settings...", 150, 55); dlg.addOkButton(); dlg.addCancelButton(); dlg.addColPicker("VAL1",5,15,-1,-1,"","Fill Colour",colour1); if (dlg.show() == Dialog.Cancel) return false; colour1 = dlg.getValue("VAL1"); storage.setAt(0,colour1); onNewChart(); } function onNewChart() { clearDisplay(); draw(); } function onNewBar() { clearDisplay(); draw(); } function draw() { setBrushColour(colour1); setLayer(Layer.Bottom); beginPath(); moveTo(0,0); for(i=0;i