Tooltip type bar at zero value - charts

I use a custom tooltip, and there, with null data, the bar type shows a tooltip with a value of 0, as I understand it, it shows the formattedValue. At the same time, if I use the tooltip from ChartJs, then everything is fine and it only shows the label. What do i do?
I tried turning off the custom tooltip and turning on the standard one. It shows only the label along the x-axis.
I also tried to write a callback label, and in this case I managed to return an empty value, but the point and color are displayed without an inscription, which is also not very beautiful

Related

Display Syncfusion Chart TrackBall at top of Chart

We want to display our TrackBall label at the top of the Graph. We do not want to GroupAllPoints but that appears to be the only way to get the label to appear at the top of the graph.
When we do set LabelDisplayMode="GroupAllPoints" the label ignores the LabelTemplate we have set on the LineSeries. I assume that is because GroupAllPoints covers multiple Series.
How do set LabelDisplayMode to NearestPoint but display that label
at the top of the graph?
Alternatively how do I create a Template that does get picked up
when GroupAllPoints is set. Despite us only having a single point
to display in the TackBall. We'd only be doing this if there was no other way to get the trackball to display at the top of the graph.
Based on your requirement we have prepared a sample for your reference. In which we have achieved your requirement using the "annotation" property in the chart. Please find the below sample, code snippet, and screenshot.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/AnnotationSample-1842581013.zip
Code Snippet:
<ejs-chart id="lineContainer" >
// add additional code here
<e-chart-annotations>
<e-chart-annotation Content="<div id=lineContainer_tooltip></div>" X="90%" Y="1%" CoordinateUnits='#Syncfusion.EJ2.Charts.Units.Pixel' region="Series"></e-chart-annotation>
</e-chart-annotations>
Screenshot:

How to get hex code directly from jscolor?

I'm trying to build a canvas app with color picker using jscolor.
Here are what I've done:
Included the file jscolor.js
Created a button with class="jscolor"
Code for the button:
<button id="strokeCol" class="jscolor {valueElement:'color_value'}" onchange="config.changeStrokeCol(this.jscolor)">
Stroke Color
</button>
When I select a color from the picker I can see the background color of the button changing in developer tool, but in RGB value. Read it somewhere else that I can simply get the HEX by specifying $('element').val(), but in my case it just gives me "" (blank).
The HTML also has no value attribute triggered by the click, not to say being updated. The examples only shows that I can specify a default value (which can't be updated as well).
Have I missed anything? Or has jscolor been updated to provide only RGB value through the background color?
The only workaround I can think of is allowing the HEX code to be displayed inside the button then use .html() to get the value, but it seems so unnecessary.
Problem solved when class is inserted to the
<input> tag. Strange!

How do I customize what is shown for the value inside the stacked bar on a Dojo Chart

Basically I have a dojo stacked bar chart where I have set these value to show the label on the bar:
"labels": true,
"labelStyle":"inside"
The value IS showing up, but i need to customize it by appending additional text to it.
I thought I could do something like the below, but it isnt working, I do not see my method _labelFunc get called:
p.labelFunc = lang.hitch({
self : this,
options : x.options
}, this._labelFunc);
Anyone have any ideas?
I think you're using lang.hitch a little incorrectly. I believe the first argument is supposed to just be the scope (e.g., this) and the second argument is a function or string name of the function if it already exists in the scope mentioned in argument 1.

GWT- Celltable Selection issue (weird selection)

I have got a little problem with Celltables... I'm kind of newbie in GWT so need your help to figure it out =))
problem is quite simple, when I click on a row (or on a checkbox of particular row), this row becomes selected and gets blue , like on this picture :
http://s020.radikal.ru/i706/1311/f1/3de6ae1d0b9f.jpg
Then, all of a sudden (after 2-3 sec) selected row becomes unchecked and uncoloured, but it's selected as you see on a label above, see pic :
http://s57.radikal.ru/i155/1311/6c/4dc4872886d7.jpg
All I want is that it doesn't uncheck and receive default color by itself, I want it to stay in blue. here is the code fragment I use to generate my celltable: http://pastebin.com/HHeJHXpv

GXT 3 spinnerField validation

I want to validate that user cannot change spinner value manually by typing in text box of spinner.
For example a field sales multiple = x which I fetched from server not fix.
and displays a spinner field with limitation of like bellow
spinner.setMinValue = x
spinner.setIncrement = x
spinner.setValue = x
so user forcefully select a value which is multiple with x. e.g. if x=3 the user have to enter 3,6,9... and so on.
So here my issue is if I type a 2 in spinner field text box. GXT widget accept that value.
Posible solutions:
Is there any predefined properties of spinnerfield that i forget to set it?
Is there any predefined validator for this?
Can I set text box of spinner field read only by css so user cannot focus on text box but still change a value.
If none of above how to achieve manually?
i've searched a bit in the different classes and I don't see either a precise method which would set what you want.
Don't know about one, and even with one, a validator doesn't change the value in the input field, but maybe it's enough for your needs.
You can disable the text input by calling setEditable(boolean) on the spinnerfield (testSpinner.setEditable(false);)
Maybe you could search around the IntegerPropertyEditor, I haven't tried but as long as a new Spinner is like this:
SpinnerField<Integer> testSpinner = new SpinnerField<Integer>(new NumberPropertyEditor.IntegerPropertyEditor());
you can seen that there is another Constructor for IntegerPropertyEditor, which takes a "NumberFormat" param, but there is no NumberFormart() constructor, so I'm not sure about how you create your own one, but that could be an idea (to format numbers in the input to be a multiple of the increment).
The last option would be that Sencha forgot this possibility and that you should report this as a "bug" on the forum ?
Hope to have helped a bit, good luck :).