У меня проблема с тегом CFChart ColdFusion. У меня есть пара графиков, которые не отображаются должным образом. Для горизонтальной гистограммы, при попытке отобразить 50 или более элементов данных диаграммы, метки гистограммы графа прекращают построение, но продолжают отображать сами гистограммы, когда доходят до гистограммы № 50. Я заметил, что увеличение высоты диаграммы усугубляет проблему, так как Что ж. Если я перейду с 1000 пикселей на 2000 пикселей, он прекратил наносить метки еще раньше. Запрос, заполняющий элементы диаграммы, также не возвращает пустых имен меток. См. Экран ниже, этикетки должны продолжать наноситься после «7 к 1».
альтернативный текст http://www.imagechicken.com/uploads/1267118593090012000.png
Я использую ColdFusion 8 Developer Edition. Является ли это возможным ограничением собственных возможностей ColdFusion для составления графиков? Или я должен рассмотреть возможность проверки Flex Charting вместо этого?
Спасибо!
Код CF:
<cfset hideZeroData = "25">
<cfparam name="paramID" default="25">
<cfset ecfData = QueryNew("ecfName,cumValue")>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 1 to 2",1)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "26", 1)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 1 to 3",2)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "19", 2)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 1 to 4",3)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "11", 3)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 1 to 5",4)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "14", 4)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 1 to 6",5)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "38", 5)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 1 to 7",6)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "24", 6)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 1 to N",7)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "14", 7)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 1 to R",8)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "24", 8)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 2 to 1",9)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "16", 9)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 2 to 3",10)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "32", 10)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 2 to 4",11)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "34", 11)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 2 to 5",12)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "30", 12)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 2 to 6",13)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "34", 13)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 2 to 7",14)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "25", 14)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 2 to N",15)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "30", 15)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 2 to R",16)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "15", 16)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 3 to 1",17)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "26", 17)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 3 to 2",18)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "46", 18)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 3 to 4",19)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "11", 19)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 3 to 5",20)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "26", 20)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 3 to 6",21)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "19", 21)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 3 to 7",22)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "16", 22)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 3 to N",23)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "28", 23)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 3 to R",24)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "13", 24)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 4 to 1",25)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "19", 25)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 4 to 2",26)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "13", 26)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 4 to 3",27)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "36", 27)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 4 to 5",28)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "22", 28)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 4 to 6",29)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "4", 29)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 4 to 7",30)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "17", 30)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 4 to N",31)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "24", 31)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 4 to R",32)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "12", 32)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 5 to 1",33)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "21", 33)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 5 to 2",34)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "28", 34)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 5 to 3",35)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "24", 35)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 5 to 4",36)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "37", 36)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 5 to 6",37)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "24", 37)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 5 to 7",38)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "12", 38)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 5 to N",39)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "24", 39)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 5 to R",40)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "19", 40)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 6 to 1",41)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "19", 41)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 6 to 2",42)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "20", 42)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 6 to 3",43)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "21", 43)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 6 to 4",44)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "16", 44)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 6 to 5",45)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "27", 45)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 6 to 7",46)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "6", 46)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 6 to N",47)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "24", 47)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 6 to R",48)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "25", 48)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 7 to 1",49)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "16", 49)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 7 to 2",50)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "16", 50)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 7 to 3",51)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "18", 51)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 7 to 4",52)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "13", 52)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 7 to 5",53)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "35", 53)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 7 to 6",54)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "17", 54)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 7 to N",55)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "13", 55)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - 7 to R",56)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "2", 56)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - Any gear to L",57)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "233", 57)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - Any gear to P",58)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "182", 58)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - N to 1",59)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "21", 59)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - N to 2",60)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "24", 60)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - N to 3",61)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "21", 61)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - N to 4",62)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "10", 62)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - N to 5",63)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "13", 63)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - N to 6",64)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "29", 64)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - N to 7",65)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "14", 65)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - N to R",66)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "22", 66)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - R to 1",67)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "7", 67)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - R to 2",68)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "19", 68)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - R to 3",69)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "18", 69)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - R to 4",70)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "16", 70)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - R to 5",71)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "22", 71)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - R to 6",72)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "13", 72)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - R to 7",73)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "27", 73)>
<cfset temp = QueryAddRow(ecfData)>
<cfset temp = QuerySetCell(ecfData,"ecfName", "Transmission Range - R to N",74)>
<cfset temp = QuerySetCell(ecfData,"cumValue", "10", 74)>
<cfoutput>
<cfif ecfData.recordCount GT 0>
<cfif ecfData.recordCount GT 10 AND ecfData.recordCount LT 50>
<cfset chartStyle="DIME_events_thin">
<cfset chartHeight = 1000>
<cfelseif ecfData.recordCount GT 50>
<cfset chartStyle="DIME_events_thin">
<cfset chartHeight = 2500> <!--- 1500px is the approximate max height that won't hide labels, after that labels start hiding. Except with 1500 px height, the labels get squished --->
<cfelse>
<cfset chartStyle="DIME_events_thin">
<cfset chartHeight = 400>
</cfif>
<cfchart
format="flash"
xaxistitle=""
yaxistitle="Events"
chartwidth="725"
fontSize="10"
chartheight="#chartHeight#"
style="#chartStyle#">
<cfchartseries type="horizontalbar" seriescolor="##4AFF4A">
<cfloop query="ecfData">
<cfif (NOT ListFind(hideZeroData, paramID)) OR (ecfData.cumValue GT 0)>
<cfchartdata item="#ListLast(ecfData.ecfName,'-')#" value="#ecfData.cumValue#">
</cfif>
</cfloop>
</cfchartseries>
</cfchart>
</cfif>
</cfoutput>
Таблица стилей таблицы CF CF:
<?xml version="1.0" encoding="UTF-8"?>
<frameChart autoAdjust="false" is3D="false" isInterpolated="true">
<frame xDepth="6" yDepth="6" outline="#333333" lightColor="white"
leftAxisPlacement="Front" rightAxisPlacement="Front" stripColor="#CCCCCC"/>
<xAxis isVisible="true" scaleMin="0" scaleMax="100">
<labelStyle isHideOverlapped="false" orientation="Horizontal" />
<titleStyle font="Arial-12-bold" isMultiline="false" />
</xAxis>
<yAxis scaleMin="0">
<titleStyle font="Arial-12-bold" isMultiline="true" />
<dateTimeStyle majorUnit="Year" minorUnit="Month"/>
<labelFormat style="Pattern" pattern="#,##0.########"/>
</yAxis>
<yAxis2>
<titleStyle font="Arial-12-bold"/>
</yAxis2>
<topYAxis>
<titleStyle font="Arial-12-bold"/>
</topYAxis>
<topYAxis2>
<titleStyle font="Arial-12-bold"/>
</topYAxis2>
<dataLabels foreground="black"/>
<legend isVisible="false" showColumnLegend="true">
<decoration style="None"/>
</legend>
<elements action="" shape="Area" drawOutline="false" shapeSize="20">
<morph morph="Grow"/>
<series index="0">
<paint color="#E48701"/>
</series>
<series index="1">
<paint color="#A5BC4E"/>
</series>
<series index="2">
<paint color="#1B95D9"/>
</series>
<series index="3">
<paint color="#CACA9E"/>
</series>
<series index="4">
<paint color="#6693B0"/>
</series>
<series index="5">
<paint color="#F05E27"/>
</series>
<series index="6">
<paint color="#86D1E4"/>
</series>
<series index="7">
<paint color="#E4F9A0"/>
</series>
<series index="8">
<paint color="#FFD512"/>
</series>
<series index="9">
<paint color="#75B000"/>
</series>
<series index="10">
<paint color="#0662B0"/>
</series>
<series index="11">
<paint color="#EDE8C6"/>
</series>
<series index="12">
<paint color="#CC3300"/>
</series>
<series index="13">
<paint color="#D1DFE7"/>
</series>
<series index="14">
<paint color="#52D4CA"/>
</series>
<series index="15">
<paint color="#C5E05D"/>
</series>
<series index="16">
<paint color="#E7C174"/>
</series>
<series index="17">
<paint color="#FFF797"/>
</series>
<series index="18">
<paint color="#C5F68F"/>
</series>
<series index="19">
<paint color="#BDF1E6"/>
</series>
<series index="20">
<paint color="#9E987D"/>
</series>
<series index="21">
<paint color="#EB988D"/>
</series>
<series index="22">
<paint color="#91C9E5"/>
</series>
<series index="23">
<paint color="#93DC4A"/>
</series>
<series index="24">
<paint color="#FFB900"/>
</series>
<series index="25">
<paint color="#9EBBCD"/>
</series>
<series index="26">
<paint color="#009797"/>
</series>
<series index="27">
<paint color="#0DB2C2"/>
</series>
</elements>
<popup background="#C8FFFFFF" foreground="#333333"/>
<paint paint="Plain"/>
<insets left="5" top="5" right="5" bottom="5"/>
</frameChart>