barchart.go
func CreateBarChart(parent Control, w, h int, scale int) *BarChart {
	c := new(BarChart)
	c.BaseControl = NewBaseControl()

	if w == AutoSize {
		w = 10
	}
	if h == AutoSize {
		h = 5
	}

	c.parent = parent

	c.SetSize(w, h)
	c.SetConstraints(w, h)
	c.tabSkip = true
	c.showTitles = true
	c.barWidth = 3
	c.data = make([]BarData, 0)
	c.SetScale(scale)

	if parent != nil {
		parent.AddChild(c)
	}

	return c
}
func CreateBarChart(parent Control, w, h int, scale int) *BarChart {
	c := new(BarChart)
	c.BaseControl = NewBaseControl()

	if w == AutoSize {
		w = 10
	}
	if h == AutoSize {
		h = 5
	}

	c.parent = parent

	c.SetSize(w, h)
	c.SetConstraints(w, h)
	c.tabSkip = true
	c.showTitles = true
	c.barWidth = 3
	c.data = make([]BarData, 0)
	c.SetScale(scale)

	if parent != nil {
		parent.AddChild(c)
	}

	return c
}
func CreateBarChart ( parent Control , w , h int , scale int ) * BarChart { c := new ( BarChart ) c . BaseControl = NewBaseControl ( ) if w == AutoSize { w = 10 } if h == AutoSize { h = 5 } c . parent = parent c . SetSize ( w , h ) c . SetConstraints ( w , h ) c . tabSkip = true c . showTitles = true c . barWidth = 3 c . data = make ( [ ] BarData , 0 ) c . SetScale ( scale ) if parent != nil { parent . AddChild ( c ) } return c }
/*
NewBarChart creates a new bar chart.
view - is a View that manages the control
parent - is container that keeps the control. The same View can be a view and a parent at the same time.
w and h - are minimal size of the control.
scale - the way of scaling the control when the parent is resized. Use DoNotScale constant if the
control should keep its original size.
*/
/ * NewBarChart creates a new bar chart . view - is a View that manages the control parent - is container that keeps the control . The same View can be a view and a parent at the same time . w and h - are minimal size of the control . scale - the way of scaling the control when the parent is resized . Use DoNotScale constant if the control should keep its original size .