Is there a way to represent each model of device in stack for each category column differently? Using Echarts.js - bar-chart

I want to represent, for example: Apple is brand and it has categories like iPhone, iPad ... and each category has different device like iPhone 12 Pro, iPad pro, iPad air ...
and I want to represent them in stacked on each column, This is what I want to do
-> And -> And I have this Here I put category iPhone as total amount of cost of (iPhone 12 Pro, iPhone 13 ...)
I want this kind of bar chart

Sure you can, here's an example:
https://echarts.apache.org/examples/en/editor.html?c=bar-y-category-stack

you can check this,
https://apache.github.io/echarts-handbook/en/how-to/chart-types/bar/stacked-bar/
you must insert the same value of stack variable. if at the first data you add value stack of variable is 'x', you must add same value at the second data.

Related

SSRS - Return to the line with column group

I've got a problem about SSRS design.
I need to make a report to display a list of item size.
I need to have 1 line per item with all the size of this item (and the quantity) on the same line
SSRS Design
The "Row group" have a grouping on the "Item No" field.
Actual result
Expected result
How can you put line 2 back to the beginning?
Thanks everyone for your help !
Data :
Item No
Size
Qty
1896-S
T32
4
1896-S
T34
3
1906-S
T32
2
1906-S
T34
4
1906-S
T36
5
You can do this easily with a matrix control.
Drop a Matrix control onto your report and then drag Item_No to the 'Rows' placeholder, Size to the 'Columns' placeholder and Qty to the 'Data' placeholder.
this will will give you a basic matrix, the design looks like this...
And it will look like this when rendered..
This is not quite what you wanted but we can soon change that.
All you need to do is change the expression in the 'Data' cell from [Sum(qty)] to something like this ...
=FIRST(Fields!Size.Value) & " " & Sum(Fields!Qty.Value)
Now when we render we get this...
If you want to put line breaks in etc then you can just edit the expression to suit. Alternatively you can use placeholders in the cell to have even more control of the layout and formatting.

Max Number of Columns in Bar Chart- Oracle ADF

I use JDeveloper 11.1.2.3.0
I want control Bar Chart columns Number not Want it Display all values at
selected column just want display first 10 columns .. without change any thing in viewobject Query
Can I do From bar chart properties ?? and if yes .. from where ??

Windows 8 Store App using HTML/WINJS winjs.ui.listview clustering data items

i have created a Winjs.UI.ListView(with Binging in GridViewtemplate: some images and titles) and everything is OK But i would like de clustering(make groups of )my items close to each other and the others in the next Column of the listView .
I will be thinkful if anybody has an idea or some portion of code.

Drawing a bar chart, but with some restriction

I want to draw a chart in linux like this:
1################# 64.85
2################### 72.84
3####################### 91.19
4####################### 91.61
5########################### 108.66
6############################ 110.69
7###################################### 149.85
8####################################### 156.60
9########################################### 169.81
I want to do that in python, of course you noticed that I don't want code like:
for i in data:
print "#"*i
because data may contain big numbers, so it is not nice to print "#" milion times.
So what is the mathematical equation that I must use to do this, I think this is a kind of mathematical problem
Thanks a lot
You have to work with percentages I think sum up all you values and then you do bar value / total of bar values
So if I have the following values 1 2 3 6 the total will be 12 so then
i will do 1 / 12 the percentage will be 8 so you print '#' 8 times and so on.
then the max # you can print is hundred.
I don't know if this is what you want, but hope this will help.

SSRS - How to build a simple multi-column report?

