Is it possible to add superscript in essential js chart for axis titles/labels? - ej2-syncfusion

I made a graph (chart) with essential js related to pressure and I need the x-axis label to be superscript like this :
m3/s
I tried adding the <sup> tag in the title text value, but it just prints the tag and doesn't work as intended. I couldn't find anything in the docs as well.
Is there a way to do this or essential js doesn't support this?

Related

rtl text shown out of order

I have a perisan text that is coming from the server. Under normal circumstances it would be shown like this:
ساعت12
and when i test it in different parts of my code it shows up fine. but when i use it in my charts the characters are shown out of order. Like this:
out of order text
I have no idea why it is being flipped. i have tried to set unicode-bidi to both embed and bidi-override. I have tried different fonts. i have tried changing the font size. i have set the direction to rtl but so far none of these have worked.
NVM. The letter spacing was too small and it caused the issue. setting it to inherit fixed the problem.

Google Sheets Graph - How to remove vertical captions

How can I remove the text that is vertically written for every bar in this google sheets graph?
This might be a stupid question but I looked everywhere and couldn't figure it out.
Thank you.
Edit: As it was asked for, here is a link to the sheet. I created a dummy version of the graph, as the original document contains sensitive information.
https://docs.google.com/spreadsheets/d/1dm7sJNNv_1OxNSjfEd699V2mZ6Q7Plm57yqnIk7bLMc/edit?usp=sharing
These vertical labels are X-Axis labels, not (as suggested by the comment from #tehhowch) Data Labels. Go to the Chart Editor and turn them off here:

Hide axis in javafx 2.2 ScatterChart

Does anybody know, if it is possible to hide the axis in a JavaFX ScatterChart object? Or can anybody think of a simple workaround? I didn't find anything related to this issue in the documentation of the ScatterChart object.
Unfortunately, they are kind of irritating in all kinds of graphs where the axis's values are not, per se, informative (e.g. distance configurations).
Note: the most simple solution to set the visibility attribute of the scales to false unfortunately did not yield the result I was longing for (actually it showed no effect at all).
When you say "Hide the Axis", I'm assuming you mean hide all the tick marks and tick labels. Please let me know if you mean different.
The first step would be to hide the tick labels - this is pretty straight forward:
xAxis.setTickLabelsVisible(false);
yAxis.setTickLabelsVisible(false);
The second step is hiding the tick marks and all the neat graphics stuff that goes along with the tick marks (like the background colors). The best way I found for doing this is through the CSS. So you'll need to create a CSS file (I created one called test.css and placed it in my project's base folder) and load it up. Loading it can be done like this:
sc.getStylesheets().add("test.css");
(where sc is the ScatterChart object)
This is the CSS code I used to remove all the visuals associated with tick marks:
.axis-tick-mark,
.axis-minor-tick-mark,
.chart-vertical-grid-lines,
.chart-horizontal-grid-lines,
.chart-vertical-zero-line,
.chart-horizontal-zero-line {
-fx-stroke: transparent;
}
.chart-alternative-row-fill, .chart-alternative-column-fill{
-fx-fill: #f5f5f5;
}
Oracle puts out a great CSS reference for JavaFX - but in addition to that, I would recommend downloading the default CSS JavaFX uses. Looking at the default helps tons. You'll find instructions in that link under the "Default Style Sheet" section and also on the web with caspian.css for JavaFX 2.2 and modena.css for Java 8.

How to use "two-toned" font variants in CSS?

Certain fonts have a variant for outline and filled, and if you use these on overlapping text it draws an outlined or shaded stroke over the filled text. This is different than just an outline that strokes the text like -webkit-text-stroke-color would give you, since sometimes the filled font contains shading or other details.
Here's some examples of fonts designed to be used this way.
http://www.myfonts.com/fonts/matchandkerosene/duotone/
http://www.myfonts.com/fonts/scrowleyfonts/stomp/
I was sort of able to get this to work using CSS like this:
http://jsfiddle.net/6SakC/2/
This creates two H1 spans and uses the top-margin to move the outline one atop the filled one.
However, this doesn't seem ideal to me. Two problems:
I don't want to duplicate the text in the html.
I have to guesstimate the top-margin by trial and error.
If the text wraps, this doesn't work anymore.
Is there a better way to do this? I can live with having to duplicate the text, but I'd really like a more automatic way to do the positioning.
Thanks!
You can place the outline text inside the h1 and use absolute positioning instead of estimating the margin, as in this jsFiddle: http://jsfiddle.net/6SakC/4/
That also solves the problem with the text wrapping.
To avoid duplicating the text in the markup, you can use JavaScript to create the duplicate text, as in this jsFiddle: http://jsfiddle.net/6SakC/5/ (This might not be the best idea, though, since the text might get a moment to display without the outline, and JS is occasionally disabled in the browser settings.)

ggplot2 - autosize chart and axis titles

I have create some ggplot2 bar plots which print fine to screen. When I print in PDF device, however, the chart and axis titles are too large - they sometimes extend past the left and right of the x-axis. None of these charts have any opts() set aside from title/axis-title - its all the defaults. What am I missing here? Is there a way to tell ggplot to auto-size this text so that the charts look good in PDF? Can I do this without explicitly setting opts()?
The best solution I can think of is to create a function to create a theme (like theme_bw()) and give it enough parameters so that its smart about sizing. Will keep this post open for a few days to see if there are any other clever ideas

Resources