mirror of https://github.com/skoo87/goplot.git
add line no dot, no curve
This commit is contained in:
parent
3ad50dcb79
commit
3185c35342
|
@ -0,0 +1,20 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type LineNoCurveChart struct {
|
||||
LineChart
|
||||
}
|
||||
|
||||
func (l *LineNoCurveChart) NewChart(name string) string {
|
||||
return fmt.Sprintf("new Chart(document.getElementById(\"%s\").getContext(\"2d\")).Line(eval('('+lineJsonStr+')'), {pointDot:false, bezierCurve:false});", name)
|
||||
}
|
||||
|
||||
func init() {
|
||||
line := new(LineNoCurveChart)
|
||||
line.name = "line_no_curve"
|
||||
|
||||
ChartHandlers["line_no_curve"] = line
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type LineNoDotChart struct {
|
||||
LineChart
|
||||
}
|
||||
|
||||
func (l *LineNoDotChart) NewChart(name string) string {
|
||||
return fmt.Sprintf("new Chart(document.getElementById(\"%s\").getContext(\"2d\")).Line(eval('('+lineJsonStr+')'), {pointDot : false});", name)
|
||||
}
|
||||
|
||||
func init() {
|
||||
line := new(LineNoDotChart)
|
||||
line.name = "line_no_dot"
|
||||
|
||||
ChartHandlers["line_no_dot"] = line
|
||||
}
|
Loading…
Reference in New Issue