I have the following data:
1635057. 18 0
1773006. 11 5
1773020. 10 6
1790079. 14 2
1734013. 9 0
1734015. 8 0
1690039. 8 0
1785007. 7 1
1773004. 5 1
I want a SSRS PieCart where each slice is divided into two seperate slices
For example
1773004 would be red with 5 and 1 inside the slice.
Is there a way to do this?
Related
Is there a good way in q to input somewhat large complicated nested dictionaries which represent/will be converted to json? I'm trying to control the echarts javascript library which basically just renders charts based on json config options. What I'm doing now is:
opt.title.text:"my chart"
opt.xAxis.data:til 100
opt.series.data:100?5
opt.series.type:`line
toClient[opt] /serializes and sends to browser
but is there an obvious way to get rid of the intermediate assignment? Is making a function to take key-path/value pairs and turn them into a dictionary the way to go or is there a better way to go about this?
Or is this something that should be avoided in q, and instead just manually set write q to set specific options and handle the json object map in the javascript client?
Not sure if this is really what you are looking for, but you can create the nested dictionary structure directly if that's what you're after?
q)`title`xAxis`series!(enlist[`text]!enlist"my chart";enlist[`data]!enlist til 100;`data`type!(100?5;`line))
title | (,`text)!,"my chart"
xAxis | (,`data)!,0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ..
series| `data`type!(0 1 1 3 3 3 2 2 4 1 3 3 1 4 0 4 4 4 2 4 3 3 4 0 4 0 0 1 0..
The graph consists of more than three million nodes and more than 20 million edges. I'm using igraph package on a 8G RAM linux server. The code is
cliques(g,min=3,max=3)
After six days passed, the code is still running. Is there a better way to find all the triples in a graph?
Following #GaborCsardi suggestion you can see this simple example (I used http://igraph.org/nightly igraph dev version)
kite <- graph.famous("Krackhardt_Kite")
triangles(kite)
which yields:
[1] 4 1 2 4 1 3 4 2 5 4 6 1 4 6 3 4 6 7 4 7 2 4 7 5 6 1 3 6 7 8 7 2 5
for the (undirected) graph "Krackhardt_Kite"
You can compare the results with
plot(kite)
Hope this helps
Here is a problem. I need to find working days between two dates (without weekends). I currently found and was able to successfully use this approach:
SELECT 5 * (DATEDIFF(DateClosed, DateOpened) DIV 7) + MID('0123455501234445012333450122234501101234000123450',
7 * WEEKDAY(DateOpened) + WEEKDAY(DateClosed) + 1, 1) AS TotalResolutionTimeBusinessDays
FROM table1
This is a complex calculation based on a matrix:
| M T W T F S S
-|--------------
M| 0 1 2 3 4 5 5
T| 5 0 1 2 3 4 4
W| 4 5 0 1 2 3 3
T| 3 4 5 0 1 2 2
F| 2 3 4 5 0 1 1
S| 0 1 2 3 4 0 0
S| 0 1 2 3 4 5 0
In the matrix, the intersection of any given x and y value pair (WEEKDAY(#S) and WEEKDAY(#E) yields the difference in work days between the two values. The 49 values in the table are concatenated into the following string: 0123455501234445012333450122234501101234000123450.
This works fine for me but now I need to present difference between dates in another format. E.g.: Let's say we have two dates: StartDate = '2013-06-28 01:27:35' and EndDate = '2013-07-08 16:47:21'. If we use method described above we get 7 working days which is correct. But I need to count all the difference between dates(including hours and minutes) so it could look like
SELECT TIME_TO_SEC(TIMEDIFF('2013-07-08 16:47:21','2013-06-28 01:27:35')) / 3600 / 24
which without weekends should be value like 7.64 days.
Any suggestions how to write a calculation based on that format? Any help would be much appreciated.
I am creating a SSRS 2008 Report
in my report i have 200 columns, it is difficult for visualizing purpose,
is there any way in SSRS by which i can show 20 column per page with row hearer in each page.
ex..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 .....................
2010 5 4 8 7 6
2011 9 7 5 8 9 4 2 5
2012 1 2 4 5 3
2013
can i break to show only 20 columns in first page & reamin 20 second page & show on with column heaer repeat in each page
Thankyou
Assuming that your column IDs are sequential, simply set up a new column grouping as =Floor(Fields!columnID.Value/20) above your existing column ID grouping and set a page break on your new grouping.
I have a txt file which contains a set of 3 Dimensional data points and I would like to create a vtkPolyData based on those points.
In the file, I have the number of points on the first line, in my case they are 6 x 6. And after that the actual coordinates of each point. The content of the file is like this.
6 6
1 1 3
2 1 3.4
3 1 3.6
4 1 3.6
5 1 3.4
6 1 3
1 2 3
2 2 3.8
3 2 4.2
4 2 4.2
5 2 3.8
6 2 3
1 3 3
2 3 3
3 3 3
4 3 3
5 3 3
6 3 3
1 4 3
2 4 3
3 4 3
4 4 3
5 4 3
6 4 3
1 5 3
2 5 3.8
3 5 4.2
4 5 4.2
5 5 3.8
6 5 3
1 6 3
2 6 3.4
3 6 3.6
4 6 3.6
5 6 3.4
6 6 3
How can I build a vtkPolyData structure with a txt file with this data?
It looks to me like you have a regularly gridded series of points, right? If so, vtkImageData might be a better choice. You can always use a geometry filter afterwards to convert to polydata if you really need it that way.
Create a vtkImageData instance.
Set its dimensions to (6, 6, 1) (the third dimension is ignored).
Set its data type to an appropriate type (float or double, I guess).
Call AllocateScalars();
If in C++,
call GetScalarPointer() and cast it to the data type set in 3.
This pointer will point to an array of size 36. You can just fill each point as you would normally.
If in another language (TCL/Python/Java), call SetScalarComponentFromFloat on the image data, with the arguments (x, y, 0, 0, value). The first 0 is the 3rd dimension and the second is for the first component.
This will give you a grid, and it'll be far more memory efficient than a polydata.
If you want to visualize only the points, use a vtkDataSetMapper, and setup the actor's property with SetRepresentationToPoints(), setting an appropriate point size. That will do a simple job of visualization.
Are these examples useful? In particular, this does generation of points and polygons, so it should be possible to adapt. The core seems to be (with lots left out):
# ...
vtkPolyData shell
vtkFloatPoints points
vtkCellArray strips
# Generate points...
loop {
...
points InsertPoint $k $x0 $x1 $x2
}
shell SetPoints points
points Delete
# Generate triangles/polygons...
loop {
strips InsertNextCell $NP2
# ...
strips InsertCellPoint [expr $kb +$ke ]
# ...
strips InsertCellPoint [expr $kb +$ke ]
}
shell SetStrips strips
strips Delete
# ...