Line Chart Pointer color Change - activex

I am using the pointer '+' in my code. In the legend it is displayed in black color.I want that to be displayed as legend color.
If I change the property from editting=>series=>pointer=>default- TRUE it works fine for me.
Can you let me know how this can be achieved through code.
Thanks
Akshay

I'm not 100% sure about your which is your exact question. If I understood correctly you should change pointer's pen color:
TChart1.Series(0).asLine.Pointer.Pen.Color = TChart1.Series(0).Color
A complete VB6 example:
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scLine
TChart1.Series(0).FillSampleValues 10
TChart1.Series(0).asLine.Pointer.Visible = True
TChart1.Series(0).asLine.Pointer.Style = psCross
TChart1.Series(0).asLine.Pointer.Pen.Color = TChart1.Series(0).Color
End Sub
If this doesn't help please provide more detailed information about your requirements.

Related

How to make phone number suggestion show up on keyboard of type PhonePad?

I am trying to get the suggestion of the phone number to show up above the keyboard in the gray rectangle (like it does or email by default), but I am unable to get it to show up. Instead sometimes the email suggestions from the email text field shows up...
How do I do this?
I've tried this:
email_phoneInputField.keyboardType = .phonePad
// email_phoneInputField.returnKeyType = .default
email_phoneInputField.autocapitalizationType = .none
email_phoneInputField.autocorrectionType = .no
email_phoneInputField.textContentType = .telephoneNumber
email_phoneInputField.reloadInputViews()
I figured it out, I used this code:
email_phoneInputField.keyboardType = .phonePad
email_phoneInputField.returnKeyType = .default
email_phoneInputField.autocapitalizationType = .none
email_phoneInputField.autocorrectionType = .no
email_phoneInputField.textContentType = .telephoneNumber
Actually you cannot get the suggestion of phone number by system keyboard.If you really want the suggestion from keyboard, try the third-party keyboard.
————————————————————————————————————————————
I tried what you said and it didn't work for me as like before.I cannot see the gray rectangle in the mode of system keyboard.
There must be something wrong.Could you post a screenshot about the suggestion?

JFreeChart customize BoxAndWhiskerToolTip

I am adding tooltip to Box and Whisker plot.
final BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();
String tooltipformat = "Max: {5}\nQ3: {7}\nQ1: {6}\nMin: {4}\nMean: {2}\nMedian: {3}";
renderer.setBaseToolTipGenerator(new BoxAndWhiskerToolTipGenerator(tooltipformat,NumberFormat.getNumberInstance()));
I get the result below.
Instead of getting the tooltip label in a column, I got it in a row. Why does the \n is useless?
Use HTML will do.
String tooltipformat = "<html><body>Max: {5}<br>Q3: {7}<br>Median: {3}<br>Q1: {6}<br>Min: {4}<br>Mean: {2}</body></html>";
renderer.setBaseToolTipGenerator(new BoxAndWhiskerToolTipGenerator(tooltipformat,NumberFormat.getNumberInstance()));
Because ChartPanel uses a ToolTipManager.sharedInstance(), you can break multi-line tooltips as suggested here and here. As another example, the following changes to BarChartDemo1, seen here, produce the results illustrated below.
BarRenderer renderer = (BarRenderer) plot.getRenderer();
renderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator(
"<html>Series: {0}<br>Category: {1}<br>Value: {2}</html>",
NumberFormat.getInstance()));

TeeChart On Mouse Over a series display a user define Image

