Difference between `ChartScrollbar` and `ChartScrollbarSettings`? - amcharts

In AmCharts documentation,both ChartScrollbar and ChartScrollbarSettings have same properties and looks like they bring about the same feature for the stock chart.Any significant difference between them?
http://docs.amcharts.com/3/javascriptstockchart/ChartScrollbar
http://docs.amcharts.com/3/javascriptstockchart/ChartScrollbarSettings

Ok, so it seems like the ChartScrollbarSettings do not work like the other settings:In a StockChart a global scrollbar is added by default. It does not matter if you're using the ChartScrollbarSettings for settings properties, or not. It will be created unless you're using:
ChartScrollbarSettings: {
enabled: false
}
In the panels you can still add local scrollbars using ChartScrollbar (Panel control is AmSerial). They work only for the panel they're inside.

Related

Change VS Code debug console font color?

For whatever reason, the font color of my debug console is a blue which makes it really difficult to read. I'm not sure if this is due to vs code settings or maybe project settings as, when I put a break point and evaluate expressions, the font color is a readable white. How can I change this output color to something more legible? See image below:
You need to change your setting in VS Code's setting.json. The required property is
{
"workbench.colorCustomizations":
{
"debugConsole.infoForeground": "#ffffff"
}
}
This setting will change the color to white. You can of course change it to any other color you would like to.
There are other properties as well, like debugConsole.errorForeground, debugConsole.warningForeground, etc. which you might want to change as well. All of these properties are inside workbench.colorCustomization
If you'd like to make use of full colour log output in the 'Debug Console' window then add the following property to your debugging spring profile:
spring.output.ansi.enabled=always
Alternatively, add it to your debug configuration vmArgs:
"vmArgs": [
"-Dspring.output.ansi.enabled=always"
]

Xcode-like Navigator control

What type of control is this? Some sort of Segment control but without borders? It works like a menu in that you can mouse down and drag... it will highlight as you drag and pick the one you release on.
How can I do something similar?
The big difference I need is to allow multiple selection which will show different sets of details in the area below it. I can do this with a series of NSButtons, but don't get the drag-over "menu" effect.
Ideas?
In the past, I have come across two example of implementation of Xcode-like inspector views:
https://github.com/malcommac/DMTabBar
https://github.com/smic/InspectorTabBar
Some time has passed, so they seem to me more the style of Xcode 4, but they should be ready to adapt to the new appearance.

Variables for colors in interface builder

I have a project that I need to change overall color themes in the app. A lot of my UI elements are built through Interface Builder in Xcode 6.1. I need to set colors as variables in interface builder, so if I set a preprocessor telling the app to use a certain scheme then the colors will change in interface builder. Is this even possible?
I'm not aware of any way to do this with interface builder, however there is a way that you can set appearance properties in code for many IOS UI elements that will then apply globally. As an example see the following snippet of code:
UIToolbar.appearance().tintColor = UIColor.whiteColor()
UIToolbar.appearance().barTintColor = UIColor.blackColor()
UITableView.appearance().separatorColor = UIColor.grayColor()
UITableView.appearance().sectionIndexColor = UIColor.grayColor();
UINavigationBar.appearance().tintColor = UIColor.blueColor()
UINavigationBar.appearance().barTintColor = UIColor.blackColor()
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.whiteColor()]
The code sets a the default tint and bar color for all the UIToolbars, separator and section index colors for all UITableViews, and appearance properties for all the UINavigation views in my app..
You could use #if to set the appearance differently depending on the environment variables set in the compiler.
If you want to find out more about how this works Id suggest reading Apples documentation on UIAppearance properties here:
UIAppearance Documentation
Color variables are awesome, I wish xcode had this too.
Turns out you can add a color variables feature.
This xcode plugin, called Suggested Colors, let's you build and use a palette of colors in Interface Builder. It uses a plist file, So I think you could read that in code and have a color palette shared between code and IB this way. Looks promising. Unfortunately, doesn't seem to work on xcode 6.3.2. Hope it gets fixed.

Setting default color in Windows Forms

I'm creating a simple GUI using Powershell and Windows Forms for a set of scripts I have written.
I've generated a bunch of buttons in the GUI and I'm currently in the process of adding styles to my buttons.
$Button1 = New-Object System.Windows.Forms.Button
Is there anyway to set the below set of lines as a global/default setting of sorts for all buttons?
$Button1.Cursor = [System.Windows.Forms.Cursors]::Hand
$Button1.BackColor = '#CCCC99'
$Button1.Font = New-Object System.Drawing.Font("Verdana",10,[System.Drawing.FontStyle]::Bold)
To give you an idea, what I'm doing now is adding the block of text for every button.
$Button1.BackColor = '#CCCC99'
$Button2.BackColor = '#CCCC99'
$Button3.BackColor = '#CCCC99'
etc...
I'm pretty sure there's a better and more efficient way to do this. Can anyone point me to the right direction?
I expect all buttons to look pretty much the same.
Thanks in advance.
You could loop through all of the buttons after they have been created and set their properties, like TheMadTechnician suggests…
But there is a better way. Think object-oriented programming. You have a Button class, and you want to change its default properties. In fact, you want all of your buttons to have those new properties. So really, what you want is a custom control that is like a button but slightly different.
Well, what do you know? There's a linguistic way to express that:
public class MyBeautifulButton : System.Windows.Forms.Button
{
public MyBeautifulButton()
{
// Set default properties here...
}
}
You can even go one fancier and override the specific properties, setting the appropriate attributes, to change their default values.
Then, instead of creating System.Windows.Forms.Button objects in your PowerShell code, you will create MyBeautifulButton objects.
Although I must say that I don't think the result will be terribly beautiful. The BackColor property of a button is one of those that I don't think should have ever been provided. Button controls are designed to be drawn using the system theme, which specifies the colors for you. It also allows the users to customize the colors as desired. Application-specified colors usually result in a visually jarring and downright ugly UI. Don't let your app stick out like a sore thumb. Buttons are utility controls. Consistency is key. Remember that GUI applications are not web pages.
Why not just apply that to all buttons after you add them to the form? Something along the lines of:
$MyForm.Controls | Where{$_.GetType().Name -eq "Button"} | ForEach{$_.BackColor = '#CCCC99'}

Show tooltip programmatically in StockChart for multiples series (highchart)

I'm working on a stockchart and i would like to show the highstock tooltip programmatically as asked here.
I managed to solve this problem but now, my goal is to show the tooltip for all series (the same behavior when i select a point with the mouse - please check this example).
Is that possible?
Here the key code (more code):
xchart.tooltip.refresh([xchart.series[0].points[i]]);
//DOESN'T WORK
//chart.tooltip.refresh([chart.series.points[i]]);
//DOESN'T WORK ALSO
//chart.tooltip.refresh([chart.series[0].points[i]]);
//chart.tooltip.refresh([chart.series[1].points[i]]);
Just enable sharing for tooltip. And refresh both series's tooltip by giving the points of array that you want to show on the tooltip.
tooltip : {
valueDecimals : 2,
shared: true
}
xchart.tooltip.refresh([xchart.series[0].points[i], xchart.series[1].points[i]]);
http://jsfiddle.net/cf7wq/5/
And seems like showing two different tooltips without sharing is not possible through only api itself.
http://highslide.com/forum/viewtopic.php?f=9&t=12670

Resources