I basically have a bar chart showing the score of individuals and I want to add a few line in the chart representing the different levels (i.e. the 65% is pass, 75% is fair, etc) something like this Add a “Target Line” to a Coldfusion 8 CFChart Bar Graph only in coldfusion 10 which supports html format.
Thanks guys,
Use markers. This is how you do it:
"scale-y":{"zooming":true,"thousands-separator":",","markers":
[{"type":"line","range":[1500000],"alpha":"1","line-color":"#ff0000",
"line-style":"solid","label":{"text":"Minimum","color":"#f00"}}]},
Check the example http://www.cfuser.com/library/demos/index.cfm?do=charting&get=barline
Its the use of markers in scale-y using type line and range [ - wherever number you want -]
Related
When I run PCA in WEKA GUI using "Select Attribute", I dont get a complete results instead a partial results with dots at the end.
0.8205 1 -0.493Capacity at 10th Cycle-0.483Capacity at 5th Cycle-0.473Capacity at 50th Cycle-0.261S [M]in Electrolyte -0.256C wt %...
Is there any way to solve this particular issue ?
By default, a maximum of 5 attribute names are included in the generated names.
If you want all of them, use -1 for the -A option (or maximumAttributeNames property in the GOE).
this was originally asked on Google groups but since I received no replies, I'm asking here on SO.
I am plotting basic data like temperature, various counts and such with date time and I like to append a third column as a further description.
E.g.
time, value, description
time, value, description
time, value, description
So I am looking at the simplest way of plotting that, as full screen as possible, as minimally (least LOC) as possible.
So far with https://jsfiddle.net/kaihendry/q1mczqc1/2/ I have not figured how to show the description (is it a infobox/selection? not sure on terminology), which in my example is the kernel version, when I click a point.
Furthermore I don't understand why on the right of the graph there are these null value labels:
http://s.natalian.org/2015-06-16/1434449447_1054x1058.png
And any tips to make http://s.natalian.org/2015-06-16/foo.html scale to fill the whole screen? I especially want to make it usable on my iPhone.
I have not figured how to show the description (is it a infobox/selection? not sure on terminology)
In web development, this is called a tooltip. In Google charts, you can add a tooltip by replacing the commented line with the following one :
//data.addColumn('string', 'kernel');
data.addColumn({type: 'string', role: 'tooltip'});
So, the 3rd column will not be handled as a data series, but as a tooltip.
Furthermore I don't understand why on the right of the graph there are these null value labels
The null values are shown, because (as previously stated), you have inserted 2 series of data ('Date' and 'kernel'). If you make the replacement mentioned before, the null values will be replaced
And any tips to make .. scale to fill the whole screen ?
You can add the following option to configure the dimensions of the chart :
var options = {
chartArea: {width: '80%', height: '80%'}
};
Furthermore, since the version of line charts you are using are slightly obsolete, you shoud replace
var chart = new google.charts.Line(document.getElementById('linechart_material'));
with
var chart = new google.visualization.LineChart(document.getElementById('linechart_material'));
In the following jsfiddle, you can find a final working version
(with some more fixes, like horizontal axis range and legend positioning).
If I understand right you want to add third column as a description for each point.
If you add 3rd column like this
data.addColumn('string', 'kernel');
Google chart takes this as another series and because the data are string it can't draw the series and shows null.
You can add 3rd column as a tooltip.
data.addColumn({type: 'string', role: 'tooltip'});
But for tooltip to work you need to change the line chart to visualization line chart
var chart = new google.visualization.LineChart(document.getElementById('linechart_material'));
To make chart fill the screen you can change the div style.
<div id="linechart_material" style="height:100%;"></div>
I am creating a line graph chart in CF 9.
My cfchart code is below:
<cfchart showborder="yes"
chartheight="500" chartwidth="1000"
yaxistitle="% Correct" xaxistitle="Month"
sortXAxis="yes"
xAxistype="Scale"
showxgridlines="yes"
scaleFrom="1"
scaleTo="110"
showLegend="yes"
tipStyle="mouseOver"
title="Data Entry Audit %">
</cfchart>
Along the X-axis will display the Month Numbers, but it is counting by 2s, instead of 1,2,3,4,5,6 etc.. It is diplaying 0,2,4,6,8. There is data for month of January, so "1", but the 1 does not show up along the x-axis. I tried adding Scalemin=1 and ScaleMax=12, but it seems this is not supported with CF 9. Any help is much appreciated.
Thanks!
How many months are you displaying along the x-axis? Webcharts3D (the underlying charting tool) does a lot of automatic adjustments to ensure the best fit of chart elements. If Webcharts3D is skipping labels, then it may have decided there are too many to reasonably fit on along the axis. So it opts to display every other label instead.
I do not think cfchart has an attribute for overriding those particular settings on the x-axis. However, you can use the webcharts3d utility to customize/override the default settings. Specifically, play around with the xAxis settings in the "basic" tab (type, scale min/max, etcetera).
what is wrong with ratio? (100,200)
https://chart.googleapis.com/chart?cht=p&chd=t:100,200&chs=300x120&chl=Hello|World
As marcog explained, by default values over 100 will be truncated to 100, thus causing your api call to be processed in the background as:
https://chart.googleapis.com/chart?cht=p&chd=t:100,100&chs=300x120&chl=Hello|World
which is why you see a pie chart with two equal pieces. One way to fix this is to add a custom scale to your data series using the chds parameter like this:
https://chart.googleapis.com/chart?cht=p&chd=t:100,200&chds=0,200&chs=300x120&chl=Hello|World
Note I added a &chds=0,200 to specify that values can range from 0 to 200.
Another option is to use percentages rather than actual values
Hope this helps.
The values need to be between 0 and 100, with values above 100 truncated to 100 (reference).
Had a quick mess around with the URL. Is it possible there's meant to be a "total" parameter in the URL? Since 3 parameters just splits it equally into 3 parts...
Is there a way to set the length of a data series using Google Charts i.e. send in 40 values and stipulate that the range is 256 values and have it plot the 40 values and leave room for (256-40) more values in the chart?
To get the idea, think of a finance intraday chart, at 10 o clock it displays only the data that is gotten by that time, but the chart still shows all of the space that eventually WILL get filled (when the trading day is over, that is).
I'd say to get a live preview of the effect to be accomplished here, see finance.google.com and look at the chart before 4 o'clock this afternoon and you'll see that it is not completely filled, although the chart is always the same "size" in terms of datarange.
Fill the rest of the values using the _ (or __ depending on your encoding) special value to indicate "no data".
See the documentation for simple encoding for additional information on this. Text encoding uses negative values to indicate missing data.