How to add config to many marks in Stacked Column Bar? - vega-lite

I'm using this chart: https://vega.github.io/vega/examples/stacked-bar-chart/
How to add config to marks? How can I display a tooltip and multiple configurations as Mark Style Config? 
This is a double axis, and how to add config to them?

Related

Remove label in Primefaces Line Chart

I have a primefaces line chart that appears between the graph series its values.
I followed the primefaces documentation, but instead of showing the "LinearChart", it shows "CategoryChart"
I need to disable these labels, how do I do this?
Below image of my chart.
line graphic - I want to remove the labels that are embedded in the graph lines
I solved the problem!
There was the following code in my method ...
lcm.setShowPointLabels(true); // lcm is LineCharModel
It made appear the labels in line chart.

Report Builder 3.0, breaking out data field for Bar Chart

I'm using Report Builder 3.0 and trying to figure out if i can break out one datafield with the few values I need for my bar chart. The data looks like this;
[[44278,47411],[{"name":"$41,000/year goal","y":41000}],["",""]]
I want bar 1 to be the 44,278 value, bar 2 to be the 47,411 value and the 41000 to be embedded as a goal. I've attached a screenshot of how we have it working with other grid and charting products, but this is going to be embedded in a much more in-depth SSRS report. Any sort of help would be great as i'm new to the whole SSRS reporting system.
You can do this with a custom StripLine:
Right-click the vertical chart axis and click Vertical Axis Properties.
The axis properties are displayed in the Properties window.
In the Appearance section of the Properties pane, for the StripLines property, click the Edit Collection (…) button to open the ChartStripLine Collection Editor.
Click Add to add a new strip line to the collection.
Click StripWidth to specify the width of the strip line. If your goals will fluctuate, you might want to make it relative to your Goal e.g. =Fields!YourGoalField.Value/100
Set the StripWidthType property to Number.
Set the InvervalOffset value to =Fields!YourGoalField.Value.
Set the IntervalOffsetType value to Number.
More on StripeLines: http://technet.microsoft.com/en-us/library/dd239316.aspx
EDIT To get the Goal Label outside the Chart Area as depicted, we have to do a sort of hack:
Delete the StripLine Title as there is no way to get that outside the Chart Area.
Right Click the Chart and select Add New Title.
On your new Chart Title's Properties Pane
Set the Docking Position to Right Center.
Set the TextOrientation to Horizontal.
Adjust the Font style and color to match your spec.
Set the Caption Expression to =Format(Fields!YourGoal.Value,"$0,000") & "/year goal"
Here is where the hack comes in. In order to get the Goal label to line up with the Goal Line, you need to add a certain number of carriage return/line feeds to your Caption Expression. To do this, append & vbcrlf to the Caption Expression a bunch of times and keep testing until it lines up. You might also want to adjust the DockingOffset property to move the Label closer to the Chart Area.

"Target for each bar in spotfire" or "Combination of line and stacked barChart"

In Spotfire:
In a BarChart is it possible to add small target lines for each bar?
A way around I have done is that I converted it to combination chart and the added a line to show the target points for each bar.
But the problem comes if my Bar chart is stacked by some column. In combination chart we have only "series by" and not color by. i.e. I cant combine a line chart and stacked bar chart.
A related question already asked in spotfire community
I have done this by putting the Category axis column in the Trellis Column axis instead. Then remove the column from the Category axis, so you get one bar for each trellis panel.
Now you can add "Horizontal line from data table" and set it to "One per: trellis panel".

Target reference for each bar in Spotfire

In Spotfire:
Is it possible to show target value reference line for each bar in a bar chart.
A way around that i am doing now is using combination chart. Refer screenshot.
The problem here is that now i can not define a color by property to color bars using rules.
I don't believe you can do it automatically without scripting but here is an example of how to do it by hand.
Right click on your bar chart and go to the Lines & Curves section:
Here you can see I've added 4 lines based on percentage of the data.
You can do this or add lines of set values using the Add button in the top right and selecting Horizontal Line.
Notice I've added the line name as the description of the percentage it is, hovering over will show an actual value so it may better to do this if it isn't clear what the value represents.
This is what it produces:
To make it better match your question I've added 2 more employees and coloured by employee instead, I've also set fixed targets for each person rather than percentages and renamed them to make sure it is clear which line applies to which person in case the colour isn't enough.
Using the Settings -> Appearance section back in the first picture change the colour of the lines to match the fields they represent.
Like I said at the start you should be able to create a script to do this for you but that is another question.

Can striplines be added to a legend?

When adding stiplines to an SSRS chart, they do not appear as part of the legend. Is it possible to add definitions to the legend for the stiplines?
I resolved this by adding an image for a legend.
Yet another approach.
If strip line is not too complicated and could be described in dataset as series, then move it there and get your legend. Target lines limits, thresholds - all could present in chart as series, just put constant values in corresponding fields.