Silverlight Visifire Chart Axis Minimum Interval - silverlight

I have a stacked bar chart with Days values displayed on the X Axis that needs to dynamically change it's size.
When I have a small number of points, let's say 2, the Interval value has a small value and instead of seeing only 2 labels on the axis, there are a lot many.
The ideal value would be Interval = 1 (with IntervalType="Days"). But this causes another problem: when the Interval is set like this, in case there are a lot of points and the size of the chart is small, the labels are all displayed because the Interval does not change.
Here are a few screenshots to illustrate the problem:
http://imgur.com/LEFEZjq,seYdvMJ,eVydRNB,Jwvu5s7
Interval left default and enough points (5/31 - 6/10):
http://imgur.com/LEFEZjq,seYdvMJ,eVydRNB,Jwvu5s7#0
Interval left default and small number of points (5/31 - 6/1):
...#1
Interval = 1 and small number of points (5/31 - 6/1):
...#2
Interval = 1 and large number of points (5/31 - 7/29):
...#3
My question is: Is there a way to have both? To set the Interval to 1 but still get rid of excess labels when the don't fit?
My idea was to have Interval be a maximum of 1 and the default calculated value, and I tried to implement it by changing it at the Rendered event, but this doesn't seem to work.

Nevermind.. I just went with a Numeric DataMapping instead of the DateTime one and mapped the AxisXLabel and ToolTipText to the date.
With dates it seems a little buggy but this way it works fine.

Related

Recharts Y-Axis interval issue

I am using Recharts Library for the graph in the ReactJS. There is one strange issue of setting intervals for the Y-Axis. There are few options available "preserveStart" | "preserveEnd" | "preserveStartEnd" | Number. For me, this is not working.
I have attached a couple of screens to showcase what I am expecting and what I get.
Expectation
Actual
Note: Due to the confidentiality of the project, I am not allowed to put the code here. Please let me know if more information is required.
In order to see a given number of ticks on the Y-Axis, you need to use the props tickCount - the number of ticks to show (by default, it's 5).
So you're Y-Axis should simply look like this:
<YAxis tickCount={10} />
The interval props allows you to show only a part of the ticks; '0' would show all, '1' would show half (1 every 2 ticks), etc.

What is the significance of the emitted event.point.index from mousing over a chart?

I am trying to determine the nearest x value of the user's mouse position on a simple line chart. Is there any way to do this?
I have already tried adding a pointMouseOver and pointsHover listener to the chart instance, and, while they emit some kind of index, the number of indices far exceeds the number of x values in the chart (My chart had around 600 x values, the largest index emitted is around 1000).
this.chart.listen('pointMouseOver', function (event) {
console.log(event.iterator.getIndex())
console.log(event)
})
returns some arbitrary index instead of the nearest x value.
Managed to answer my question myself while looking through the charts API reference - to get the nearest x value on pointsHover, call event.point.get('x'). https://playground.anychart.com/api/_samples/anychart.enums.EventType.pointsHover

SSRS Hide one legend from each series

I've been looking around at SO and Google but not really found anything that matches my current problem.
I'm making a stacked barchart based on two series. One series shows late, outstanding issues and one shows only outstanding (still within the due date).
The problem is that my legend shows four individual items, whereas I only want two (one for each series).
I've attempted by adding this in the Series Properties>Legend>Do not show this series in a legend formula (fx):
=IIF(Fields!ReadyForWork.Value = 1, False, True)
This basically checks to only display the legend if the value is 0. However this hides both the items in the legend, not just the one.
The relevant data I'm working with right now is:
TRK_Feature_LKID (basically each row's PK)
DateToBeActioned (important for maroon) - Used to determine if Date.Now() is higher to a set date when the issue should have been resolved.
ReadyForWork - A numeric value (0 / 1) to see if the item is ready for work.
AcountablePerson - The name of the responsible person (x-axis).
In below image I want to remove the red 'Late Issue' and the maroon 'True - ReadyForWork'.
So I managed to fix this by adding a separate field in the report's dataset that basically checked whether the DateToBeActioned was outside of GETDATE:
CASE
WHEN DATEDIFF(day, [DateToBeActioned], GETDATE()) >= 0 THEN 1
ELSE 0
END as 'Outstanding'
And by using that field in the legend as well as specifying that the dataset should only retrieve issues that had not been completed:
WHERE ReadyForWork = 0
I was able to set the legend to only show the two preferred items.
So for anyone who might face a similar issue; one way of fixing it might be to have a seperate field in your dataset that checks the case that checks for the parameters you don't want / you want to show in the legend.

Angular NVD3 y-axis scale

I have an app that creates discrete bar charts. For some odd reason (which seems to be an internal error in the library), the y-axis scales to a data value which has the LOWEST number of integers in the value. For example, one data set has (1750, 1056, 1200, 850). The y-axis scales the maximum range to "850", even though the other numbers are all larger. I've tried using the forceY function, setting the maximum range value to the callback of the data value in my json, but it doesn't work. The problem only corrects itself if all of the numbers in the data set have the same number of integers in the value (i.e. all hundreds, thousands, etc). What is going on and is there a way to fix it??
For reference, here is my plnkr. Go to the "Top 5 SIC by Comments" report chart to see what I mean. The same problem occurs with the "Top 5 Topics by Comments" report chart as well. If anyone has any insight as to how to fix this problem, please let me know. Thank you ahead of time.

SSRS line chart. How to stop numbers from repeating in vertical axis

I have a line chart in ssrs. Whenever the highest line values are 1 or 2 instead of getting a scale of 0,1,2 which is what I want, I get 0,1,1,2,2. This dosn't make sense especially because the number values are not decimals and are unformatted.
Please help.
The Expression for the vertical axis Interval should be below expressions.
If your value is sum
=IIF(Max(Sum(Fields!Item.Value))<20,1,"Auto")
If your value is count
=IIF(Max(Count(Fields!Item.Value))<20,1,"Auto")
Note: I used 20 as the above that the Auto will work good. Make according to your requirement.
Sounds like there is formatting on the vertical axis: That it's actually trying to show 0, .5, 1.0, 1.5, & 2 but after rounding that comes out as 0,1,1,2,2
You should change the vertical axis interval from "Auto" to 1:
I understand that this is quite old post. Still I wanted to reply..
I faced the same issue on column chart when the scale was of small range....
So I used the following expression in axis properties->interval
=IIF(Max(Fields!count_Items.Value)>=6,0,1) - [note: here 0 means - Auto interval]
Hope this answer helps someone. :)
The problem here is not only the interval but also the maximum value of the range that the axis uses. You can set the value for the Interval with this type of expression IIF(Max(Sum(Fields!Item.Value))<20,1,"Auto") but the axis can still make the scale too large. It then tends to fill in with decimals or if you suppress decimals you get repeating integers.
Use a custom code like this:
Public Shared Function AxisRange(ByVal Number As Double) As String
Dim RangeString as String
If Number <=5 Then
RangeString ="5"
Else If Number <=10 Then
RangeString = "10"
Else RangeString = "Auto"
End If
Return RangeString
End Function
In the Maximum value of the range use an expression like:
=code.AxisRange(Max(Fields!Field.Value))
By doing this you force the maximum value of the range to be a similar size to the maximum value in your chart. This solves the problem.

Resources