Documentation ¶
Index ¶
Constants ¶
View Source
const (
JSPath = "github.com/grokify/gocharts/charts/d3/d3bullet/d3bullet.js"
)
Variables ¶
This section is empty.
Functions ¶
func GetExampleCSS ¶
func GetExampleCSSGreenRed ¶
func GetExampleJS ¶
func GetExampleJS() string
func GetExampleJSData ¶
func GetExampleJSData() string
func GetExampleJSVars ¶
func GetExampleJSVars() string
Types ¶
type Bullet ¶
type Bullet struct { Title string `json:"title,omitempty"` Subtitle string `json:"subtitle,omitempty"` Ranges []int `json:"ranges,omitempty"` Measures []int `json:"measures,omitempty"` Markers []int `json:"markers,omitempty"` }
func ProjectionToBullet ¶
func ProjectionToBullet(prjData bullet.ProjectionDataInt, title string, subtitle string) Bullet
type BulletInt64 ¶
type BulletInt64 struct { Title string `json:"title,omitempty"` Subtitle string `json:"subtitle,omitempty"` Ranges []int64 `json:"ranges,omitempty"` Measures []int64 `json:"measures,omitempty"` Markers []int64 `json:"markers,omitempty"` }
func BulletChartToD3Bullet ¶
func BulletChartToD3Bullet(bullet bullet.BulletChart) BulletInt64
func ProjectionToBulletInt64 ¶
func ProjectionToBulletInt64(prjData bullet.ProjectionDataInt64, title string, subtitle string) BulletInt64
type D3BulletChartBuilder ¶
type D3BulletChartBuilder struct { Title string YStart int64 // Default to 0 YTarget int64 // Mandatory YCurrent int64 // Mandatory XStart int64 // Mandatory, e.g. time XCurrent int64 // Mandatory, e.g. time XEnd int64 // Mandatory, e.g. time }
D3BulletChartBuilder is used to create a default D3Bullet chart based on minimal data. Instantiate D3BulletChartBuilder and then call D3Bullet(). Then add to DataInt64 and then call GetBulletDataJSON.
func (*D3BulletChartBuilder) Bullet ¶
func (d3builder *D3BulletChartBuilder) Bullet() bullet.BulletChart
func (*D3BulletChartBuilder) D3Bullet ¶
func (d3builder *D3BulletChartBuilder) D3Bullet() BulletInt64
type DataInt64 ¶
type DataInt64 struct {
Bullets []BulletInt64
}
func (*DataInt64) GetBulletDataJSON ¶
GetBulletDataJSON returns JSON structure for using in JavaScript.
Click to show internal directories.
Click to hide internal directories.