My content node looks like,
* ProductList
* Product Category 1
* Product 1
* Fruits
* Fruit 1
* Colors
* red
* blue
* Product 2
* Fruits
* Fruit 2
* Colors
* green
* orange
In "Fruit 1" content, i need a multi-node tree picker, such that there appears only children of corresponding "colors" node(ie, multi-node tree picker with red and blue). Similarly, multi-node tree picker in "Fruit 2" should display only "green" and "blue". How can i make it work?
I guess it can be done by choosing "XPath Expression", if so what would be the expression to make it work?
please help, thanks
I got it working by using the following datatype "Test" in "fruit 1" ,"fruit 2" etc
Related
I'm developing a BIRT report and this is my situation.
I have one text element, let's say this:
blue square: 111
blue triangle: 222
red circle: 333
At the moment is static, and always displays the numbers you see. I would like to make the numbers dynamic so I created a SQL query and I have embedded it in a dataset. Let's say this is the output:
color shape count
blue square 123
red circle 456
blue triangle 789
I would like to set it up in such a way that each data set row matches the correct row in the text file, so it would become:
blue square: 123
blue triangle: 456
red circle: 789
And will be automatically updated.
I've binded the text element with the dataset and wrote this as a test:
blue square: <VALUE-OF>if (row["color"].toUpperCase() == "BLUE") { row["count"] }</VALUE-OF>
blue triangle: 222
red circle: 333
But when I run the report it doesn't work and the value is blank.
What am I doing wrong?
Thank you all for the help and let me know if you need more info.
You now have a dataset with row[color], row[shape], row[count] to simplify your desired output I would add a "computed column" to your dataset.
e.g. row[output] = row[color] + ' ' + row[shape] + ': ' row[count]
Once you added the computed column just drag and drop your dataset into your report (where you now have the text element) and delete the unused columns.
Tip: if don't know "computed columns":
use Google image search for "bird computed column example"
the Google text search might get you lost in birt forum lists.
Update:
It’s possible you have some typo in your scriptlet. In BIRT a scriptlet resolves to the last expression within itself.
Your scrptlet <VALUE-OF>if (foo) { bar }</VALUE-OF> doesn’t have a last expression. (It's not wrong but BIRT may not "understand" it this way) Try instead <VALUE-OF>var result = ''; if (foo) { result = bar }; result;</VALUE-OF> and format the scriptlet to several code lines with result; as last line. This is the same as if we consider the scriptlet as a function in some programming language and the last line of the function would be return result.
I need to randomly select a single cell from a 5X5 table and change its background color. I would like to do this by choosing a random index location in the table.
I want to do this:
table > tr:nth-child(Random Number between 1 and 5) > td:nth-child(Random number between 1 and 5){
background-color: aqua;
}
I figured it out. Used this:
let selected = document.getElementById("table").rows[Math.floor(Math.random() * 5)].cells[Math.floor(Math.random() * 5)];
selected.id = "selected";
Ideally I would generate the random numbers, one for the and one for the in javascript and then pass the value to the css style sheet.
assign an id to the tds and make an array that contain the ids of these cells choose randomly from the array and change the style color of the cell matching the id
you might need to use javascript
PS if my answer helped you please upvote or choose it as answer if it was what you're looking for
I am trying to calculate total price of any configurable product in magento 2,and I am struggling with it.
Suppose I have two dropdown attribute as following,
1. Paper size
Option Price
A4 1$
A3 2$
2. Color option
Option Price
black & white 1$
colored 2$
Result would have been something like:
If someone selected,
paper size = A4
color option = black & white
total price = 1+1 = 2$
If someone selected,
paper size = A4
color option = colored
total price = 1+2 = 3$
lly,if,
paper size = A3
color option = colored
total price = 2+2 = 4$
But the total price looks something different than i have expected. And there would be more dropdown attribute like this.
Did i make something wrong ? Is there any better way to do it.
Good day !
You can use Bundle product for your requirement.
Steps are:
1. Create a new bundle product
2. select ship bundle item option "together"
3. click "create new option" then "add products"
4. select the products you want to add to the bundle
5. save the product
I am trying to make a dynamic chart in icCube, in which bubbles are sized and colored in accordance with a specific data field in the MDX result set.
Example MDX result set:
(the x/y coordinates have been removed for the sake of simplicity):
amount color bullet size
Swiss 100 #0000FF 10
Spain 120 #FF0000 12
NL 70 #00FF00 7
I do not know how to do this now in the amChart widget in icCube, but I know it is possible to do this in amCharts itself. You can set for example the following attributes in the amCharts editor:
Alpha field, Bullet field, Bullet size field, Description field, Fill colors field, Label color field, Line color field, ... etc (see for more in the amCharts live editor).
Enclosed a sample chart with two series, in which one has colored bubbles:
example
Is it possible in icCube web reporting to do this, and if so, how?
Yes it is possible:
The table should look like this:
In your amCharts bubble widget, add the following in Graph:
"colorField":"color" //the name of the column that contains the colors
and set use mdx colors to "no".
I named my colorField "kleur". Any value here is possible, but it has to be the same as the column name that contains the colors.
Yes you can, just you have to write the following into the "Extra Options" field:
:{
graphs:[{
xField: "your_x_field",
yField: "your_y_field",
valueField: "amount",
bulletSizeField: "bullet size",
bullet : "round",
colorField: "color"
}]
}
Note that, your graphs defined above will be overwritten by this one, you have to specify here all the graph settings.
I have a bar chart in SSRS that has one category group and no series groups. What I would like to know is if there is any way I can have each category show up as a different color, rather than all of them being a single color like SSRS wants to do?
The only way I know of to do this is to hard code the colors for each category in the Values' Properties -> Fill tab -> Color expression:
=IIF(Fields!DISPUTE_TYPE.Value = "Duplicate", "Red",
IIF(Fields!DISPUTE_TYPE.Value = "Eligibility", "Orange",
IIF(Fields!DISPUTE_TYPE.Value = "Corrected billing", "Green",
IIF(Fields!DISPUTE_TYPE.Value = "Additional information - Records", "Blue", "Yellow"))))
The downside is that you have to account for all values else they'll use the last "default" value (yellow in this code).
You could number each type in your query and use that number in a formula to create colors.