cal

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawPieChartWithAPI

func DrawPieChartWithAPI(inputMap map[string]time.Duration, userName string) (string, error)

DrawPieChartWithAPI 本地获取频道的时间分布

@param inputMap
@param userName
@return string

func DrawPieChartWithLocal

func DrawPieChartWithLocal(inputMap map[string]time.Duration, userName string) (string, error)

DrawPieChartWithLocal 本地获取频道的时间分布

@return {}

func GetUserChannelTimeMap

func GetUserChannelTimeMap(userID string) map[string]time.Duration

GetUserChannelTimeMap 获取用户在频道的时间

@param userID
@return map

func ShowCalHandler

func ShowCalHandler(targetID, msgID, authorID, guildID string, args ...string) (err error)

ShowCalHandler 显示时间分布

@param userID

Types

type AnimationTime

type AnimationTime int

AnimationTime 动画时长

type AnimationType

type AnimationType string

AnimationType 动画类型

type ChartType

type ChartType string

ChartType 图表类型 p: 2 dimension pc: more than 1 dimension pd: donut

type DrawChartLabel

type DrawChartLabel struct {
	Text []string
	Size int
}

DrawChartLabel 画图标签

type DrawChartLegend

type DrawChartLegend struct {
	Text     []string
	Size     int
	Color    string
	Position string //chdlp:b,t,l,r
}

DrawChartLegend 画图标签

type DrawChartTitle

type DrawChartTitle struct {
	Text  string
	Size  int
	Color string // RGB,eg: FF0000,20,r
}

DrawChartTitle 画图标题

type DrawPieAPICtx

type DrawPieAPICtx struct {
	Ct        ChartType // bvs,p,ls
	Title     DrawChartTitle
	Label     DrawChartLabel
	Legend    DrawChartLegend
	Data      []string
	IsDivided bool
	Color     string
	Size      string
}

DrawPieAPICtx 画饼图的上下文

func (*DrawPieAPICtx) BuildRequestURL

func (ctx *DrawPieAPICtx) BuildRequestURL() string

BuildRequestURL 构建请求URL

@receiver ctx
@return string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL