I have a SQL Server Reporting Services (2008) chart (error chart). The X-axis has date intervals 1/1/2009, 2/1/2009, etc. The Y-axis has numeric intervals of 50. Values on the Y-axis are 0, 50 and 100. However, instead of displaying 0, 50 and 100 i would like to display "Small","Medium" and "Large" respectively. Does anyone know how this text replacement can be performed?
This is a bit of a hack, but here goes:
First, normalize your values around zero, so the smallest value is -50 and the largest value is 50. You can do this in the chart control itself, no need to change your dataset. Your values are between 0 and 100, so just subtract 50.
Next, under value axis properties -> axis options, set your minimum to -50, maximum to 50, and interval to 50.
Finally, under value axis properties -> Number, select Category as "Custom" and enter this in as the custom format expression: ="Large;Small;Medium"
(that's an excel format code: pos;neg;zero)
You should get something like this:
alt text http://img44.imageshack.us/img44/9011/chartz.png
According to Arbitrary Label for Y axis in SSRS Charts, you can achieve the similar effect by using strip line collection. See How to: Highlight Chart Data by Adding Strip Lines.
Related
I am new to using infragistic controls. I have added a ultraSparkLine to a VB 2017 application. I am doing it using in Area format. It is displaying work being accomplished during time frame. Want I would like to do is add a horizontal line that would show target rate of what is expected as work rate. I see I can have the Trendline but that seems to show average work rate for time frame being displayed.
Is it possible to add a horizontal line at a predetermined value?
There is no build in way to draw horizontal line. However you can use normal range to make something like a horizontal line. First set minimum and maximum to your chart. This will allow you to show the horizontal line above/bellow the spark line. Then set NormalRangeMaximum and NormalRangeMinimum to some very close values. For example if minimum is 0 and maximum is 100 I would set the ranges to let say 89.9 and 90.
As a final touch you can set NormalRangeFill to some brush as needed in your application.
What is the default measurement unit of Excel cell size? Is it Point or Pixel or Millimeter ?
By default, excel cell Row height is 15, what is the meaning of this value? Is it 15 Pixels or 15 Points
By default, excel cell Column Width is 8.43, what is the meaning of this value? Is it 8.43 Pixels or 8.43 Points
If both row and column units are same, then Row height should be smaller than to column width. But the measurement is reverse, row height shows bigger number than column width. In Cell appearance also, row is small than column width.
I need to create box with Height 90 mm (millimeter) and Width 195 mm (millimeter). Please let me know what are values to be put in Row and Column textboxes.
Thanks in advance.
The default units for column and row are indeed different when accessed through the GUI.
The displayed column width in the GUI refers to the Range.ColumnWidth property, where One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used (source). This means as you change the worksheet style, your column width may change too.
The height, however, displays a normal height in points.
In VBA, you can both get both this font-related unit, and the normal point unit for the width. For the height, you can only get the value in points:
Debug.Print Range("A1").ColumnWidth '8.43 characters wide by default
Debug.Print Range("A1").Width '48 points wide by default
Debug.Print Range("A1").Height '12.75 points high by default
Of course, you can calculate a conversion factor between character width and points: Range("A1").Width / Range("A1").ColumnWidth = 5.69 when using Arial, 10 pt. This means that if you want to have a size of 195mm by 90mm, you need to enter 97.0777 as column width, and 255.118 as column height if you're using Arial, 10 pt as normal style.
As per the Microsoft documentation....
You can specify a row height of 0 (zero) to 409. This value represents the height measurement in points (1 point equals approximately 1/72 inch or 0.035 cm). The default row height is 12.75 points (approximately 1/6 inch or 0.4 cm). If a row has a height of 0 (zero), the row is hidden.
Read it more here.
Please throw this link: Microsoft reference
You can change and define this unit manually where pointed in above link:
On the File tab, click Options, click the Advanced category, and under Display, select an option from the Ruler Units list.
So please visit Here Microsoft reference that exactly explain
what you asked.
Above you asked are the pixel width retranslated into character units (based on the Normal font) for display.
I'm not sure this is possible but thought this was the best place to ask.
Is it posible to get the position of a series value on a graph in excel?
For example, if I have a line graph in excel that has time along the x axis, is it possible to (using VBA) get the position of a specific point on that axis.
What I am trying to do is have a vertical line that is can be positioned based on a date entered by the user.
like this
Where the green line could be positioned by entering in a date (rather than just being manually moved) (or also it could be set to automatically move to the current date etc).
I was then thinking that if the position is on the graph is queryable, then I can just access the line object and move it to any position I wanted through VBA.
Any Ideas? or is this just not possible?
The "cleanest" way to do this is to add the line to the chart as a new series. In that way, Excel handles all of the positioning and your work is simplified. To get a vertical line on a chart, there are a number of options. I prefer this route:
Create a small 2x2 area with two dates and two values
Add in the date or x-axis value you want the line at (E3 in image). You can use =TODAY() here or some manually entered value.
Set the second x-axis value equal to the first
Use MAX and MIN on the data to get the values for each date. You can also use 0 and 1 and a secondary axis, but I think MAX/MIN is easier.
Add the data to the chart and format as a marker with straight line.
Formulas
E3: =TODAY()
E4: =E3
F3: =MIN(C3:C27)
F4: =MAX(C3:C27)
Result and chart data series for vertical line
I'm trying to fix a RDLC report chart to show only integer intervals in Y axis (values axis).
The problem is, as soon as values get small, like [1, 2, 4, ...], the axis intervals starts showing decimal values between the whole ones (i.e. it goes [0.5, 1, 1.5, 2, etc.]). Values them selves are calculated as count(x), so it always is an integer value. How can I remove the decimal intervals in the values axis labels?
The report is defined and edited through Visual Studio 2012 native report editor tool and/or XML definition. So I would love to see how it can be changed through that tool or straight up XML properties.
I have found that it is possible to right-click the axis and assign properties to it. But in the end, it seems it isn't possible to achieve what I need through these tools, while keeping the intervals relative to the maximum value. I would have to count the interval externally in the code and pass it as a parameter. Otherwise - no matter what, as soon as the numbers get small enough (with max value at ~ 3-5), the decimals appear.
I've been fiddling with a chart... I set the X axis minimum value to zero. Then I used DataBindXY on the Chart.Series.First.Points to set the values passing two lists (first is a 0-based label list and other has the actual values).
Below is the result. As I highlighted by the red arrow the first column is truncated.
Microsoft made traversing the settings of a chart in the designer as simple as getting out of a maze, so I'm clueless about where to find some offset property to be set.
Edit:
Mine could be a possible duplicate of this question, but its answer is not clear to me, so I asked a new one.
If you set the X axis minimum value to -0.5, that should solve it.
GraphChart.ChartAreas[0].AxisX.Minimum = -0.5;
or try something like:
GraphChart.ChartAreas[0].AxisX.IntervalOffset = 0.5;
The reason is that the columns width is approximately 0.8 depending on the chart configuration so in your case they might span from 0.4 to 1.4, with a center point in 1