How to achieve this kind of heatmap / bar chart with Chart.js - charts

I have to build a horizontal bar with chartjs. I already built a few of them but its a bit different. The chart has 2 labels for the yAxis ("Storm Risk", "Ice Risk") and hours for the xAxes. I have to print out for every hour one of these different options with different colors ("Low", "Medium", "Hight") as ye can see in the screenshot attached.
This kind of bar chart usually the values are represented by the length of the bar and its a bit different.
Any suggestion?.
Thanks

The chart you want to implement is a sort of a "heatmap". As of now (Sep. 2018), Heatmap charts are not supported out of the box by Chart.js. However, you can make one out of a stacked bar chart (in this case, probably stacked horizontal bar chart?): make each stack size equal to one another and each item backgroundColor depending on the actual values being represented. Once this is done, you can override ticks and tooltips using with according callbacks. Legend can be implemented by one more bar chart with sample values and colors.
More details can be found in a related GitHub issue: https://github.com/chartjs/Chart.js/issues/4627
Another alternative would be to use a BubbleChart. The strategy would be similar - you would need to make all bubbles same size, but override their colors. However, provided the look in the question, stacked horizontal bar chart will be more suitable.

Another option for those who are still looking is to use chartjs-chart-matrix https://chartjs-chart-matrix.pages.dev/usage.html plugin.
Example of implementation with Chart.js v3: https://www.youtube.com/watch?v=bi04BgvNY6U

Related

Merging Percentage Lines with The Bars in Tableau Desktop

I have a graph that shows the ratio (count) of payable vs. processed words among the total words on stacked bars. I would also like to display the same ratio in percentages in lines overlapping the bars.
At the moment I have them in two separate graphs, but I want to merge them so that it takes less space in my dashboard view. I am unable to select the dual combination view as it requires two measures and even though I keep trying to cmd+click+drag the percentage measure pill to my marks, it's only changing the calculations in the bars but not allowing me to select the dual combination view.
Since the percentages are basically the ratio of the green/total in the bars, I don't think I need any complicated configurations for displaying it, however, I am also failing to achieve what I want.
Could you please tell me how to do this visualization?
Edit: I noticed that the reason I couldn't generate the dual combination view was that I had three date pills (year, quarter, month), and by removing two of them, I'm able to generate the dual combination view, but it's far from what I'm looking for as it's only splitting the stacked bar into bar+line.
Neeku, I certainly understand the desire to minimize "real estate" in your dashboard. If I understand your needs correctly, I believe that overlaying a transparent-background chart over the first chart might meet your needs, if a dual-axis chart doesn't work for you (for example, if you wanted to overlay a line chart on a column chart that is itself already dual axis).
By way of example, here is a simple Sample Superstore dashboard with a line chart on top and a stacked column at the bottom.
simple dashboard
Change the line chart to "Floating"
Size it to fit over your column chart and change the background to transparent by clicking anywhere in the line chart and select "Format"
...Format Shading
...and "None" for the color selection
Your line chart is now an overlay, but it's pretty messy.
Click on the line chart and hide field labels,
...turn off "Show Header" for each pill in the line chart
Clean things up and it should look better:
Note: one big issue with this approach is that you will not be able to click to select chart elements of the underlying chart.

Tableau: Displaying the each selected measure name in bar chart

I have a bar char report that I created that contains three measure names: 1) Complete 2) Opted In 3) Completion rate. How can I display the measure name below the bar chart similar to the screen shot below from SSRS report that I created. I tried looking for options with tableau environment, but was not successful. Thanks.
The standard color legend will show all three items however, it would look more like:
Note that the standard color legend only shows the color, not the bar versus line. If you need to replace the standard legend with a custom one as you are showing, you can add an image to your dashboard which looks exactly as you desire.

Display color legend on tableau chart

Is there a way to display color legend on the top left side of a chart .
I have 4 charts in a tableau dashboard and if i display all the legends for all the 4 charts on the bottom it looks busy so I want to include the legends in the charts.
Please help me on this with details steps.
What you want is to make the "legend" a floating object instead of the default tiled object.
To achieve this; You can hold down the Shift key, then drag the legend using the left mouse button while still holding down the Shift key. Drop the legend wherever you wish on the dashboard. Make sure you only release the Shift key after you have dropped the legend at your desired destination.
Warning: Depending on the size of the dashboard you selected, floating objects move around when end users view your dashboard on a device with different screen resolution. To avoid this you can use the "Exactly" size option and define a size range which suits your needs.
To include legends on top left Side of the chart.
Follow steps here as under:
Step1:
Select legends, Right Click on legends top part and select floating and place inside the chart on the top part below heading of Graph as :
So you can follow above steps to add legends in all 4 charts.
Output will look like as
So in this way your legends will not be clumsy and you can describe visualization in a better manner.

Change pie chart color in Kibana

One of my uses of Kibana is related to displaying some information in certain cases only (say when a value is unexpected and exceeds a defined range). This element is therefore either shown or hidden from the dashboard, and displaying it could be considered as displaying an alert. I would prefer if the related pie chart was filled in red, rather than the default green.
Any ideas on how to do this?
Assuming you are describing Kibana 3, if you want terms panels pie charts to use different colors, you will need to make a code change.
There is a way to have custom colors for your pie chart. In order to do that you'll need to create a "hits" panel and pick the "pie chart" as the display. The color of the pie slices will be determined by the color that you chose for the queries that they track:

Create a dynamic "cross section" for competence vs. confidence chart in Report Builder 3.0

I have created a confidence vs. competence chart using Report Builder 3.0. Currently the "cross section" of the chart is static and separated by a background image on the chart.
Like this:
However, as a requirement, the cross section needs to be dynamic. I can remove the background image (it isn't needed). I can pass the values for the both the x and y axis into the report when the lines need to cross. The problem is trying to actually implement this on the chart.
Can anyone provide a solution or point me in the right direction?
The cross section is just a line graph (or two) overlayed on your original chart.
Here's an example of overlayed charts:
http://www.sqljason.com/2012/03/overlapping-charts-in-ssrs-using-range.html