THistPainter

THistPainter

(private) new THistPainter(dom, histo)

Basic painter for histogram classes

Source:
Parameters:
Name Type Description
dom object | string

DOM element for drawing or element id

histo object

TH1 derived histogram object

Methods

addFunction()

Add function to histogram list of functions

Source:

(async) addInteractivity() → {Promise}

Add different interactive handlers

Description:
  • only first (main) painter in list allowed to add interactive functionality Most of interactivity now handled by frame

Source:
Returns:

for ready

Type
Promise

(abstract) autoZoom()

Auto zoom into histogram non-empty range

Source:

changeUserRange()

Invoke dialog to enter and modify user range

Source:

changeValuesRange()

Start dialog to modify range of axis where histogram values are displayed

Source:

checkPadRange()

Check pad ranges when drawing of frame axes will be performed

Description:
  • Only if histogram is main painter and drawn with SAME option, pad range can be used In all other cases configured range must be derived from histogram itself

Source:

cleanup()

Cleanup histogram painter

Source:

clear3DScene()

Clear 3d drawings - if any

Source:

clickButton()

Process click on histogram-defined buttons

Source:

copyOptionsFrom()

Copy draw options from other painter

Source:

copyOptionsToOthers()

copy draw options to all other histograms in the pad

Source:

createContour()

Create contour object for histogram

Source:

createHistDrawAttributes()

Create necessary histogram draw attributes

Source:

createStat()

Create stat box for histogram if required

Source:

decodeOptions()

Decode options string opt and fill the option structure

Source:

(async) drawAxes()

Draw axes for histogram

Description:
  • axes can be drawn only for main histogram

Source:

(async) drawColorPalette() → {Promise}

draw color palette

Source:
Returns:

when done

Type
Promise

(async) drawFunctions() → {Promise}

Method draws functions from the histogram list of functions

Source:
Returns:

fulfilled when drawing is ready

Type
Promise

(async) drawHistTitle() → {Promise}

Draw histogram title

Source:
Returns:

with painter

Type
Promise

executeMenuCommand()

Execute histogram menu command

Description:
  • Used to catch standard menu items and provide local implementation

Source:

extractAxesProperties()

Extract axes bins and ranges

Description:
  • here functions are defined to convert index to axis value and back was introduced to support non-equidistant bins

Source:

fillContextMenuItems()

Fill histogram context menu

Source:

fillPaletteMenu()

Fill menu entries for palette

Source:

fillToolbar()

Fill pad toolbar with histogram-related functions

Source:

fillWebObjectOptions()

Fill option object used in TWebCanvas

Source:

findFunction()

Find function in histogram list of functions

Source:

findStat()

Find stats box in list of functions

Source:

get3DToolTip()

Returns tooltip information for 3D drawings

Source:

getAxis()

Returns histogram axis

Source:

getAxisBinTip()

Get tip text for axis bin

Source:

getContour()

Return contour object

Source:

getContourLevels()

Return levels from contour object

Source:

getDimension()

Returns number of histogram dimensions

Source:

getHistPalette()

Returns color palette associated with histogram

Description:
  • Create if required, checks pad and canvas for custom palette

Source:

getHisto()

Returns histogram object

Source:

getSelectIndex()

Returns selected index for specified axis

Description:
  • be aware - here indexes starts from 0

Source:

(private) getSnapId()

Returns snap id for object or subelement

Source:

isIgnoreStatsFill()

Returns true if stats box fill can be ingored

Source:

isTF1()

Returns true if histogram drawn instead of TF1/TF2 object

Source:

isTH1K()

Returns true if TH1K

Source:

isTH2Poly()

Returns true if TH2Poly

Source:

isTProfile()

Returns true if TProfile

Source:

needDrawFunc()

Check if such function should be drawn directly

Source:

prepareDraw()

Prepare handle for color draw

Source:

processOnlineChange()

Inform web canvas that something changed in the histogram

Source:

processTitleChange()

Live change and update of title drawing

Description:
  • Used from the GED

Source:

(abstract) scanContent()

Scan histogram content

Source:

toggleColz()

Toggle color z palette drawing

Source:

toggleMode3D()

Toggle 3D drawing mode

Source:

(private) toggleStat()

Toggle statbox drawing

Source:

toggleTitle()

Toggle histogram title drawing

Source:

unzoomUserRange()

Unzoom user range if any

Source:

(private) updateAxes()

Update axes attributes in target histogram

Source:

(async) updateFunctions() → {Promise}

Method used to update functions which are prepared before

Source:
Returns:

fulfilled when drawing is ready

Type
Promise

updateObject(obj, opt) → {Boolean}

Update histogram object

Source:
Parameters:
Name Type Description
obj

new histogram instance

opt

new drawing option (optional)

Returns:
  • true if histogram was successfully updated
Type
Boolean

updateStatWebCanvas()

Update statistics when web canvas is drawn

Source:

(async, private, static) _drawHist()

generic draw function for histograms

Source: