Vega Lite Repeat Charts and Labeling - vega-lite

See code here
I am working on a prototype dashboard and had fun so far building it with Vega Lite. However, I hit a road block on the following points:
I want to add a P10 and P90 line on all the bar charts. I have followed the tutorial for the single bar chart with line but I was not able to work it with repeat charts.
Adding labels on every single bar similar to this tutorial but could not make it work with the repeat charts
I want to add a second pie chart which will be identical to the one I have except that the values will be multiplied with a constant. I tried a nested concat but it didn't work. The charts disappeared without an error.
I failed to replicate this tutorial for selecting and higlighting and I would appreciate the help
Is it possible to add filtered data tables in Vega or Vega lite?

Check the code here
For adding the line on bar chart, you can provide layer config as an array inside the spec object and provide multiple marks for it.
Similarly, add mark config with value text inside the layer. So, that will help to add the labels.
A similar pie chart is added at the bottom but the values of this pie chart is achieved by multiplying it with a value. For example: 5. The pie chart gets disappeared because it share the same axis or we can say theta config. To fix that you need to add a resolve config. Check the documentation for resolve config.
The selection configuration given in this tutorial has been added in the layer, where the mark bar is provided.
In vega or vega-lite, the data can be filtered using the transform config. Its use is somewhat similar to the calculate config which was used in your code. Check the documentation for filter transform.

Related

Using Anychart to plot volume on the same plot window of stock price

I am exploring AnyChart JS to plot candlestick stock chart. While Anychart.js has a dedicated component to plot trading volume on a second plot window, I am used to seeing volume plotted at the bottom of the price chart window. It just looks cleaner this way. The document does not mention plotting volume like this but that it can clearly be done as demo on one of their pages. ( page here: https://www.anychart.com/products/anystock/overview/ )
So I am wondering if anyone know of an "official way" of plotting volume in the same window of stock price or we have to hack it by plotting a second series (perhaps a third series even so we can show different colour of up and down days).
The source code of this sample is available in the AnyStock gallery. The idea is to create a second series (Volume) on the plot and apply a custom series height and logarithmic scale to it.
Anychart support team provided the source code as per the sample shown in the earlier comment.
You need lines 48 - 67 in the sample -
playground.anychart.com/BVHPxBya – AnyChart Support 2 hours

Is it possible to add tooltips to individual polygons on a map shapefile? (Report Builder 3.0)

I have a report that maps sales to particular postal areas which works great. The only issue I'm having is it's not directly obvious exactly which area is which. The information exists in the file (see picture below) but I'm wondering if there is a way to have tooltips for each polygon that denote the area it represents.
I tried setting the expression for "tooltip" in the map properties dialog to the postal area field of my dataset but that only provided a tooltip for the entire map not the individual polygons. I'm hoping these some obvious property I'm missing or failing that some clever hack that can get the result.
If tooltips aren't possible is there a way to label each polygon? That might be a little too busy on the page but if it's the only option I'd like to give it a look and see if it's workable.
You can set the tooltip for individual polygons in the Map Polygon Properties. This will show up when you hover over a polygon in a report viewer.

SSRS create custom Reporting Maps

I want to to use the InForm-Navigation in a Report by klicking on a custom map.
I.e. I want to create a map that looks like a toy car. If I klick on the dor, I want to navigate to an other Report.
Is it possible to build such a custom map with custom poligons?
Is there a usefull tutorial?
I don"t really know about this but I found that page, may be It could help you : Drawing a logo or diagram using SQL spatial data
Looks like I found the answer:
https://msdn.microsoft.com/en-us/library/ee240815.aspx
It is a maual for "Add, Change, or Delete a Map or Map Layer (Report Builder and SSRS)"

provide custom datalabel to google chart using apps script

I am creating a google scatter chart using google apps script EmbeddedChart Option.
Below is the datatable that I want to assign to the chart.
The first column goes to x axis labels and graph is getting generated for NPP and Noise values.
NPP Noise
-1.28, -7.84625, 2.33
-1.83, -12.561, 4.55
I need to set the datalabels for each scatter point in the graph and its working with setting "datalabel" to "value". But my requirement is to display different text as data labels not the value. Like below, I have added a column datalabel and given the values for each point.
NPP Noise DataLabel
-1.28, -7.84625, 2.33, Spring
-1.83, -12.561, 4.55, Hibernate
Can I display this labels as datalabel on the scatter points?
Code:
var chart = NormalGraphSheet.newChart()
.setChartType(Charts.ChartType.SCATTER)
.setPosition(2, 1, 7, 6) .addRange(normalPlotCalculationsSheet.getRange(tableStartRow,2, noOfCols, 4))
.setOption('series', {0: {pointSize: 14, color: 'red'},1: {pointSize:0},2: {pointSize: 10, color: 'green'}})
.setOption('trendlines', {1: {type: 'linear',color:'blue',lineWidth:2,opacity:80}}).build(); NormalGraphSheet.insertChart(chart);
Okay, so I googled and looked around the community for quite sometime, and managed to see this very similar post, only difference I can see is the data you guys use, the first top answer suggests just adding a Tool tip for each of the data points, which I'm guessing is not what you want.
The second top answer suggests using the Visualization API, which is the same as to this accepted answer from WebApps Community (with a similar concern), though the second answer seems to demonstrate that custom data labels are automatically included when formatted in a specific way:
First column: X axis
Second column: Y axis
Third column: Data label
When looked at in the customization tab via spreadsheets, the value of Data Label is shown as Custom though when trying to manually do a chart, and going to the Data Label drop-down again, it only shows None and Value. So I think, since you are doing the chart via the script, it better for you to use the Visualization API. Hope this helps you somehow. Good luck.

Custom marker types in SSRS maps

I'm trying to integrate my own markers as pointers on my map. The defaults of circle, rectangle diamond etc... are not what I need and I'm looking for arrow symbols instead. Ideally the popular Microsoft wingdings arrows. I'm surprised simple arrows are not on the default list, I'd thought there would be many a need to indicate a rise or fall with any numeric data on a map.
I would like to solve this with an expression to force an arrow icon as a marker, can this be done by using it's character code etc..? I'm using SSDT to design the report.
Alternatively I'll just have to do this in paint and upload via the image import.
Food For Thought
I see they've done a great job in making the map process easy to set up, but when it comes to customisation from the norm it is extremely difficult.
TechNet: Understanding Marker type Rules:
http://technet.microsoft.com/en-us/library/ee240825.aspx
As you can see from the link (Which is one example as not to swarm this post with links) Microsoft make no mention of image upload or Expression input for maps. This I find is one example, the maps are great, but I feel it's difficult to get documented resources to further customise my report.
You'll need to use an image of an arrow for your custom marker, and you will still be able to change other attributes of it (size, transparency, etc).
If you use a custom image marker, you may run into problems where Visual Studio fails to render the map in design mode from time to time - it's incredibly annoying, so I find it best to drop in the custom images as the very last thing I do when building a map (just use a circle marker or something in the interim).