Fusion charts -Pie chart going wrong on zero values - graph

I am using fusion chart for rendering pie chart. In some scenario all the values passing to the graph string will be zero. That is returning the chart in a wrong way instead of showing no data to display.
the following is the graph tag I am using.
Int PendingAmount =0;
Int PaidAmount =0;
"<graph showNames=\"1\" bgAlpha=\"0,0\" numberPrefix=\"Rs. \" decimalPrecision=\"0\"><set name=\"Paid\" value=\"" + PendingAmount + "\" color=\"A4CFD7\"/> <set name=\"Pending\" value=\"" + PaidAmount + "\" color=\"58A1C7\" /></graph>";
This is how the graph is displayed.

I had the similar problem with fusion charts. I would first suggest you to use their latest build. They may have solved this problem.
In my case, I was manually checking for no values or zero values and was in turn, replacing the chart with a simple html text like No data to show.

If you define only the chart element like , then you will get "No Data to Display" error message.
If you define at least one set element, then you wont get "No data to display" error message as there is data to display, but this time zero data and hence zero pie(only the chart canvas) will be rendered.
Hope this helps!

Related

Display cumulative value of each column in balloon text

I built a cumulative line graph using context.cumulativeCol() in the Value field and I am interested in displaying the cumulated value of the current column in the ballon text.
This is what I have, which only shows the value of the column:
I tried to change the default value [[Row]], [[Column]]: [[Value]] from the Ballon Text field and tried to use something like context.cumulativeCol() but I could not achieve my goal.
If it is possible, how am I supposed to do it?
I've just tried to put:
return "Cumulative: " + context.cumulativeCol();
to the balloon function and it worked fine in the latest version. Perhaps you are trying to return a number instead of a string from the balloon function?

How Can I do not display the XRRichText ,if there is no data?

I am using the XRRichText.visible=off if there is no data, but still it throwing some spaces in report. I do not want those spaces if there is no data.
Just want to display none & no spaces . How can I do this?
The upper spaces are just XRRichText.
Set the property ProcessNullValues for the labels with the issue as ‘Suppress and Shrink’.
The purpose of this property value is: If a control receives a null value, it is not printed (without adding blank space in its place).
The property has two more values:
Leave – A control is always printed.
Suppress - If a control receives a null value, a blank space is printed instead.

Using expression and paste in R to format an ion name with units in parantheses

I want to create a clean label to a graph that has the species abbreviation of an ion (in this case Chloride) followed by the concentration units (micro equivalents per liter) enclosed in parentheses. As written, the code mostly produces this, but superscripts the parentheses/units section. Probably missing something small. Using this code snippet with the ylab() command in ggplot2 as a label. Thanks.
My code so far:
cl.label = expression(paste(Cl^- ~(mu~eq ~L^-1)), parse=TRUE)
In the expression, - is an operator so it needs something to "negate." You can give it a phantom object like
cl.label = expression(Cl^-phantom() ~(mu~eq ~L^-1))
or you can treat the - as a literal dash value with
cl.label = expression(Cl^"-" ~(mu~eq ~L^-1))

AvalonEdit reordering of document lines

We have currently started to evaluate AvalonEdit. We want to use it for a custom language. One of our requirements is to reorder and also to sort document lines by a certain criteria. How can this be accomplished?
Thanks in advance!
AvalonEdit provides the ICSharpCode.AvalonEdit.Document.DocumentLine class but this class just provides meta data on the line's length, starting and ending offset and so on.
In my opinion, there are 2 ways to accomplish your problem
Loop through all lines using TextEditor.LineCount and save the Line into a DocumentLine using TextEditor.Document.GetLineByNumber(int number). Furthermore you can use TextEditor.Document.GetText(DocumentLine.Offset, DocumentLine.Length to get the line's text
Use TextEditor.Text.Split('\n') to get all lines as a string array.
I'd recommend you using the DocumentLine method. Even if you have to use the GetText method in order to get the line's text the meta data on the lines is very nice.
To get all DocumentLines you can use a loop
List<DocumentLine> DocumentLines = new List<DocumentLine>(TextEditor.LineCount - 1);
for (int i = 1; i < TextEditor.LineCount; i++)
{
DocumentLines.Add(TextEditor.Document.GetLineByNumber(i));
}

asp.net: explicit localization & combining strings

This seems like it should be a simple thing to do, but I can't figure it out.
I have a localized resource that I'm using in two places - one as a col. header in a datagrid, and then as a descriptor beside a field when the user edits a row.
The text of the label looks like:
Text="<%$Resources:Global,keyName%>"
However, I'd like to add a trailing : to the label - except if I change the above to
Text="<%$Resources:Global,keyName%>:"
then the : is the only thing that shows up! I've tried it with simple strings, so there's nothing special about the colon char that causes this.
Surely I don't have to have 2 different resources?
Have you tried Text="<%$Resources:Global,keyName%>" + ":" ?
You'd basically be concatenating two strings. Or treat them as two strings
StringBuilder t;
t.append(<%$Resources:Global,keyName%>)
t.append(":")
Text = t;
Assuming you need to keep the : together for styling reasons, replace the label with a span:
<%=Resources.Global.keyName %>:
Well, sometimes the obvious isn't so obvious until someone else looks at it:
Text="<%$Resources:Global,keyName%>" /> :
Just move the : outside the label tag, and all is well.

Resources