PDA

View Full Version : [CLOSED] Graph Tips for multiple bars



registrator
Apr 17, 2015, 5:58 PM
For a grouped bar example http://examples2.ext.net/#/Chart/Bar/Basic/
Can you define tips for each bar?
I have it defined like this now:


.Tips(X.ChartTip()
.TrackMouse(true)
.Width(140)
.Height(28)
.Renderer(r => r.Handler = "this.setTitle(storeItem.get('Month') + ': Invoices: ' + storeItem.get('Invoices'));")
)


Or just have the above tips definition multi line?

Thank you

Daniil
Apr 21, 2015, 12:25 PM
Hi #registrator,

I guess you mean example?
http://examples2.ext.net/#/Chart/Bar/Grouped

Seems there was such a request on the forums earlier with a possible solution.

registrator
Apr 21, 2015, 1:35 PM
Yes the question was mine and I have implemented the example you provided but here I am asking if I can have a tip for each bar separately.
The code I posted creates a tip but it is the same one for all three bars. And since they have different values I would like to have different tips.

Other solution I could use is to have one tip but the values in the tip to be vertically stacked.

Daniil
Apr 21, 2015, 1:58 PM
but here I am asking if I can have a tip for each bar separately.

Yes, I remember such a request. Please search in the forums and let me know if you are unable to find.

registrator
Apr 21, 2015, 2:19 PM
Thank you.
This could be something useful:

http://examples2.ext.net/#/Chart/Misc/ToolTips/

Daniil
Apr 21, 2015, 2:34 PM
Maybe...

Please clarify have you searched in the forums itself?

registrator
Apr 21, 2015, 3:13 PM
Yes, this was in one of the answers.
Shows how to customize tips.

registrator
Apr 22, 2015, 11:17 AM
I have used this example but the grid does not show.


.Tips(X.ChartTip()
.TrackMouse(true)
.Width(140)
.Height(28)
.Layout(LayoutType.Fit)
.Items(
X.Container().Layout(LayoutType.HBox).Items(
X.GridPanel().ID("TipsGrid").Width(420).Height(130)
.Store(X.Store().Model(X.Model().Fields(X.ModelFie ld().Name("name"), X.ModelField().Name("data"))))
.ColumnModel(X.Column().Text("Month").DataIndex("name").Width(50), X.Column().Text("Value").DataIndex("data").Width(40).Align(Alignment.Right))
)
)
.Renderer(l => l.Fn = "tipsRenderer")
)


Can you please look at the above code and see if I have errors in my definition.

Daniil
Apr 22, 2015, 4:46 PM
The piece of code that you posted appears to be configured correctly. Either we are missing something or the problem is inside other code.

registrator
Apr 27, 2015, 7:09 AM
It is correct, thank you Daniil.
The height and width needed greater values. My bad.