I'm using the latest version of the library and I can't get the HorizontalBarChart to draw the value above the bar, even after setting mChart.setDrawValueAboveBar(true) and invalidating the chart. Is this a bug or Is there a way to make this work?
Layout
<com.github.mikephil.charting.charts.HorizontalBarChart
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/expectativa_mensal_FEM"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.github.mikephil.charting.charts.HorizontalBarChart>
Code
mHorizontalChart.setDrawValueAboveBar(true);
mHorizontalChart.invalidate();
setDrawValueAboveBar() only sets the location of where you want to draw the values. Try using the method setDrawValues on your dataset and giving it a boolean value of true - I believe this will make your values appear.
dataset.setDrawValues(true)
Related
I get this validation message
If a VkSampler created with magFilter or minFilter equal to VK_FILTER_LINEAR and compareEnable equal to VK_FALSE is used to sample a VkImageView as a result of this command, then the image view's format features must contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
But I can't see how to set the image view format features. Any ideas?
The message is telling you that you're using a linear sampler (magFilter or minFilter is VK_FILTER_LINEAR) to sample from an image view whose format doesn't have the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT feature.
There are two ways to fix this:
Use a different sampler. If you don't need linear filtering, you can use a point sampler instead.
Use a different image view format. If you need linear filtering, you can use a format that supports it.
Images can be displayed at a specific location with the DisplayAt() command.
Does anyone know the valid range?
For example, DisplayAt(-9000, -9000) is that valid? What is the total valid range?
Of course in the example the image would not be seen within the GMS frame, but that is exactly what I need.
Thanks
Yes, negative values are completely ok and will indeed "place" the image outside the visible range of the window.
There is nothing like a "valid" range - the coordindates are just numbers. ( There is likely a limit when the value exceeds the value-range of the internallly used variable type to store the coordinates, possiblye long (4 byte signed integer). )
Just be aware that concepts like "front most" window will also apply if an image is outside the "visible" range. Images will f.e. also show up in the ImageBrowser regardless of their position on the workspace. The same is true for iterating through images on a workspace using f.e. CountImageDocuments() and GetImageDocument()
Some commands ( I think ShowImage() ) might have addtional code to ensure that images stay "visible" and might therefore shift the image back into the workspace range. Also using "auto-arrange" will take images from the "off" and place them back into the visible range.
So if you deliberatly use "off-screen" display, this is ok, but it might create some unintended side-effects. What is the exact purpose of using it this way? There might be more suitable concepts. (f.e. one can create imageDocuments and add ImageDisplays to them without the need of showing the imageDocument.) Image may also be temporarilly "hidden". Finally, one might condiser shiftung "unwanted" images onto a separate workspace.
I work with deeplearning4j and created INDArray of quite big size. Into that array I write some values. If I try to see those values in debugger, initially I see zeros, and only for data at FloatBuffer I see entered values. See the screenshot.
If to debug the code of XorExample in deeplearning4j such behavior I didn't notice:
Is there any way to always show or always hide values that sit inside of INDArray without shoving zeros? Or it is some kind of bug inside of idea?
By default debugger evaluates and shows toString() defined in the NDArray class (or BaseNDArray in your case). You can replace it with your custom renderer for this type. The easiest way is to right click on a variable -> View as -> Create...
Or go to File | Settings | Build, Execution, Deployment | Debugger | Data Views | Java Type Renderers.
Then put your requred expression into "When rendering a node" expression.
When I move my mouse to a row in tree view and stay here for a second, I want to see a floating window. (Like in developer mode.)
How Can I solve it? Any idea?
When you declare your field or fields that get rendered on a listview make sure you give to the __init__ method the help='My Floating Test' argument. That will cause a floating window to be shown when you hover on that field.
For example check:
addons/account/models/account.py
tag_ids = fields.Many2many('account.account.tag', 'account_account_account_tag', string='Tags', help="Optional tags you may want to assign for custom reporting")
The string on the help attribu will be shown on all the views that render this field upon hovering on it and pausing for 1 second.
If you want to modify the window that is shown, you can extend the
t-name="WidgetLabel.tooltip" template that is located in addons/web/static/src/xml/base_common.xml
I am trying to convert a user input to a percentage using aurelia converter and Numeral.js.
Here is the gist: https://gist.run/?id=5bbfa902b1d14bff6f506dfcf2045370
The conversion is buggy. Basically, when I am entering the number, it does not behave as expected. Sometimes, I am not able to enter the value, and sometimes it just enters wrong value. The behavior is random.
I am not sure if the error is caused by value converter trying to convert the number at the same time I am typing. Is there a workaround?
It's trying to update on every key stroke. You want it to update after leaving the input. Try using value.bind="score | numberFormat & updateTrigger:'blur'" instead.
You can learn more about binding behaviors in the Aurelia docs.