I am using SQL Server 2008 and I want to show 1 single field from a table in multiple columns in the report. Just like if I were to print labels. How can I achieve this?
Example:
Instead of printing:
Names Report
Andrea
Austin
Barbara
Bob
Bruno
Cathy
Chis
...
I want to print in columns (say 3 fixed columns):
Names Report
Andrea ---- Bruno ---- Darren
Austin ---- Cathy ---- Francis
Barbara ---- Chis ---- Gabriel
Bob ---- David ---- Gerald
....... ---- ....... ---- .......
Edit: If I run the report and click on "Print Layout" button, I can see multiple columns. Can I set this mode as default?
For Horizontal layout of labels...
One choice is to use the columns property on the report or body elements.
This doesn't always display correctly On reportviewer. I've noticed that even if it displays correctly on your IDE and when you export to PDF. In the report viewer it will display only one column. Also it snakes the labels top to bottom then left to right.
One choice is to use a matrix and group on every 3 rows (if you want 3 columns).
This one is a little complicated.
My solution of choice is to put 3 vertical lists on the page. put the same label in each list. Return the row number in your dataset. Then just filter each list on modulo 3
For example
Result set
RIndex Fname
1 abe
2 burt
3 fred
4 george
Filter expressions
list 1 -> =Fields!RIndex.Value mod 3 = =1
list 2 -> =Fields!RIndex.Value mod 3 = =2
list 3 -> =Fields!RIndex.Value mod 3 = =0
Result
Abe Burt Fred
George
The method I use is a bit similar as what Vern suggested but differs enough to make it worth mentioning here.
You can combine the ROW_NUMBER with the modulo (%) operator directly in the query to fabricate the column number in which the record should get displayed. Here's an example that generates one while taking a group into account:
declare #numberOfColumns int = 4;
select dpc.EnglishProductCategoryName, dp.ProductAlternateKey
, (ROW_NUMBER() OVER (
PARTITION BY dpc.EnglishProductCategoryName
ORDER BY dp.ProductAlternateKey) + #numberOfColumns - 1) % #numberOfColumns + 1
as DisplayColumn
from dbo.DimProduct dp
inner join dbo.DimProductSubcategory dps on dps.ProductSubcategoryKey = dp.ProductSubcategoryKey
inner join dbo.DimProductCategory dpc on dpc.ProductCategoryKey = dps.ProductCategoryKey;
To get this displayed I'm using nested tables which are then filtered on DisplayColumn.
Have a read through following article for all the details: Creating Multiple-Column Reports
Use the 'Report' menu in Visual Studio and select 'Report Properties'. You can set columns in the 'Layout' tab.
Try this msdn article about newsletter-style reports for more details: http://msdn.microsoft.com/en-us/library/ms159107.aspx
This method does have a limitation though so in some cases it might not be applicable:
Only PDF and Image renderers support
newsletter-style reports.
EDIT:
So one approach is to use multiple tablix with a filter that checks RowNumber and accordingly displays particular records in each table.
The other way is called Newsletter-style report (link). This formatting is retained only when report is exported as PDF or Image. It can be previewed only when you select 'Print Layout' on the Preview tab in Visual Studio. Here is an example:
Create a new report with the foll. dataset: SELECT ID,NAME FROM TABLENAME
Add a new table to the report and select the ID and Name as columns
Click on the tablix and press F4 to edit the tablix properties. In the properties window, change the Size - set the width to 2in
Click on the report area outside the report page boundary and press F4 to edit the report properties. In the properties window, change the Column value to 3, and column spacing value to 0.1
On the report scroll to the right hand side, you will notice that there are 2 new columns (so totally 3 columns on the report - because you selected 3 in step 4 above). Now click on the margin at the start of the column 2 and pull it further to the left to bring it as close to the column 1. This is only to reduce the need for huge page size.
Right click on the report area outside the report page boundary and select Report Properties. Change the Page Size - Set the width to 10in
Preview the report. Now select the 'Print Layout' tab to see the result. This formatting is retained only when report is exported as PDF or Image.
As noted in points 5 and 6 - since the report body flows into multiple columns, you must ensure that the page size is at-least equal to -> ([Original report body size times the number of columns] + all the column spacing values). Otherwise it will look messy.