How to rotate labels in Power BI? - powerbi

I have the following graph, and I want to rotate the X-axis labels in 40°, how can I do that?

PowerBI does not let you override the label orientation but rather adjusts it based on the space you allocate to the visual. Try making your visual a bit wider. For long labels, increase the maximum size of the X Axis on the settings to give more space to the labels and less to the bars. You can also tweak the padding and width settings to eek out a little more space. Also, consider abbreviating long labels.

Under the x-axis switch on the concatenated label. THis should do the trick for you

I went through the same issue/requirement but found no available configuration option for X axis labels. Labels are adjusted automatically based on number of BAR and width of the chart. Anyway, you can look on different options under "X-Axis" after changing the Type to "Categorical" as shown below-

Related

How do I stretch the Y axis in chart.js?

I'm looking to product a fairly small-sized comparative line chart where the actual data values aren't significant (the associated data table always accompanies the chart) but the point of the chart is to visually show the daily/weekly trend.
At full size the graph looks nice.
But when the containing div is constrained to shrink the size, the graph Y-scale shrinks much more in proportion than the X-scale.
What I need instead is something that looks like this.
What am I missing? I can't find any options that affect this.
You can set the maintainAspectRatio option to false in the root of the options object

Horizontal line content is overlapping with axes : Chart.js

I am creating a chart using chart js, putting few threshold lines also in that. But the content/title for those line is overlapping with x-axis if its value is 0 or in negative.
enter image description here
Try to define the option scales.y.suggestedMin. This is a common option to all axes.
suggestedMin: Adjustment used when calculating the minimum data value.
For further information, please consult Axis Range Settings from Chart.js documentation.

Is it possible to develop the line charts with multiple colors in powerbi?

I developed the few Line charts for BMP280 sensor data in powerbi. This is one of the line chart for displaying the temperature value by time and device id.
But I want same line chart with different Color like this below image, whenever temperature value suddenly changes.
Can you please tell me is it possible to develop the Line chart with multiple colors?
If you're willing to consider a vertical bar chart instead of a line chart, you would be able to create a calculation for each row that determines whether the change is significant, potentially by comparing an aggregate of recent measurements to specific thresholds.
Once you do that, you would use this column's value as a legend for your visualization. So if a row has a value of "Significant Positive Change" (or something like that), the bar or bars showing that change can be red.
Your other alternative is to use an R-based visual, of which there are surely examples of this type of visualization. I'll update this answer if I find one that looks promising.
Instead of tending 1 data series, you can split it into 2 data series e.g. one with normal temperatures and one with high temperatures. Then you can just plot these in different colours. Just make sure that the ranges are same i.e. cannot be 'Auto'.

Baidu ECharts2 dynamic chart position based on the legend height

I'm using Baidu ECharts2 to visualise a dynamic amount of series (up to 100) as a line chart.
The issue I face is the legend overlaps the graph in case if the series are too many.
I spent good 2 hours in searching the documentation and reading, but cannot figure out any way to set the graph position (y/y2 top/height).
It seems the chart consists of different elements (legend, toolbox etc), but none of them seems to be the graph itself.
An example I found showcases a fully responsive way to position pie charts, but this is not applicable in my case:
https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/pie-media
I'd be grateful if someone has more experience with ECharts and can tell me way to move the graph down by y and set a height.
Thank you!
Your best option may be to set the legend type to scroll so it fits on one line.
legends.push({
type: 'scroll',
show: true,
data: myData,
...
});
You may also be able combine Ovilia's and Zain's solutions to move the grid down to leave space for the legend. Unfortunately that would require a way to determine the legend's size before setting the chart's container size.
You can set grid position to make it.
In ECharts 2, you may set grid.y, grid.y2, or grid.height.
In ECharts 3, you may set grid.top, grid.bottom, or grid.height.

line-trace tooltip along x-axis?

In v2.0-beta, is there a way to configure the tooltip corresponding to that x-position to show up when hovering anywhere above that point on the axis? for example, the functionality shown here:
https://blockchain.info/charts/market-price
As you trace the line horizontally, you are shown the tooltip corresponding with your distance from the y-axis.
What the tooltip shows in your example is the y value corresponding to the distance from the y-axis (i.e. the x value).
Unless you want to extrapolate between data points (not usually a good idea for data like that shown in your example, since you don't know that its going to follow your extrapolation), this means that you need to have data values for all points where you want to show the tooltip.
With that your question is basically about showing every n x axis labels. https://stackoverflow.com/a/31606933/360067 does this similar for the current stable version of Chart.js. For v2.0-alpha, the option you need to be adjusting is scales.xAxes.labels.template.