Pentaho CCC Bar chart : displaying a threshold - pentaho

I have a bar chart displaying a monthly ratio (e.g. amount of sales in a country ) : I have the month on horizontal axis and the height of each bar is the amount.
Let's assume that the boss sayed 'the monthly amount of sales must be at least 10000€' : I would like to draw an horizontal line with y-coordinate = 10000
How can I do that?
Thank you

I found a solution : I have had a plot2 with the value of 10000 => that draws a circle ; then, in the post execution, I wrote some javascript in order to replace the circle by a line

Related

add horizontal Line in existing Trend Indicator

I am using the MTrendSqueeze Indicator which is based on a simple moving average value.
I want TradingView to draw a line, once this condition is met:
Barclose divided through current trend indicator value = 50 or less
That means in the example picture it would be:
4,89 / 0.2 = 24,45
It´s less than 50, so draw a line there
MTrend example

CR | Copy data to another row using a formula field or variable

Here is my problem:
Raw data 1
If there is a position 105 and 150, I need the material number of position 150. If there is only position 105, I need the material number of position 105.
On the right side of the picture you can see the correct selected material number.
Now I need to assign this data to position 100 (bc I will use a counter later on, which is depending on position 100).
Here you can see more of the raw data of the report (I can´t insert the complete report here, I use the details area only for testing).
I marked one "group" in which you can see why I can´t change the order of the positions. In this case I need to use position 105 to output the material number (number rightmost on the red border) because there is no position 150.
Raw data 2
Here is another example with position 150 used for the material number (the correct material number will be placed on position 105 every time):
Raw data 3
To use this material number in my following tables, it need to be assigned to position 100.
Thanks!

Unable to display the percentage on the barplot

I have build a codes below to show the percentage on top of the barplot. But while running the code the percentage is not displaying.
Can anyone help me out to get percentage on the top of the barplot.
You can try this.
for p in b.patches:
height = p.get_height()
b.text(p.get_x()+p.get_width()/2.,
height + 3,
'{:1.2f}'.format(height/len(df)),
ha="center")

How to plot column chart with bars for 2 categories next to each other?

I need to draw chart like this one. I have 2 categories, named 0 and 1. I want to plot "age vs amount" etc with 2 categories compared next to each other.
df.groupby(by = df['target']).plot(kind='bar')
but it draws 2 separate charts.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.plot.bar.html
You can find the sub-plot documentation here for making a bar chart like your requirement

Plotting count in Excel

My data is like :
Portfolio Type of Assets Count
Portfolio 1 Type A 10
Type B 5
Type C 7
Portfolio 2 Type A 5
Type B 10
I am trying to plot a Bar graph where the each bar will have Portfolio 1 or similar on x-axis, the count of assets on the bar representing different colors and labels of colors like Red area in a bar represents the Type A assets. How can I plot that, I have tried this for a very long time, but not able to get it. Can anyone throw some hint please?
Click here and watch a YouTude, you will discover select data.