Place Bar Charts at specific locations - charts

I'm trying to add an annotation to a bar chart in flutter. But I'm having a hard time setting the annotation's start and end positions to specific numbers other than the labels of my bar chart.
So, here're the main questions:
Does the bar chart need to have 'String' as the domain values (return of domainFn)?
And,
assuming my bar chart labels are all integers values (converted to Strings), how can I specify a double, say, 1.5, as the place where the annotation is placed?

Related

Display Range Axis Value as Alphabet using Jasper Report

I created a new bar chart in which my y-axis value are numerics but as per my requirement, I need to change it with any character. Is it possible to change the value of the y-axis from numerics to Alphabet?
This is my current output of the bar chart.
but I want output like below bar chart.

How to create a stacked bar chart grouped by 2 category

I have a data table, group in 2 category A and B as below
data table
How can I create a stacked bar chart like that
chart
There's not a single built in way to make a chart with bars or columns that are able to split like that.
I think the closest you could do would be to make to bar charts back to back. One would filter for Cat A and the other for Cat B.
The legend for each table could be used or a separate legend could be made from a rectangle and some text boxes. The bars' colors would need to be set otherwise it would Automatically use the same initial color for both.
To make the left chart go in the reverse direction, click on the bottom x-Axis and set the Reverse property to True.
Then Hide the Y-Axis of the Chart B.

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

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

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:

How to set series expression when you do not have any series when creating bar chart in iReport?

I have created a bar chart in iReport Designer 5.1.0. I want to show some ips at x axis and the occurrence of each of these ips at y axis. The bar chart must have a single color but when I run it bars have different colors with each other. I think series expression has to be empty, and I have to put $F{ip} in category expression and $F{occurrence} in value expression, but series expression has to be filled because it is not optional.
It would be great if someone can help me.
In your series expression, using quotes you can just specify something like a name or anything relative to the chart. For e.g,"Ip v/s Occurrence". Basically have a string value in there. This will be displayed as a legend. You would get the chart in single color.
change the orientation again back to vertical. Click the barchart and choose the properties to be orientation:vertical.
Hope thats what you meant