My requirement is I want to display a Image box when a user perform a mouse over on a bar in the chart. Currently in mouse over we are displaying the text such as label, Percentage etc can we display Image as well.
Thanks
Akshay
You can use a hidden Rectangle tool to show the desired image and use the provided events to change its visibility, position, or the image loaded.
Ie, using OnMouseEnterSeries/OnMouseLeaveSeries, but the same could be done with OnMouseMove event:
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scBar
TChart1.Series(0).FillSampleValues
TChart1.Tools.Add tcMarksTip
TChart1.Tools.Add tcRectangle
TChart1.Tools.Items(1).Active = False
TChart1.Tools.Items(1).asRectangle.AllowDrag = False
TChart1.Tools.Items(1).asRectangle.AllowResize = False
TChart1.Tools.Items(1).asRectangle.Shape.Transparency = 0
End Sub
Private Sub TChart1_OnMouseEnterSeries(ByVal SeriesIndex As Long)
ValueIndex = TChart1.Series(SeriesIndex).Clicked(TChart1.MousePosition.X, TChart1.MousePosition.Y)
If ValueIndex = 2 Then
TChart1.Tools.Items(1).Active = True
TChart1.Tools.Items(1).asRectangle.Shape.Picture.LoadImage "C:\tmp\ImageForValueIndex2.png"
TChart1.Tools.Items(1).asRectangle.Left = TChart1.MousePosition.X
TChart1.Tools.Items(1).asRectangle.Top = TChart1.MousePosition.Y
End If
End Sub
Private Sub TChart1_OnMouseLeaveSeries(ByVal SeriesIndex As Long)
TChart1.Tools.Items(1).Active = False
End Sub
Edit:
As noticed in the comment below, TeeChart VCL v2014.11 introduced SystemHints property as explained here:
MarksTip tool new property SystemHints (boolean default True in VCL,
False in Firemonkey). When False, a normal TeeShape object is used to
paint the tiptool instead of using the VCL system mechanism.
ChartTool3.SystemHints := False;
ChartTool3.Format.Font.Size:=14;
The only disadvantadge compared to system hints is the shape cannot be
displayed outside the chart bounds.
When SystemHints is False, the new Format property (of type TTeeShape)
contains all the formatting properties (Brush, Pen, Font, etc) to
display the hint.
Since TeeChart ActiveX is a wrapper from TeeChart VCL, you can use this new feature from TeeChart ActiveX v2014.0.0.1.
So you just have to keep in mind to set SystemHints to False if you want to use the TeeShape properties. Here it is a simple example:
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scBar
TChart1.Series(0).FillSampleValues
TChart1.Tools.Add tcMarksTip
TChart1.Tools.Items(0).asMarksTip.Format.Picture.LoadImage "C:\tmp\ImageForAllValues.jpg"
TChart1.Tools.Items(0).asMarksTip.SystemHints = False
End Sub

awesome wm taglist size

Can't find any manual about changing width of taglist element size.
Taglist element is wider than icons I had set. It looks really awful =(
Screenshot: http://s12.postimg.org/fkva7xywd/Screenshot_16_02_2014_16_04_07.png
Taglist element consist of icon, text and gap between them. This gap defined in awful.widget.common.list_update function in line
m = wibox.layout.margin(tb, 4, 4)
Despite you have no text, double gap is still here. To solve this problem you can copy list_update function to your rc file, fix it and send as fifth(!) argument in awful.widget.taglist.
just tell your imagebox not to be resizable, example:
wibox.widget.imagebox(beautiful.clock, false)
or you can even resize you wibox:
mywibox[s] = awful.wibox({ position = "top", screen = s, height = 32 })
you just need to modify height value
or another method using wibox.layout.constraint:
clock_icon = wibox.widget.imagebox(beautiful.clock, true)
local const = wibox.layout.constraint()
const:set_widget(clock_icon)
const:set_strategy("exact")
const:set_height(16)
then, instead of adding your icon to the layout, just add the constraint.

How to define the borders for an entire column with spreadsheetgear?

I know how to define the style of the border for a Cell, like that for example:
Dim border As SpreadsheetGear.IBorder
border = sheet.Cells(1, column).Borders(SpreadsheetGear.BordersIndex.EdgeRight)
border.Color = System.Drawing.Color.Black
border.LineStyle = SpreadsheetGear.LineStyle.Continuous
border.Weight = SpreadsheetGear.BorderWeight.Medium
This is working.
What I want to do now is to define the style of the border for an entire column. Exactly like what I would obtain if in Excel I select the column by clicking on the header and define the border attributes.
I've tried to do it on this range:
border = sheet.Cells(1, column).Columns.Borders(SpreadsheetGear.BordersIndex.EdgeRight)
The code doen't crash, but it doesn't add a border.
Anybody can help ?
Instead of Columns, try EntireColumn:
border = sheet.Cells(1, column).EntireColumn.Borders(SpreadsheetGear.BordersIndex.EdgeRight)

Resources