Angular chartjs setting options - charts

I've been bumping my head against this all morning.
http://jsbin.com/cutumigexa/1/edit?html,js,output
I cannot seem to set the lineTension (also tried tension) property on the line chart,I always get the bezier default lines.I basically need spiked lines.
Thanks

Silly me,needed this
$scope.datasetOverride = [{lineTension: 0.001}];

Related

Unity editor - How to stop field from turning blue when its edited

I am making a tool in Unity to build your project for muliple platforms when you press a button.
I started with the preferences window for the tool, and came up with an anoying thing. Whenever I change the enum value of the EnumPopup field, the field turns blue in the editor window. Is there a way to disable this?
See how in the 2nd picture the field is not blue, and in the 3rd picture the field has changed to blue? How do I prevent this from happening?
Thanks in advance!
Difficult to help without having the rest of your code.
This is Unity built-in behaviour. I tried a lot of stuff see here to disable / overwrite the built-in coloring of prefix labels but had no luck so far.
A workarround however might be to instead use an independent EditorGUI.LabelField which will not be affected by the EnumPopup together with the EditorGUIUtility.labelWidth:
var LabelRect = new Rect(
FILEMANAGEMENT_ENUMFIELD_RECT.x,
FILEMANAGEMENT_ENUMFIELD_RECT.y,
// use the current label width
EditorGUIUtility.labelWidth,
FILEMANAGEMENT_ENUMFIELD_RECT.height
);
var EnumRect = new Rect(
FILEMANAGEMENT_ENUMFIELD_RECT.x + EditorGUIUtility.labelWidth,
FILEMANAGEMENT_ENUMFIELD_RECT.y,
FILEMANAGEMENT_ENUMFIELD_RECT.width - EditorGUIUtility.labelWidth,
FILEMANAGEMENT_ENUMFIELD_RECT.height
);
EditorGUI.LabelField(LabelRect, "File relative to");
QuickBuilder.Settings.Relation = (QuickBuilder.Settings.PathRelation)EditorGUI.EnumPopup(EnumRect, QuickBuilder.Settings.Relation);
As you can see the label is not turned blue while the width keeps being flexible
Sidenotes
Instead of setting values via edito scripts directly like
QuickBuilder.Settings.Relation = you should always try and use the proper SerializedProperty. It handles things like Undo/Redo and also marks the according objects and scenes as dirty.
Is there also a special reason why you use EditorGUI instead of EditorGUILayout? In the latter you don't need to setup Rects.
EditorGUILayout.BeginHorizontal();
{
EditorGUILayout.LabelField("File relative to", GUILayout.Width(EditorGUIUtility.labelWidth));
QuickBuilder.Settings.Relation = (QuickBuilder.Settings.PathRelation)EditorGUILayout.EnumPopup(QuickBuilder.Settings.Relation);
}
EditorGUILayout.EndHorizontal();

Bar chart goes below zero line ios-charts

I have following question, today i updated the 'charts' pod in my project and suddenly the chart is drawn wrong. I mean the bars are going below zero, and not starting at the zero line.
and before the update it looked like this:
(i know the second image is a grouped barchart)
but my problem is that in the new version the bars start at the bottom of the chartview, and in the old they started at the zero line.
i read that this was a bug in the old version and that it should look like this. Is it possible, to have the buggy design back because i liked it, or is it not supposed to look like this?
i tried using axisMinimum = 0 but that only moved the zero from the yAxxis to the bottom.
groupedBarChart.xAxis.labelPosition = XAxis.LabelPosition.bottom
groupedBarChart.chartDescription?.text = ""
groupedBarChart.backgroundColor = UIColor(red:0.980, green:0.898, blue:0.498, alpha: 1.000)
print(groupedBarChart.leftAxis.axisMinimum)
groupedBarChart.fitBars = true
this is the code i use to customize the chart.
Im looking forward to your answers and thanks in advance.

Change line behavior of a combined chart in SAPUI5 VizFrame

I am using a combined chart (Stacked Column + Line) for my application. Is it possible to change the line plotting?. (somewhat like shown in RED in the image). If yes then how is it possible?
I'm sure you already know the VIZ documentation where you can find all possible properties of VizFrame. As far as I know there currently is no way to get the behavior you're asking for except for writing your own lineRenderer (vizProperties.plotArea.lineRenderer). There is one alternative line plotting mode available which is smoothening it but I'm sure thats not what you want.
However you could use a second series of column chart instead. Just use a standard column chart and add two data series instead of one. I think this would show the exact information you're trying to get with the current diagram just no connection between them.

Controlling the display range in a history' chart in the BCG library

I am asking to the StackOverflow for the first time.
If I rude to you, Tell me it. I will fix it.
Thank you.
Asking...
In the BCG Library. Using Visual Studio 2012, MFC.
I want to control the display of data range in the chart of historical.
When I call below functions.
CBCGPChartAxis::SetFixedMaximumDisplayValue
CBCGPChartAxis::SetFixedMinimumDisplayValue
CBCGPChartAxis::SetScrollRange
CBCGPChartAxis::EnableScroll
CBCGPChartAxis::EnableZoom
CBCGPChartAxis::SetAlwaysShowScrollBar
The chart just worked once.
And then, The chart seemed calling CBCGPChartAxis::SetAutoDisplayRange() automatically.
In other words. I don't want to call CBCGPChartAxis::SetAutoDisplayRange() automatically by the chart.
controlling the display range in a history' chart.
As far as I can see in the source code this function is called from serveral places. Maybe the easiest method to block this function is to call CBCGPChartSeries::ReplaceAxis and replace the automatically created axis with you implementation, that may ignore SetAutoDisplayRange.
If this doesn't help or as a method for further investigation:
Set a breakpoint and look into the callstack to see who calls this function and when this function is called. Again: As far as I understand the source code the function is called automatically when something changes in the chart.
CBCGPChartAxis* pXAxis=***;
pXAxis->EnableScroll();
pXAxis->EnableZoom();
pXAxis->ShowScrollBar();
pXAxis->SetFixedUnitCount(20,1);
20 means the totle number of V grid line in every visible range and 1 menas there is one point in a single range of every grid.
Might be your wanna.

Right aligned EntryElement

Any sample on making EntryElement align to the right?
I can't figure out how to inherit/override the EntryElement.
Thanks,
Mojo
This looks near identical MonoTouch.Dialog: Setting Entry Alignment for EntryElement
See my own answer about overriding CreateTextField.