When using a theme in jqPlot the x axis labels are disappeared. The colors are also added to the series and y axis tick label font size can also be set. Am I doing something wrong?
I have the same issue. When I switch theme (or even switch back to default) if I'm using
renderer: $.jqplot.CategoryAxisRenderer
the x-axis texts are no longer drawn.
if I use
$.jqplot.DateAxisRenderer
however they are drawn.
I've even tried specifying the renderer as part of the theme but this seems to be ignored (probably intentionally)
I'm working on this issue right now (jqPlot v. 1.0.8) and I think I found the source of the problem. When going through the redraw process called at the end of ThemEngine activateTheme() function, in CategoryAxisRenderer's createTicks() the 'showLabel' property is set by default to false and fails to switch to true for ticks with labels.
Fast fix that worked for me: in plugin: jqplot.categoryAxisRenderer.js
comment
t.showLabel = false; #line 149
and uncomment
t.showLabel = true; #line 155
After those changes everything works as intended both with default and user created theme. I have to stress out again that this is just a quick fix and not the final solution which I'll post here asap.
I tried to just set the option.seriesColors directly which worked for me. This means the theme only exists as something in my helper functions that create graphs but it is ok for me.
Related
I know this is a silly one but haven't been able to fix my chart.
I have a bar chart created showing the number of Reps per Location and I want to have my label in white. What I'm doing right now is to go to the X Axe, under the Title option I'm choosing ''white'' as the Font Color. But this doesn't have any effect (label is still black).
Any ideas?
Thanks!
Edit --
Thank you for the help!
I'm not sure what I'm doing wrong, have no CSS no nothing but still it won't change the label color. Example below with dummy data on a blank new page:
X Axe:
Not that font color; scroll down to Tick Label and set its color:
Update: The Apex Team has raised a bug ticket to fix this behavior.
I have a simple bar chart with amCharts 4 and my problem is, that the chart starts hiding labels too early. (there's still enough space to display them)
Does someone have an idea, how to fix that, in the official documentation I couldn't find anything useful.
Try
categoryAxis.renderer.minGridDistance = 1;
I've got a page full of charts, and we want to be able to open them up in a larger size. Which means changing the font sizes for all the text in the chart. It's working quite well, except for the SERIES labels.
I've tried setting (and resetting) them in seriesDefaults, and also, in the series, but neither have worked out. valueAxis and categoryAxis labels are doing what I ask, so I'm not real sure where I'm going wrong with the series labels.
I've created a dojo, here: https://dojo.telerik.com/oYiXaL/9
Not sure why your code is not working, but setting the properties directly seems to work:
$(".expand").on("click", function(){
var chartBoss = $(this).data("boss");
$("#bigChart").kendoChart($(chartBoss).data("kendoChart").options);
var chart = $("#bigChart").data("kendoChart");
chart.options.series[0].labels.font = "20px BrandonGrotesqueWeb-Bold";
chart.options.valueAxis.labels.font = "28px BrandonGrotesqueWeb-Regular";
chart.options.categoryAxis.labels.font = "24px BrandonGrotesqueWeb-Medium";
$(".big").show();
});
I like to change the color of selected dot in wear's Dotspageindicator. I tried using setColor() and setSelectedColor() but the color is not changing still default behavior.
I hope somebody can help me with this problem.
I got the solution the problem is setting color they are redrawing the view without updating the paint.
To update the paint set the radius of the dot. It will redraw the view after updating the paint.
I am not pro developer and have small knowledge of html and css only. I am trying to work on a joomla website. I tried to add Google charts to my page. Actually it's a module that I am inserting to an article through load module function. But there seems to have a conflict and the chart is not displayed correctly. It seems that there are some conflicts with the issues but I am not sure how to figure.
http://goo.gl/v1GVWk
if you go to above link and go to tabs and open trekking map tab you will see the bug. The width of chart is very small. I want to display 100% so that it can be responsive. I tried changing the width to px as well but no luck.
Please help me. ..
The width of elements that are hidden is zero. Therefore, the chart thinks your window has a width of zero and ends up using its smallest width.
Try triggering a resize event on the window when the tab is shown, this should cause the responsive code to run.
I never used Google charts, but what you are experiencing also happens on Google Maps.
You have two options, either you use opacity (or maybe visibility hidden) instead of display: none, this will make the chart to resize automatically when the page opens.
The other option is to trigger the resize event, something like this... Google chart redraw/scale with window resize
Hope it helps
Even though the outer wrapper div#ja-google-chart-wrapper-404 is set to 100% width, two child elements are fixed at 400px. Specifically, the <svg width="400"> element that sets the image at a fixed width, plus the div that wraps it has the width set to 400px. Even though you have their parent set to 100%, if the image itself has a fixed width it won't expand to fill the space.
Check to see if there's a setting in your module or in the Google Chart itself that lets you set a different width (or none at all) on the inserted image.
One solution would be to resize the SVG element when the a#tab1-trekking-map is clicked. I just tested this in the Chrome console and it worked to trigger the map to resize to the full width of the container:
jQuery("#ja-google-chart-wrapper-404 svg").resize();
Add this (or something like it) to your other scripts that are called when your tabs are clicked. If the ID of the chart wrapper is generated dynamically you may need to adjust a bit, but triggering resize() (as stated by Niet and miguelmpn) should do the trick nicely.