Show ony positive axis ColumnChart Google - charts

I read now this tutorial fo developers:
https://developers.google.com/chart/interactive/docs/gallery/columnchart
Using object hAxis and parametr direction i try to show only positive axis of my chart.
Also i wanna, that my axis be only integer numbers, now it is 0.5, 1, 1.5
Thanks!

vAxis: {viewWindowMode: "explicit", viewWindow:{ min: 0 }}

The direction option only controls the direction of the axis (left-to-right, or right-to-left), not what values are shown. Use the hAxis.viewWindow.min and hAxis.viewWindow.max options to control the range of values displayed on the axis. Setting hAxis.viewWindow.min to 0 will prevent any negative numbers from showing up.
Keep in mind that the columns are centered on their axis values, so if you have any columns at 0, you have to give them a bit of space to the left of 0 to draw all of the columns. Similarly, they need a bit of space to the right of the max value to fit all of the columns.
By default, the ColumnChart will try to place 5 axis tick marks (which you can change by setting the hAxis.gridlines.count option), evenly spaced throughout your data. This can end up with some rather odd results. Sometimes you end up with decimals in the labels that can be safely ignored (this is especially true when your axis spans a large numeric distance); in this case, you can set the hAxis.format option to drop decimals (eg, '#,###'). If your data spans a smaller range, you might be better served specifying the hAxis.ticks option, which takes an array of values to place tick marks at.

Related

MATLAB imagesc: Use black as mid-color for value 0

I want to use imagesc to plot a quantity where all of positive, negative, and close-to-zero values are important. I want the close-to-zeros to be black, but there is no default colormap that provides such a feature.
For example, using colormap(hot) assigns black to the lowest (in this case: negative) number, which looks bad:
figure, imagesc(Xvalues, Yvalues, Quantity)
colorbar, colormap(hot), axis equal, axis off
Observe that 0 is assigned some unflashy red, which makes the regions of vanishing value hard to see.
Is there any way to use (e.g.) colormap(hot) for the positive values and some blue-ish colormap for the negative values, with both meeting at a black zero?
EDIT: I see that a link to a similar question is posted as a comment to the question here. The answer provided there is much better than mine.
You can make a custom colormap. Colormaps have three columns and any number of rows. Each column represents one color (Red,Green,Blue, respectively). For example, if you want a color map from red to blue you could make one with:
mymap = [zeros(256,2),linspace(1,0,256)';linspace(0,1,256)', zeros(256,2)]
and then use it with
colormap(mymap)
I don't know of an easy way to make black equal zero although one must exist. The best advise I can give you to make that work is to calculate how many rows each color needs based on your minimum and maximum values.

Tableau Control Chart - Attribute measure incorrect

All
I have a control chart, with on the X-axis a time period, and the Y-axis the value of the measure (I'd like to plot all the points in a control chart).
However, I have 2 different values as a measure, which have the exact same date (up to a second match) but different measure values.
When I plot this on a control chart, instead of having 2 points in the control chart with value 500 and 550 for example - it gives me one point with a value of about 200.
It also gives a notification that there is a NULL value in this axis, which points to the X-axis where 2 records have the exact same date.
Any idea what I can do to make this correct - or make tableau draw the measure points correctly?
Thanks in advance!
It's difficult to answer without seeing more detail about your problem, but this sounds like a good candidate for a blended axis. (multiple measures sharing a single axis)
The easiest way to do this is to put your (probably continuous) datetime field on the row axis and one of your measures on the row axis to see one of then control plots. Then drag the second measure to the Y-axis until you see a little translucent two bar icon to indicate that you are adding a second measure to that axis, at which point you can release the pointer and you should see a two plots on the same axis.
If the scales for the two measures are radically different, you can instead drag the second measure to the right side instead to get a dual axis.

Highcharts tooltip multivalues when X is a constant

There are no possibility to see ToolTip on irregular chart when some points placed on the same X line but with different Y values.
actually I expected observe tooltip in that places where mouse positioned and if the graph Point exist in the small radius around. However for the picture above we can observed tooltip only for the higest and pre-higest points, but not for the lowest and pre-lowes points.
Thanks
Yes, duplicated points on xAxis are not supported for (sp)line series. You can use scatter series with lineWidth: 1 instead.

SSRS 2008 - Line Chart - How to shade an area of the chart?

I have a line chart. The line represents the average thickness of material we apply to glass. The Y Axis represents the thickness and the X axis represents time. Say the range of values on the Y axis is between 1 and 10. The average thickness is say typically between 3 and 5, but must fall within a range, on the low side of 2 and on the high side of 7. I would like to shade the area of the graph between 2 and 7, to indicate the acceptable range of values. Can this be done?
Add a second value series, and change it to the "Range" chart type. This will allow you to set the high / low Y values discretely. Rather than choosing a field for these values, just edit the expression and set the static values (in your case, 2 and 7).
From there, edit the series "fill" properties - select Pattern, and find one that works for ya. There a good set of % fills (5 percent, 10 percent, etc.) midway down the list.
Hope this helps.

Core Plot - get data to fill up x axis screen space

My Core Plot is almost finished up but I've noticed an unusual thing I need to change before calling it done. The x axis is scaled properly along the bottom, and the left and right edges indicate the range that I've set. The data, however, is all crushed together on the left side, almost as if the y values are not corresponding to their proper x values.
This image should demonstrate what I mean. You'll notice that the dates run along the bottom, but the actual values don't go past the 6/3/11 mark. They should be all the way to the right.
Link to image
Check the values returned by your datasource. Make sure the x-values are calculated from the same starting date and intervals that you used for the x-axis range and labels.