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).
Related
its been a month since I started using Apache Superset. I have a graph that gives the accuracy of an event occuring on a given hour shown below.
The event occuring is a column named 'prediction' which is either 'Left' or 'Right'. Is there a way to colorize the bars according to the value in 'prediction' column. If the prediction is Left then red colored bar and green colored bar when Right etc. I have checked metadata but I am not sure how I can edit it. Is there a way to achieve this?
I was able to solve it by using the 'prediction' column in breakdown function few days ago. Thank you Kamal for providing an answer as well!
When dynamically filling css grid columns I recently noticed that after column 1000 the remainder seems to be filled in the row direction. See the example below. This leads me to the question:
Is there a maximum amount of rows and/or columns when using CSS grid?
Suggestions of how to get the remainder (from 1001 on) in the next columns are welcome, but are not the core of this question.
The CSS grid seems to have a different column/row limit depending on the browser.
For chrome the limit seems to be 1,000x1,000 as explained here in the answer of Bludev
For firefox the limit seems to be 10,000x10,000, but I can't remember exactly where i read this.
Currently working on a chart that displays upwards ~1000 datapoints at any given moment between 2-3 datasets.
The only thing is that each of the points has a different timestamp (x-value).
Our goal is that upon hovering on one data point, it also brings the closest data point from the other datasets as well. We were able to achieve that with:
options={{
tooltips: {
mode: 'x'
}
}}
I understand that there is a default pointHitRadius and that seems to be the reason why multiple values of the same dataset are appearing in the same tooltip.
I made a simple test case: TEST
I increased the pointBorderRadius and it seems to include 1-5 points at a time.
Is there a way to only include data from each dataset ONCE?
The closest thing I found (before having to extend functionality), is that there is a filter function available.
However, from what I can see, it looks like it only returns one instance from each dataset. Which wouldn't be too helpful.
Anyone run into this issue?
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 -]
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.