sparkchart.go
func CreateSparkChart(parent Control, w, h int, scale int) *SparkChart {
	c := new(SparkChart)
	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.hiliteMax = true
	c.autosize = true
	c.data = make([]float64, 0)
	c.SetScale(scale)

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

	return c
}
func CreateSparkChart(parent Control, w, h int, scale int) *SparkChart {
	c := new(SparkChart)
	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.hiliteMax = true
	c.autosize = true
	c.data = make([]float64, 0)
	c.SetScale(scale)

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

	return c
}
func CreateSparkChart ( parent Control , w , h int , scale int ) * SparkChart { c := new ( SparkChart ) 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 . hiliteMax = true c . autosize = true c . data = make ( [ ] float64 , 0 ) c . SetScale ( scale ) if parent != nil { parent . AddChild ( c ) } return c }
/*
NewSparkChart creates a new spark 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.
*/
/ * NewSparkChart creates a new spark 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 .