- CFML リファレンスユーザーガイド
- ColdFusion 関数
- カテゴリ別の ColdFusion 関数
- 関数 a~b
- Abs
- ACos
- AddSOAPRequestHeader
- AddSOAPResponseHeader
- AjaxLink
- AjaxOnLoad
- ApplicationStop
- ArrayAppend
- ArrayAvg
- ArrayClear
- ArrayContains
- ArrayContainsNoCase
- ArrayDelete
- ArrayDeleteAt
- ArrayDeleteNoCase
- ArrayEach
- ArrayFilter
- ArrayFind
- ArrayFindAll
- ArrayFindAllNoCase
- ArrayFindNoCase
- ArrayInsertAt
- ArrayIsDefined
- ArrayIsEmpty
- ArrayLen
- ArrayMap
- ArrayMax
- ArrayMin
- ArrayNew
- ArrayPrepend
- ArrayReduce
- ArrayResize
- ArraySet
- ArraySetMetadata
- ArraySlice
- ArraySort
- ArraySum
- ArraySwap
- ArrayToList
- Asc
- ASin
- Atn
- AuthenticatedContext
- AuthenticatedUser
- BinaryDecode
- BinaryEncode
- BitAnd
- BitMaskClear
- BitMaskRead
- BitMaskSet
- BitNot
- BitOr
- BitSHLN
- BitSHRN
- BitXor
- BooleanFormat
- Abs
- 関数 c~d
- CacheGet
- CacheGetAllIds
- CacheGetMetadata
- CacheGetProperties
- CacheGetSession
- CacheIdExists
- CachePut
- CacheRegionExists
- CacheRegionNew
- CacheRegionRemove
- CacheRemove
- CacheRemoveAll
- CacheSetProperties
- CallStackDump
- CallStackGet
- CanDeSerialize
- Canonicalize
- CanSerialize
- Ceiling
- CharsetDecode
- CharsetEncode
- Chr
- CJustify
- Compare
- CompareNoCase
- Cos
- CreateDate
- CreateDateTime
- CreateObject
- CreateObject:.NET オブジェクト
- CreateObject:COM オブジェクト
- CreateObject:コンポーネントオブジェクト
- CreateObject:CORBA オブジェクト
- CreateObject:Java または EJB オブジェクト
- CreateObject:web サービスオブジェクト
- CreateODBCDate
- CreateODBCDateTime
- CreateODBCTime
- CreateSignedJWT
- createEncryptedJWT
- CreateTime
- CreateTimeSpan
- CreateUUID
- CSRFGenerateToken
- CSRFVerifyToken
- CSVRead
- CSVWrite
- CSVProcess
- DateAdd
- DateCompare
- DateConvert
- DateDiff
- DateFormat
- DatePart
- DateTimeFormat
- Day
- DayOfWeek
- DayOfWeekAsString
- DayOfYear
- DaysInMonth
- DaysInYear
- DE
- DecimalFormat
- DecodeForHTML
- DecodeFromURL
- DecrementValue
- Decrypt
- DecryptBinary
- DeleteClientVariable
- Deserialize
- DeserializeJSON
- DeserializeXML
- DirectoryCopy
- DirectoryCreate
- DirectoryDelete
- DirectoryExists
- DirectoryList
- DirectoryRename
- DollarFormat
- DotNetToCFType
- Duplicate
- 関数 e~g
- EncodeForCSS
- EncodeForDN
- EncodeForHTML
- EncodeForHTMLAttribute
- EncodeForJavaScript
- EncodeForLDAP
- EncodeForURL
- EncodeForXML
- EncodeForXMLAttribute
- EncodeForXpath
- Encrypt
- EncryptBinary
- EntityDelete
- EntityLoad
- EntityLoadByExample
- EntityLoadByPK
- EntityMerge
- EntityNew
- EntityReload
- EntitySave
- EntityToQuery
- Evaluate
- Exp
- ExpandPath
- FileClose
- FileCopy
- FileDelete
- FileExists
- FileGetMimeType
- FileIsEOF
- FileMove
- FileOpen
- FileRead
- FileReadBinary
- FileReadLine
- FileSeek
- FileSetAccessMode
- FileSetAttribute
- FileSetLastModified
- FileSkipBytes
- FileUpload
- FileUploadAll
- FileWrite
- FileWriteLine
- Find
- FindNoCase
- FindOneOf
- FirstDayOfMonth
- Fix
- Floor
- FormatBaseN
- GeneratePBKDFKey
- GenerateSecretKey
- GetApplicationMetadata
- GetAuthUser
- GetBaseTagData
- GetBaseTagList
- GetBaseTemplatePath
- GetClientVariablesList
- GetComponentMetaData
- GetContextRoot
- GetCPUUsage
- GetCurrentTemplatePath
- GetCSPNonce
- GetDirectoryFromPath
- GetEncoding
- GetException
- GetFileFromPath
- GetFileInfo
- GetFreeSpace
- GetFunctionCalledName
- GetFunctionList
- GetGatewayHelper
- GetHttpRequestData
- GetHttpTimeString
- GetK2ServerDocCount
- GetK2ServerDocCountLimit
- GetLocale
- GetLocaleDisplayName
- GetLocalHostIP
- GetMetaData
- GetMetricData
- GetPageContext
- GetPropertyString
- GetPropertyFile
- GetPrinterInfo
- GetPrinterList
- GetProfileSections
- GetProfileString
- GetReadableImageFormats
- GetSafeHTML
- GetSAMLAuthRequest
- GetSAMLLogoutRequest
- Generate3DesKey
- GenerateSAMLSPMetadata
- GetSOAPRequest
- GetSOAPRequestHeader
- GetSOAPResponse
- GetSOAPResponseHeader
- GetSystemFreeMemory
- GetSystemTotalMemory
- GetTempDirectory
- GetTempFile
- GetTemplatePath
- GetTickCount
- GetTimeZoneInfo
- GetToken
- GetTotalSpace
- GetUserRoles
- GetVFSMetaData
- GetWriteableImageFormats
- 関数 h~im
- Hash
- HMac
- Hour
- HQLMethods
- HTMLCodeFormat
- HTMLEditFormat
- IIf
- ImageAddBorder
- ImageBlur
- ImageClearRect
- ImageCopy
- ImageCreateCaptcha
- ImageCrop
- ImageDrawArc
- ImageDrawBeveledRect
- ImageDrawCubicCurve
- ImageDrawLine
- ImageDrawLines
- ImageDrawOval
- ImageDrawPoint
- ImageDrawQuadraticCurve
- ImageDrawRect
- ImageDrawRoundRect
- ImageDrawText
- ImageFlip
- ImageGetBlob
- ImageGetBufferedImage
- ImageGetEXIFMetadata
- ImageGetEXIFTag
- ImageGetHeight
- ImageGetIPTCMetadata
- ImageGetIPTCTag
- ImageGetMetadata
- ImageGetWidth
- ImageGrayscale
- ImageInfo
- ImageMakeColorTransparent
- ImageMakeTranslucent
- ImageNegative
- ImageNew
- ImageOverlay
- ImagePaste
- ImageRead
- ImageReadBase64
- ImageResize
- ImageRotate
- ImageRotateDrawingAxis
- ImageScaleToFit
- ImageSetAntialiasing
- ImageSetBackgroundColor
- ImageSetDrawingColor
- ImageSetDrawingStroke
- ImageSetDrawingTransparency
- ImageSharpen
- ImageShear
- ImageShearDrawingAxis
- ImageTranslate
- ImageTranslateDrawingAxis
- ImageWrite
- ImageWriteBase64
- ImageXORDrawingMode
- 関数 in~k
- IncrementValue
- InputBaseN
- Insert
- Int
- InterruptThread
- InvalidateOauthAccesstoken
- Invoke
- InitSAMLAuthRequest
- InitSAMLLogoutRequest
- InvokeCFClientFunction
- IsArray
- IsAuthenticated
- IsAuthorized
- IsBinary
- IsBoolean
- IsClosure
- IsCustomFunction
- IsDate
- IsDateObject
- IsDDX
- IsDebugMode
- IsDefined
- IsImage
- IsImageFile
- IsInstanceOf
- IsIPv6
- IsJSON
- IsK2ServerABroker
- IsK2ServerDocCountExceeded
- IsK2ServerOnline
- IsLeapYear
- IsLocalHost
- IsNull
- IsNumeric
- IsNumericDate
- IsObject
- isOnline
- IsPDFArchive
- IsPDFFile
- IsPDFObject
- IsProtected
- IsQuery
- isSamlLogoutResponse
- isSafeHTML
- IsSimpleValue
- IsSOAPRequest
- IsSpreadsheetFile
- IsSpreadsheetObject
- IsStruct
- isThreadInterrupted
- IsUserInAnyRole
- IsUserInRole
- IsUserLoggedIn
- IsValid
- IsValidOauthAccesstoken
- IsWDDX
- IsXML
- IsXmlAttribute
- IsXmlDoc
- IsXmlElem
- IsXmlNode
- IsXmlRoot
- JavaCast
- JSStringFormat
- 関数 l
- LCase
- Left
- Len
- ListAppend
- ListChangeDelims
- ListContains
- ListContainsNoCase
- ListDeleteAt
- ListEach
- ListFilter
- ListFind
- ListFindNoCase
- ListFirst
- ListGetAt
- ListGetDuplicates
- ListInsertAt
- ListLast
- ListLen
- ListMap
- ListPrepend
- ListQualify
- ListReduce
- ListRemoveDuplicates
- ListRest
- ListSetAt
- ListSort
- ListToArray
- ListValueCount
- ListValueCountNoCase
- LJustify
- Location
- Log
- Log10
- LSCurrencyFormat
- LSDateFormat
- LSDateTimeFormat
- LSEuroCurrencyFormat
- LSIsCurrency
- LSIsDate
- LSIsNumeric
- LSNumberFormat
- LSParseCurrency
- LSParseDateTime
- LSParseEuroCurrency
- LSParseNumber
- LSTimeFormat
- LTrim
- 関数 m~r
- Max
- Mid
- Min
- Minute
- Month
- MonthAsString
- Now
- NumberFormat
- ObjectEquals
- ObjectLoad
- ObjectSave
- OnWSAuthenticate
- ORMClearSession
- ORMCloseAllSessions
- ORMCloseSession
- ORMEvictCollection
- ORMEvictEntity
- ORMEvictQueries
- ORMExecuteQuery
- ORMFlush
- ORMFlushall
- ORMGetSession
- ORMGetSessionFactory
- ORMIndex
- ORMIndexPurge
- ORMReload
- ORMSearch
- ORMSearchOffline
- ParagraphFormat
- ParameterExists
- ParseDateTime
- Pi
- PrecisionEvaluate
- ProcessSAMLResponse
- ProcessSAMLLogoutRequest
- Quarter
- PreserveSingleQuotes
- QueryAddColumn
- QueryAddRow
- QueryConvertForGrid
- QueryExecute
- QueryFilter
- QueryGetResult
- QueryGetRow
- QueryKeyExists
- QueryMap
- QueryNew
- QueryReduce
- QuerySetCell
- QuotedValueList
- QueryEach
- Rand
- Randomize
- RandRange
- ReEscape
- REFind
- REFindNoCase
- ReleaseComObject
- REMatch
- REMatchNoCase
- RemoveCachedQuery
- RemoveChars
- RepeatString
- Replace
- ReplaceList
- ReplaceNoCase
- REReplace
- REReplaceNoCase
- RestDeleteApplication
- RestSetResponse
- RestInitApplication
- Reverse
- Right
- RJustify
- Round
- RTrim
- 関数 s
- second
- SendGatewayMessage
- SendSAMLLogoutResponse
- Serialize
- SerializeJSON
- SerializeXML
- SessionInvalidate
- SessionRotate
- SessionGetMetaData
- SessionInvalidate
- SessionRotate
- SetDay
- SetEncoding
- SetHour
- SetLocale
- SetMonth
- SetProfileString
- SetPropertyString
- SetVariable
- SetYear
- Sgn
- Sin
- Sleep
- SpanExcluding
- SpanIncluding
- SpreadsheetAddAutoFilter
- SpreadsheetAddColumn
- SpreadsheetAddFreezePane
- SpreadsheetAddImage
- SpreadsheetAddInfo
- SpreadsheetAddPageBreaks
- SpreadsheetAddRow
- SpreadsheetAddRows
- SpreadsheetAddSplitPane
- SpreadsheetCreateSheet
- SpreadsheetDeleteColumn
- SpreadsheetDeleteColumns
- SpreadsheetDeleteRow
- SpreadsheetDeleteRows
- SpreadsheetFormatCell
- SpreadsheetFormatColumn
- SpreadsheetFormatCellRange
- SpreadsheetFormatColumn
- SpreadsheetFormatColumns
- SpreadsheetFormatRow
- SpreadsheetFormatRows
- SpreadsheetGetCellComment
- SpreadsheetGetCellFormula
- SpreadsheetGetCellValue
- SpreadsheetGetColumnCount
- SpreadsheetInfo
- SpreadsheetMergeCells
- SpreadsheetNew
- SpreadsheetRead
- SpreadsheetReadBinary
- SpreadsheetRemoveSheet
- SpreadsheetSetActiveSheet
- SpreadsheetSetActiveSheetNumber
- SpreadsheetSetCellComment
- SpreadsheetSetCellFormula
- SpreadsheetSetCellValue
- SpreadsheetSetColumnWidth
- SpreadsheetSetFooter
- SpreadsheetSetHeader
- SpreadsheetSetRowHeight
- SpreadsheetShiftColumns
- SpreadsheetShiftRows
- SpreadsheetWrite
- StreamingSpreadsheetNew
- StreamingSpreadsheetCleanup
- StreamingSpreadsheetRead
- StreamingSpreadsheetProcess
- SpreadsheetSetFooterImage
- SpreadsheetSetHeaderImage
- SpreadsheetSetFittoPage
- SpreadsheetUngroupColumns
- SpreadsheetGroupColumns
- SpreadsheetUngroupRows
- SpreadsheetGroupRows
- SpreadsheetRemoveColumnBreak
- SpreadsheetSetColumnBreak
- SpreadsheetRemoveRowBreak
- SpreadsheetSetRowBreak
- SpreadsheetRemovePrintGridlines
- SpreadsheetAddPrintGridlines
- SpreadsheetGetColumnWidth
- SpreadsheetSetColumnHidden
- SpreadsheetSetRowHidden
- SpreadsheetisColumnHidden
- SpreadsheetisRowHidden
- SpreadsheetisStreamingXmlFormat
- SpreadsheetisXmlFormat
- SpreadsheetisBinaryFormat
- SpreadsheetRenameSheet
- SpreadsheetRemoveSheetNumber
- SpreadsheetGetLastRowNumber
- SpreadsheetGetPrintOrientation
- Sqr
- StripCR
- StructAppend
- StructClear
- StructCopy
- StructCount
- StructDelete
- StructEach
- StructFilter
- StructFind
- StructFindKey
- StructFindValue
- StructGet
- StructGetMetadata
- StructInsert
- StructIsEmpty
- StructKeyArray
- StructKeyExists
- StructKeyList
- StructMap
- StructNew
- StructReduce
- StructSetMetadata
- StructSort
- StructToSorted
- StructUpdate
- StructValueArray
- StoreSetMetadata
- StoreGetACL
- StoreGetMetadata
- StoreAddACL
- StoreSetACL
- 関数 t~z
- Tan
- ThreadJoin
- ThreadTerminate
- Throw
- TimeFormat
- ToBase64
- ToBinary
- ToScript
- ToString
- Trace
- Transactionandconcurrency
- TransactionCommit
- TransactionRollback
- TransactionSetSavePoint
- Trim
- UCase
- URLDecode
- URLEncodedFormat
- URLSessionFormat
- Val
- ValueList
- VerifyClient
- Week
- Wrap
- WriteDump
- WriteLog
- WriteOutput
- WSGetAllChannels
- WSGetSubscribers
- WSPublish
- WSSendMessage
- XmlChildPos
- XmlElemNew
- XmlFormat
- XmlGetNodeType
- XmlNew
- XmlParse
- XmlSearch
- XmlTransform
- XmlValidate
- Year
- YesNoFormat
- ColdFusion のタグ
- ColdFusion タグの概要
- カテゴリ別の ColdFusion タグ
- アプリケーションフレームワークタグ
- 通信タグ
- データベース操作タグ
- データ出力タグ
- デバッグタグ
- 例外処理タグ
- 拡張タグ
- ファイル管理タグ
- フロー制御タグ
- フォームタグ
- インターネットプロトコルタグ
- ページ処理タグ
- セキュリティタグ
- 変数操作タグ
- その他のタグ
- タグ a~b
- タグ c
- cfcache
- cfcalendar
- cfcase
- cfcatch
- cfchart
- ColdFusion の cfchart タグ
- cfchart の概要
- cfchart を使用したチャートのカスタマイズ
- 高度な cfchart カスタマイズオプション
- ColdFusion での面グラフの作成
- ColdFusion での折れ線グラフの作成
- ColdFusion での棒グラフの作成
- ColdFusion でのフローティング棒グラフの作成
- ColdFusion でのヒストグラムの作成
- ColdFusion での円グラフの作成
- ColdFusion でのファネルグラフの作成
- ColdFusion でのピラミッドグラフの作成
- ColdFusion での曲線グラフの作成
- ColdFusion でボックスプロットを作成する
- ColdFusion でのドーナツグラフの作成
- ColdFusion でのバブルチャートの作成
- ColdFusion での散布図の作成
- ColdFusion でのレーダーチャートの作成
- ColdFusion のその他のグラフタイプ(円錐、円柱、ピアノ、箇条書き)
- cfchart の高度なカスタマイズオプション
- cfchartdata
- cfchartseries
- cfchartset
- cfclient
- cfclientsettings
- cfcol
- cfcollection
- cfcomponent
- cfcontent
- cfcontinue
- cfcookie
- タグ d~e
- タグ f
- cffeed
- cffile
- cffile action = "append"
- cffile action = "copy"
- cffile action = "delete"
- cffile action = "move"
- cffile action = "read"
- cffile action = "readBinary"
- cffile action = "rename"
- cffile action = "upload"
- cffile action = "uploadAll"
- cffile action = "write"
- cffileupload
- cffinally
- cfflush
- cfform
- cfformgroup
- cfformitem
- cfftp
- cfftp:接続:ファイルおよびディレクトリのオペレーション
- cfftp:FTP サーバー接続の確立と切断
- cfftp:セキュア FTP サーバー接続の確立と切断
- cfftp action = "listDir"
- cffunction
- タグ g~h
- タグ i
- タグ j~l
- タグ m~o
- タグ p~q
- タグ r~s
- タグ t
- タグ u~z
- CFML リファレンス
- 予約語と変数
- AJAX JavaScript 関数
- AJAX JavaScript 関数
- 関数概要 Ajax
- ColdFusion.Ajax.submitForm
- ColdFusion.Autosuggest.getAutosuggestObject
- ColdFusion.Layout.enableSourceBind
- ColdFusion.MessageBox.getMessageBoxObject
- ColdFusion.ProgressBar.getProgressBarObject
- ColdFusion.MessageBox.isMessageBoxDefined
- JavaScriptFunctionsinColdFusion9Update1
- ColdFusion ActionScript 関数
- ColdFusion Mobile 関数
- Application.cfc リファレンス
- CFC として実装されているスクリプト関数
- ColdFusion Flash フォームスタイルリファレンス
- すべてのコントロールに有効なスタイル
- cfform に有効なスタイル
- type 属性が horizontal または vertical である cfformgroup に有効なスタイル
- ボックススタイルの cfformgroup 要素に有効なスタイル
- type 属性が accordion である cfformgroup に有効なスタイル
- type 属性が tabnavigator である cfformgroup に有効なスタイル
- type 属性が hrule または vrule である cfformitem に有効なスタイル
- type 属性が radio、checkbox、button、image、または submit である cfinput に有効なスタイル
- cftextarea タグ、および type 属性が text、password、または hidden である cfinput に有効なスタイル
- size 属性の値が 1 である cfselect に有効なスタイル
- size 属性が 2 以上である cfselect に有効なスタイル
- cfcalendar タグ、および type 属性が dateField である cfinput に有効なスタイル
- cfgrid タグに有効なスタイル
- cftree タグに有効なスタイル
- ColdFusion Flash フォームスタイルリファレンス
- ColdFusion イベントゲートウェイリファレンス
- ColdFusion イベントゲートウェイリファレンス
- addEvent
- CFEvent
- CFEventclass
- コンストラクタ
- ゲートウェイ開発のインターフェイスとクラス
- getStatus
- setCFCPath
- setCFCMethod
- getOriginatorID
- getLogger
- getBuddyList
- getBuddyInfo
- IM ゲートウェイメッセージ送信コマンド
- IM ゲートウェイ GatewayHelper クラスのメソッド
- onIncomingMessage
- onIMServerMessage
- onBuddyStatus
- onAddBuddyResponse
- onAddBuddyRequest
- IM ゲートウェイ CFC 着信メッセージメソッド
- IM ゲートウェイメソッドとコマンド
- CFML CFEvent 構造体
- warn
- info
- setOriginatorID
- data コマンド
- submitMulti コマンド
- submit コマンド
- setGatewayType
- setGatewayID
- setData
- setCFCListeners
- outgoingMessage
- getStatusTimeStamp
- numberOfMessagesReceived
- numberOfMessagesSent
- removeBuddy
- removeDeny
- removePermit
- setNickName
- setPermitMode
- setStatus
- SMS ゲートウェイ CFEvent の構造体とコマンド
- SMS ゲートウェイ着信メッセージ CFEvent 構造体
- getStatusAsString
- getProtocolName
- getPermitMode
- getPermitList
- getNickName
- getName
- getDenyList
- getCustomAwayMessage
- getQueueSize
- getMaxQueueSize
- getHelper
- getGatewayType
- getGatewayServices
- getGatewayID_1
- getGatewayID
- getData
- getCFCTimeout
- setCFCTimeout
- getCFCPath
- getCFCMethod
- GatewayServices クラス
- ゲートウェイインターフェイス
- GatewayHelper インターフェイス
- addPermit
- addDeny
- addBuddy
- error
- debug
- Logger クラス
- stop
- start
- CFML イベントゲートウェイ SendGatewayMessage の data パラメータ
- restart
- fatal
- SMS ゲートウェイメッセージ送信コマンド
- ColdFusion C++ CFX リファレンス
- ColdFusion Java CFX リファレンス
- WDDX JavaScript オブジェクト
- クラウドサービス
- ColdFusion と GCP Storage
- ColdFusion と GCP Firestore
- ColdFusion と GCP PubSub
- ColdFusion と Amazon S3
- ColdFusion と DynamoDB
- ColdFusion と Amazon SQS
- ColdFusion と Amazon SNS
- ColdFusion と MongoDB
- ColdFusion と Azure Blob
- ColdFusion と Azure Service Bus
- マルチクラウドストレージサービス
- マルチクラウド RDS データベース
- ColdFusion と Azure Cosmos DB
ColdFusion には、web アプリケーションのチャートを作成およびカスタマイズするための <cfchart> タグが用意されています。様々な属性とネストされたタグを活用することで、ユーザーはチャートの外観、スタイル、動作を変更できます。
<cfchart> タグは、デフォルト設定でチャートを生成します。ユーザーは、format、show3d、chartHeight、chartWidth などの属性を使用してカスタマイズできます。
例
<cfchart format="html" chartheight="300" chartwidth="500"> <cfchartseries type="bar"> <cfchartdata item="Q1" value="100"/> <cfchartdata item="Q2" value="150"/> <cfchartdata item="Q3" value="200"/> </cfchartseries> </cfchart>
チャートの外観のカスタマイズ
チャートの寸法の設定
chartWidth と chartHeight は、チャートの寸法をピクセル単位で定義します。
<cfchart format="html" chartwidth="600" chartheight="400">...</cfchart>
チャートの形式
サポートされている形式は、png、jpg、html、svg です。
<cfchart format="html">...</cfchart>
3D 効果を有効にする
show3d="yes" を使用すると、チャートに 3D 効果を追加できます。
<cfchart format="html" show3d="yes">...</cfchart>
チャートの色のカスタマイズ
背景と境界線の色
- 背景色を設定するには、 backgroundColor を使用します。
- チャートの境界線を有効または無効にするには、境界線を使用します。
<cfchart format="html" backgroundColor="##FFFFFF" border="yes">...</cfchart>
系列の色のカスタマイズ
{{}}{{}}{{
}}{{{{}}}} の {2}{3}colorlist{4}{5} を使用して、様々なデータ系列の色を定義します。{10}
<cfchartseries type="bar" colorlist="red,blue,green">...</cfchartseries>
<cfchart format="png" type="bar"> <cfchartseries type="bar"> <cfchartdata item="January" value="5000"> <cfchartdata item="February" value="7000"> <cfchartdata item="March" value="6000"> </cfchartseries> </cfchart>
比較データの複数系列
グループ化された棒グラフまたは複数の折れ線グラフに複数の <cfchartseries> を追加します。
<cfchart format="html" type="bar"> <cfchartseries type="bar" seriesLabel="Product A"> <cfchartdata item="Q1" value="2000"> <cfchartdata item="Q2" value="3000"> </cfchartseries> <cfchartseries type="bar" seriesLabel="Product B"> <cfchartdata item="Q1" value="2500"> <cfchartdata item="Q2" value="3500"> </cfchartseries> </cfchart>
クエリからのデータの動的入力
<cfquery name="salesData" datasource="myDB"> SELECT month, revenue FROM sales_table </cfquery> <cfchart format="html" type="line"> <cfchartseries type="line"> <cfloop query="salesData"> <cfchartdata item="#month#" value="#revenue#"> </cfloop> </cfchartseries> </cfchart>
チャートの凡例とツールヒントのカスタマイズ
凡例の有効化とスタイル設定
- showLegend:凡例を表示します。
- legendPosition:上、下、左または右に配置します。
<cfchart format="html" type="pie" showLegend="yes" legendPosition="right">..</cfchart>
データポイントのツールヒントの使用
- showMarkers="yes" は、インタラクティブマーカーを表示します。
- markerSize はマーカーサイズを調整します。
<cfchart format="html" type="line" showMarkers="yes" markerSize="6">...</cfchart>
動的チャートの主な用途は、データのリアルタイム表示です。 このような場合、チャートに新しいデータを一定間隔で表示する必要があります。
フル更新フィードを使用すると、チャート全体を一定間隔で更新できます。 古い値には関連性がなく、最新の数値を表示するだけでいい場合は、フル更新チャートを使用します。
このようなチャートでは、指定した間隔でチャートが最新データの取得を試みる URL が必要です。
<!--- refresh.cfm ---> <cfchart format="html" refresh="#{"type"="full","interval":"2","url":"feed.cfm"}#" chartWidth="800" chartHeight="600"/>
<!--- feed.cfm ---> <cfscript> values1=values2=values3=[]; for (i=1;i<=5;i++){ values1[i]=randRange(20,40); } for (i=1;i<=5;i++){ values2[i]=randRange(40,60); } for (i=1;i<=5;i++){ values3[i]=randRange(60,80); } </cfscript> { "graphset" : [ { "type" : "bar", "refresh" : { "type" : "full", "interval" : 2 }, "title" : { "text" : "Full Refresh Chart" }, "series" : [ { "values" : <cfoutput>#serializeJSON(values1)#</cfoutput> }, { "values" : <cfoutput>#serializeJSON(values2)#</cfoutput> }, { "values" : <cfoutput>#serializeJSON(values3)#</cfoutput> }] }] }
ダウンロード
<cfscript> arrows=[{"backgroundColor":"red","label":{"text":"Data for 2017","bold":true,"backgroundColor":"white"}, "size":6,"from":{"x":200,"y":100},"to":{"x":400,"y":200}}]; </cfscript> <cfchart format="html" type="bar" showlegend="false" chartHeight="400" chartWidth="600" title="Chart with arrow" show3d="true" arrows="#arrows#"> <cfchartseries > <cfchartdata item="2015" value=20> <cfchartdata item="2016" value=40> <cfchartdata item="2017" value=60> </cfchartseries> </cfchart>
出力
<cfscript> aspect3d={"angle":90,"depth":100,"true3d":false}; </cfscript> <cfchart format="html" chartHeight="400" chartWidth="600" showLegend="no" title="Two-series chart" aspect3d="#aspect3d#" show3d="true"> <cfchartseries type="bar" serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="bar" serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
<cfscript> aspect3d={"angle":90,"depth":100,"true3d":true}; </cfscript> <cfchart format="html" chartHeight="400" chartWidth="600" showLegend="no" title="Two-series chart" aspect3d="#aspect3d#" show3d="true"> <cfchartseries type="bar" serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="bar" serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
<cfscript> background={}; background={"color":"red","color-2":"green"}; </cfscript> <cfchart format="html" scalefrom="0" scaleto="1200000" showlegend="true" chartheight="400" chartwidth="600" background="#background#" > <cfchartseries type="bar" serieslabel="Website Traffic 2016" seriescolor="blue"> <cfchartdata item="January" value="503100"> <cfchartdata item="February" value="720310"> <cfchartdata item="March" value="688700"> <cfchartdata item="April" value="986500"> <cfchartdata item="May" value="1063911"> <cfchartdata item="June" value="1115321"> </cfchartseries> <cfchartseries type="bar" serieslabel="Website Traffic 2015" seriescolor="yellow"> <cfchartdata item="January" value="#RandRange(300000, 900000)#"> <cfchartdata item="February" value="#RandRange(300000, 900000)#"> <cfchartdata item="March" value="#RandRange(300000, 900000)#"> <cfchartdata item="April" value="#RandRange(300000, 900000)#"> <cfchartdata item="May" value="#RandRange(300000, 900000)#"> <cfchartdata item="June" value="#RandRange(300000, 900000)#"> </cfchartseries> </cfchart>
出力
<cfscript> border={"color":"blue","radius":6,"width":2}; </cfscript> <cfchart format="html" type="bar" showlegend="false" chartHeight="400" chartWidth="600" border="#border#"> <cfchartseries > <cfchartdata item="2015" value=20> <cfchartdata item="2016" value=40> <cfchartdata item="2017" value=60> </cfchartseries> </cfchart>
出力
<cfscript> crosshair={"line-color":"green","line-style":"dashed","alpha"=1}; </cfscript> <cfchart format="html" chartHeight="400" chartWidth="600" showLegend="no" title="Two-series chart" crosshair="#crosshair#"> <cfchartseries type="bar" serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="bar" serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
<cfscript> fill={"angle":45,"background-color-1":"gray","background-color-2":"yellow"}; </cfscript> <cfchart format="html" chartHeight="400" chartWidth="600" showLegend="no" title="Two-series chart" fill="#fill#"> <cfchartseries type="bar" serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="bar" serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
<cfscript> labels=[{"text":"Sample comparison line chart","font-family":"Verdana","font-size":18}]; </cfscript> <cfchart format="html" chartHeight="400" chartWidth="600" showLegend="no" labels="#labels#"> <cfchartseries type="line" serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="line" serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
<cfscript> legend={"background-color":"lightgray"}; </cfscript> <cfchart format="html" title="Graph" chartHeight="400" chartWidth="600" showLegend="yes" legend="#legend#"> <cfchartseries type="line" serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="line" serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
<cfscript> plot={"rules":[ { "rule":"%v<700000", "background-color":"green" // 700000 未満の値がすべて緑色の棒で }, // グラフに表示されるルールを設定 { "rule":"%v>700000", // 700000 より大きい値がすべて赤色の棒で "background-color":"red" // グラフに表示されるルールを設定 } ]}; </cfscript> <cfchart format="html" scalefrom="0" scaleto="1200000" showlegend="false" chartheight="400" chartwidth="600" plot="#plot#" title="Website Traffic 2016"> <cfchartseries type="bar"> <cfchartdata item="January" value="503100"> <cfchartdata item="February" value="620310"> <cfchartdata item="March" value="688700"> <cfchartdata item="April" value="986500"> <cfchartdata item="May" value="1063911"> <cfchartdata item="June" value="1115321"> </cfchartseries> </cfchart>
出力
<cfscript> n=200; preview={"visible":true,"live":true,"preserve-zoom":true,"border-width":"3"}; // preview 構造体 myarray=[]; for (i=1;i<=n;i++){ myarray[i]=randrange(1,n); } strengtharray=[]; for (i=1;i<=n;i++){ strengtharray[i]=randrange(15,25); } myquery=QueryNew("points,data,strength","integer,integer,integer"); for (i=1;i<=arraylen(myarray);i++){ queryAddRow(myquery); querySetCell(myquery,"points",myarray[i]); querySetCell(myquery,"data",i); querySetCell(myquery,"strength",strengtharray[i]); } cfchart(format = "html", title = "Report", scalefrom="1", scaleto="#n#",chartheight="400",chartwidth="600", preview="#preview#") { cfchartseries(query="myquery",type="line" ,valuecolumn="points" ,itemcolumn="data" , zcolumn="strength"); } </cfscript>
出力
<cfchart format="html" title="Graph" chartHeight="400" chartWidth="600" showLegend="yes" seriesPlacement="stacked"> <cfchartseries type="bar" serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="bar" serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
例 1
<cfchart format="html" chartHeight="400" chartWidth="600" showLegend="no" title="Two-series Line chart" scales="x,y"> <cfchartseries type="line" serieslabel="WBC" markerstyle="circle" color="red" scales="x2,y2"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="line" serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
例 2
<cfchart format="html" chartHeight="400" chartWidth="600" showLegend="no" title="Two-series Line chart" scales="x,y"> <cfchartseries type="line" serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> <cfchartdata item="Day 3" value="15.1"/> <cfchartdata item="Day 4" value="12.6"/> <cfchartdata item="Day 5" value="14.2"/> </cfchartseries> <cfchartseries type="line" serieslabel="HCT" markerstyle="diamond" color="blue" scales="x2,y2"> <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> <cfchartdata item="Day 3" value="35.1"/> <cfchartdata item="Day 4" value="32.6"/> <cfchartdata item="Day 5" value="34.2"/> </cfchartseries> </cfchart>
出力
<cfscript> n=200; preview={"visible":true,"live":true,"preserve-zoom":true,"border-width":"0"}; // preview 構造体 xAxis={"label":{"text":"Drag the handles to zoom in to the chart","color":"red"},"zooming":true}; myarray=[]; for (i=1;i<=n;i++){ myarray[i]=randrange(1,n); } strengtharray=[]; for (i=1;i<=n;i++){ strengtharray[i]=randrange(15,25); } myquery=QueryNew("points,data,strength","integer,integer,integer"); for (i=1;i<=arraylen(myarray);i++){ queryAddRow(myquery); querySetCell(myquery,"points",myarray[i]); querySetCell(myquery,"data",i); querySetCell(myquery,"strength",strengtharray[i]); } cfchart(format = "html", title = "Report", scalefrom="1", scaleto="#n#",chartheight="600",chartwidth="800", preview="#preview#",xaxis="#xaxis#") { cfchartseries(query="myquery",type="line" ,valuecolumn="points" ,itemcolumn="data" , zcolumn="strength"); } </cfscript>
<cfscript> n=200; preview={"visible":true,"live":true,"preserve-zoom":true,"border-width":"0"}; // preview 構造体 xAxis={"label":{"text":"Drag the handles to zoom in to the chart","color":"red"},"zooming":true}; zoom={"alpha":"0.3","border-color":"black","border-width":4,"background-color":"gray","label":{"border-color":"red","border-width":2,"font-size":10}}; myarray=[]; for (i=1;i<=n;i++){ myarray[i]=randrange(1,n); } strengtharray=[]; for (i=1;i<=n;i++){ strengtharray[i]=randrange(15,25); } myquery=QueryNew("points,data,strength","integer,integer,integer"); for (i=1;i<=arraylen(myarray);i++){ queryAddRow(myquery); querySetCell(myquery,"points",myarray[i]); querySetCell(myquery,"data",i); querySetCell(myquery,"strength",strengtharray[i]); } cfchart(format = "html", title = "Report", scalefrom="1", scaleto="#n#",chartheight="600",chartwidth="800", preview="#preview#",xaxis="#xaxis#",zoom="#zoom#") { cfchartseries(query="myquery",type="line" ,valuecolumn="points" ,itemcolumn="data" , zcolumn="strength"); } </cfscript>
<cfchart type="bar" title="Sample two-series Line chart" height=600 width=800 plotarea = "#{"margin"="dynamic"}#" showlegend="yes" show3d="no" format="html"> <cfchartseries serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> </cfchartseries> <cfchartseries serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> </cfchartseries> </cfchart>
例 2 - height=50% および width=50%
<cfchart type="bar" title="Sample two-series Line chart" height=50% width=50% plotarea = "#{"margin"="dynamic"}#" showlegend="yes" show3d="no" format="html"> <cfchartseries serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> </cfchartseries> <cfchartseries serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> </cfchartseries> </cfchart>
例 3 - x=0 y=35%
<cfchart type="bar" title="Sample two-series Line chart" x=0 y=35% plotarea = "#{"margin"="dynamic"}#" showlegend="yes" show3d="no" format="html"> <cfchartseries serieslabel="WBC" markerstyle="circle" color="red"> <cfchartdata item="Day 1" value="19.2"/> <cfchartdata item="Day 2" value="15.2"/> </cfchartseries> <cfchartseries serieslabel="HCT" markerstyle="diamond" color="blue" > <cfchartdata item="Day 1" value="39.2"/> <cfchartdata item="Day 2" value="35.2"/> </cfchartseries> </cfchart>
bevel 属性の使用
チャートのベベルは、棒グラフや円グラフのスライスなどのチャート要素に適用される 3D のような浮き彫り効果で、視覚的な奥行きを強調します。この効果により、要素がエンボス加工されたような外観になり、より目立つようになります。
ベベルは、次のようなベベルに関連するキーの構造体です。
- color:ベベルの色を定義します。
- blur-x:x 方向のベベルのエッジの鋭さ/滑らかさを定義します。
- blur-y:y 方向のベベルのエッジの鋭さ/滑らかさを定義します。
- angle:ベベルの角度を定義します。
- distance:# | #px 単位の距離で、ベベルが表示されるオブジェクトからの距離を示します。
<cfquery name="empQuery" datasource="cfdocexamples"> SELECT * FROM EMPLOYEE ORDER BY SALARY DESC FETCH FIRST 10 ROWS ONLY </cfquery> <cfscript> bevel={ "blur-x"=5, "blur-y"=6, "angle"=45, "distance"=5 } scaley={"min-value"="0","max-value"="15000"} </cfscript> <cfchart format="html" type="hbar" query="empQuery" height="600" width="800" showLegend="FALSE" xaxis="#scaley#" title="Employee salary" xaxistitle="Lastname" yaxistitle="Salary"> <cfchartseries itemcolumn="LASTNAME" valuecolumn="SALARY" bevel="#bevel#" color="green"> </cfchart>
axis 属性の使用
x 軸と y 軸の属性をカスタマイズして、チャートの読みやすさと表示を向上させます。このカスタマイズは、cfchart タグ内の xAxis 属性と yAxis 属性を使用して実現されます。
xAxis 属性と yAxis 属性は、それぞれの軸の様々なスタイルオプションを定義する JSON 形式の文字列を受け入れます。これらのオプションには、書式設定、ラベル付け、ガイドライン、ズーム機能が含まれます。
<cfscript> xAxis={"label"={"text":"Monthly temperature in Chartville","color"="##3a5551"}} </cfscript> <cfchartset format="html" layout="vertical" height="800" width="1000"> <cfchart format = "html" type = "curve" markersize="5" xAxis="#xAxis#"> <cfchartseries label="Temperatures(°C)- Monthly" seriescolor="white" color="##3a5551"> <cfchartdata item="Jan" value="5"> <cfchartdata item="Feb" value="70"> <cfchartdata item="Mar" value="10"> <cfchartdata item="Apr" value="40"> <cfchartdata item="May" value="18"> <cfchartdata item="Jun" value="22"> </cfchartseries> </cfchart> <cfchart format = "html" type = "bar" xAxis="#xAxis#"> <cfchartseries label="Temperature(°C) - Monthly" seriescolor="##3a5551"> <cfchartdata item="Jan" value="5"> <cfchartdata item="Feb" value="7"> <cfchartdata item="Mar" value="10"> <cfchartdata item="Apr" value="14"> <cfchartdata item="May" value="18"> <cfchartdata item="Jun" value="22"> </cfchartseries> </cfchart> </cfchartset>