LineChart and -fx-text-fill issue: how do I change the color of the labels

Hello everyone,
I'm currently facing an issue when I'm trying to style my LineChart with some CSS. Indeed I would like to change the color of the labels of my xAxis (CategoryAxis) and yAxis (NumberAxis) but it's not working.
In my FXML file I tried to use the style attribute on my LineChart tag using: <LineChart style="-fx-text-fill: white"> with no result, the text remains black (even for the title of my chart). In order to know if the style attribute is well parsed I changed it to: style="-fx-background-color: red; -fx-text-fill: white;". The background is becoming red but the text still remains black.
Finally I tried to define a stylesheet in my controller class with the same properties (red background and white text). My stylesheet is this one:
.chart {
    -fx-text-fill: white;
    -fx-background-color: red;
}In my controller I do the following line in order to load my CSS file:
this.chart.getStylesheets().add(getClass().getResource("statistics-style.css").toExternalForm());Even with this option the text remains white, while the background becomes red.
What I also tried is to put the -fx-text-file CSS property directly on my axises, but again it seems it is ignored.
I followed the steps described in Figure 8-2 of this site: http://docs.oracle.com/javafx/2/charts/css-styles.htm
Does anybody have an idea or encountered this issue?
Thank you very much,
Thierry.
PS: I'm using JFX 2.1 on MacOS X
Edited by: twasyl on May 8, 2012 7:57 AM
Edited by: twasyl on May 8, 2012 7:59 AM

Hi,
I figured a solution out to solve my problem. Currently in the documentation it is said to redefine the .chart CSS class in order to change the color of the title and labels text. But this is not working. Strangely the following code changes the font-size of both title and labels but ignores the -fx-text-fill property:
.chart {
  -fx-font-size: 20pt;
  -fx-text-fill: white;
}In order to change the color of the title I override the .chart-title CSS class:
.chart-title {
  -fx-text-fill: white;
}And for the labels:
.axis-label {
  -fx-text-fill: white;
}Well I don't know if there still is a bug on the .chart CSS class or maybe that behavior is expected.

Similar Messages

  • How can I change background color of the cover in ibooks Author?

    I'm trying to change the color of the background of the cover of the iBook I'm creating. I can't find how to.
    Please help.
    Gaby

    Gaby -
    Click on Book Title, unlock it, delete.
    Select a square graphic, turn Object causes wrap off.
    Make the square any color you like.
    Enlarge it to cover the page.
    Send to back. Lock it down.
    That's it.
    Now go here and download this free book, Publishing With iBooks Author, from O'Reilly press.
    http://shop.oreilly.com/product/0636920025597.do?sortby=publicationDate
    - Fabe

  • How do I change font colors in the navigation bar

    I'm designing a new website for my son's high school lacrosse team. It looks great, and I hope to upload it in the next week. The one thing that I haven't been able to do is change the font colors and font type in the page navigation links a the top of the pages. Can anyone help me with this?

    I outlined methods to change iweb navbar in this thread:
    http://discussions.apple.com/thread.jspa?messageID=11004066&#11004066
    and cited inefficient of building text base/box navbar:
    http://discussions.apple.com/thread.jspa?messageID=8136472&#8136472

  • How do you change the color of the sign and fill text to the color blue

    How do you change the color of the sign and fill text to the color blue in a pdf document

    Is this using the "Fill & Sign" tab of https://cloud.acrobat.com/fillsign (for now text input is only black) or maybe using the Fill & Sign tool in Adobe Reader XI, or another application? 
    Thanks,
    Josh

  • I purchased a season of a TV show from itunes and it won't go onto my ipad, i've purchased several seasons in the past and never had this issue, how can i fix this?

    I purchased a season of a TV show from itunes and it won't go onto my ipad, i've purchased several seasons in the past and never had this issue, how can i fix this?

    Drew how is that even possible? I use gift cards all the time, any time I've had insufficient funds iTunes will not allow the purchase, sights Insufficient funds and rejects the purchase. Any time I log into my account the money in that account appears in the upper left corner. If you're not seeing that then you have other issues. Anyway... Kneil is right you should be able to rip CDs you own to your iTunes library (regardless of your money matters with iTunes), then depending on how you set up the music you need to add it to your playlist and then sync it to your iPod. Did imported music ever work? How are you ripping or importing the music to iTunes? Are you using a compatible format?
    Something else to look at-- It's possible your cable is defective, have you tried a new or different cable? Some of what your describing is a bad cable issue. Good luck, Cheers.

  • How do i change marker color and fill in a chart

    Hi,
    In a chart in keynote - I am struggling to find a way to change the color of the marker of a data series. Also cannot seen to customize the fill and line of the marker.
    Can someone provide guidance.
    Y

    Keynote has a few ways to change colors, but markers are tricky as only the center color can be easily changed.
    Using the Chart > Inspector > Change Color option is hit or miss - sometimes you get what you want, but many times you don't.
    To change the color of a series line perhaps the easiest way is to click on the chart series (line, wedge, column, etc.) so that it is selected then click on the Color Picker Tool on the Tool Bar, select the color in the color array, (gamut, crayons, etc). you wish for the series and then drag that color from the Color Picker Well onto the series line.
    Note: Changing the color of the Data Symbol (triangle, circle, square, etc.) seems to defy all attempts to change the color of the actual Symbol, but you can change the color of the inner dot fairly easily using the methods described here.
    There is a  useful Video Tutorial that shows how this is done:
    http://www.apple.com/science/productivitylab/#researchpresentations
    Note: the tutorial was prepared for Leopard, but the methods still apply - look around 1:30 (1 minute 30 secs) through about 2:30 for details. Watch the whole video - it's interesting.
    Good Luck.

  • How do I darken or change the color of the iCal gray text and lines?

    How do I darken or change the color of the iCal gray text and lines?  The gray text is very hard to read.

    apple dosn't care about us anymore
    I remeber way I went back to os x10.6
    it's a tiny bit easier to read
    gosh I may have to start a boycot of crapple

  • How can I change the color of a folder icon and also the color of the text

    I am using Yosemite.  Is there any way to change the color of a folder icon and also the color of the text?

    You can't. You can't individually set the properties of just one array element.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)

    Hello,
    Here is the problematic:
    1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
    - I've many button in a doc im creating
    - the color of the buttons is white with black stoke & black text
    - in roll over state i want them to inverse the color coding (the text white & bottom black)
    - currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
    - i would just like to know if there is a function made for this?
    My other questions:
    2° Ive a presentation on which Ive created buttons which tigger pop-up animations
    - i have 5 buttons which trigger animations
    - the viewer can chose to Click on any of the buttons randomly
    - the problem is once the animation is open how can it be close... either:
    a) by it self after "40" seconds
    b) when ther viewer clicks another button
    3° Ive created buttons linking pages..
    - "go to page xxx"
    - when i do a preview and click on the buttons the links dont take me to the right pages
    - is that normal? (maybe in preview its suppose to be like that)
    4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'
    - what should i do?
    5° Once i export it into Swf. how how can i visualize it? or put it online?
    Thank you for your time.

    stlbbl4u wrote:
    Hello,
    Here is the problematic:
    1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
    - I've many button in a doc im creating
    - the color of the buttons is white with black stoke & black text
    - in roll over state i want them to inverse the color coding (the text white & bottom black)
    - currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
    - i would just like to know if there is a function made for this?
    You should setup Object Styles - these can also include Paragarph Styles that can be triggered when the Style is selected.
    http://help.adobe.com/en_US/indesign/cs/using/WS5CEDB81A-0011-4dc9-9DE8-AC7AD4C80076a.html
    My other questions:
    2° Ive a presentation on which Ive created buttons which tigger pop-up animations
    - i have 5 buttons which trigger animations
    - the viewer can chose to Click on any of the buttons randomly
    - the problem is once the animation is open how can it be close... either:
    a) by it self after "40" seconds
    b) when ther viewer clicks another button
    I'm not sure what you mean - I don't do files with Animations
    3° Ive created buttons linking pages..- "go to page xxx"
    - when i do a preview and click on the buttons the links dont take me to the right pages
    - is that normal? (maybe in preview its suppose to be like that)
    Does it work properly when you export it to the finished file?
    4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'- what should i do?
    InDesign won't link directly to youtube videos. I think your best bet would be to use Downloader to download the video and embed them directly in Indesign.
    5° Once i export it into Swf. how how can i visualize it? or put it online? 
    Thank you for your time.
    You can look up how to embed a SWF file into your HTML - but it depends what you mean by "online" there's a dozen ways to get a file "online".

  • How can I change one section of the document to a landscape orientation and not the whole document?

    How can I change one section of the document to a landscape orientation and not the whole document?

    Page Setup, including page orientation, is done in the File menu. The setting applies to the whole document. As Peter says, you can rotate the contents of a page (not including the text layer of a word processing document).
    As an alternative, you could use Numbers, where Sheets are empty canvases onto which you may place images, charts, tables and text boxes, and where page orientation may be set for individual Sheets. The main tradeoff is that you lose many of the built-in word processing and page layout features of Pages.
    Regards,
    Barry

  • Is there a way to change the color of the answer bubble for the texts?  Mine is now in gray and very hard to read

    I just updated my iPhone and would like to change the color of the bubble for the text reply.  Mine is now GRAY and it is much more difficult to read.  The outgoing text bubble is still blue.  Can I do this? 

    Yes. Well, sort of: instead of a "path", set the pen tool to "shape" in the tool properties. Then set the fill colour to transparent, and the stroke colour to the colour you want. You can also set the stroke width.
    Not perfect, but at least you can see the path more clearly - the anchor points and handles still remain the default colour. Open the path panel, and right-mouse click the path shape to create a selection based on that shape. The Paths panel menu also allows you to create work paths based on that shape.
    Unfortunately when you try to move the handles the black thin outline appears again until you release the mouse button.
    This is one of several things that works better in Photoline: in Photoline, once the path is set to a specific colour, editing the path uses the actual colour and stroke width. which is extremely handy for creating path based selection with awkward background colours and/or a high resolution screen. In Photoline the handles and bezier points are also much, much larger, which makes it rather simpler to work with as well - especially on a higher resolution screen. And when selected the handles and points are a clear red with a black outline - again easier to spot and identify. I just works better, in my opinion.

  • How to change the color of the text field of form

    Hi ,
    Is there any way to change the color of the text field of the form........
    Thnx in advance .......
    Cheers,
    Eman

    Hi Bob. I'm new to these forums and I'm not sure of protocol and exactly how this is supposed to work, so If I'm doing this wrong then please excuse me and let me know.
    I liked you solution on 'How to change the color of an Item on a form' using <blink>.
    I'm new to this application and coding as well so its kind of foreign to me.
    Working on a Report Page,
    I would like to have item, :P1_JOB_NO blink when the difference between sysdate and :P1_DATE_DUE < 7 days.
    I can identify the job_no which should blink by using the sql statement:
    SQL> select job_no from oax_projects07 where
    2 (sysdate - date_due < 7) and
    3 emp_name = 'GARY PILKENTON';
    JOB_NO
    20060627 050
    But I dont know the proper syntax to make it blink,
    or when to plug the syntax into.
    ie, is it a process, a validation, etc.
    Do you have any advice for me?

  • How to change the color of the text in the Text Field or in the text area??

    HI all,
    i think its a very simple problem, still, can anyone tell me how i can change the color of the text and also its font, before i display it in either a textfield or a text area.
    bharath

    Just Use:
    JTextField.setForeground(Color.RED);
    so SIMPLE na!
    Balakumar .M
    http://i5bala.blogspot.com
    --

  • How do you change the color of the title text?

    The main title text for the tap your currently on shows up centered one line above the tab row. The default is black text, with a gray drop shadow, but that doesn't work with dark background themes/personas. How do I go about changing that text color so that its visible on a dark background. I've tried changing font stylings in general for the browser, and I've tried changing the color values in the about:config for the persona, but none of that works. How do you change the color of the title text?

    That colors option under content doesn't change the color of the title text, but thanks anyways

  • All photos in portrait format are displayed blurred in the preview mode "fill" of the library. In all other modes e.g. "fit"or "1:2" the photos are sharp. How can I change this, so that the photos are still sharp when displaying them in the mode "fill"?

    All photos in portrait format are displayed blurred in the preview mode "fill" of the library. In all other modes e.g. "fit"or "1:2" the photos are sharp. How can I change this, so that the photos are still sharp when displaying them in the mode "fill"? My Lightroom release is 5.7.1.
    Thanking you in anticipation!

    I'd like to get all these '-1 suffix' files together with their associated Develop adjustments into one folder (if they aren't already) so I can see them in Grid view in the Library module, which I use as my basic starting point for everything else at this early stage of my Lightroom 'career'.
    To see what folder these are stored in, right-click on a photo and select "Go to Folder in Library".
    Advice: if you are going to use Lightroom effectively, you probably want to stop using folders as your method to create a grouping of photos that are already in Lightroom; there are plenty of built-in tools, such as keywords, collections, color labels, etc.
    I don't understand why the search on the entire catalog picked up apparently the same two file versions but also got the Develop adjustments when going to the relevant Folder didn't show the adjustment black squares against each image in Grid view nor were they there when the images were opened in the Develop module.  Perhaps if I understood this, I'd be a bit more confident of moving forward myself.
    These are most likely different versions of the same photo, in different folders. Lightroom stores the edits in its own catalog, and so it knows that one folder's photos have edits, and the other folder's photos do not have edits. Please understand that Lightroom is a database, it knows where the photos are at the time you import them (or add them to the catalog by synchronize), and then if you move things around in your operating system, Lightroom does not know anything about that and problems begin. Thus the advice to organize using Lightroom tools and methods and not operating system tools and methods.

Maybe you are looking for

  • Use VO to get DB value and set attribute

    Hi, I am working a page to create new order. I need some information populate. This is my code, which somehow not work public void createOrder() //(String[] args) OAViewObject vo = (OAViewObject)getxxMobileOrderVO1(); if (!vo.isPreparedForExecution()

  • Caller Display no longer working

    I have had Caller Display since our exchange was updated to System X - must be 20 years (it used to be called CLI when I worked for BT) and it has always worked perfectly. A few weeks ago, it stopped working and seems to be beyond BT's capability to

  • Copy table structure with default column values

    Hi.... I created a table by copying another table structure by using below query..... SQL> CREATE TABLE SAMPLE_TEMP AS SELECT * FROM SAMPLE WHERE 1=2; But my problem is " the default column values are not copied to new table" Suggest a query like tha

  • Report attributes

    I have the following query/report ( where release is a select box with submit on query screen) which shows areas and count in a given release group by area. "select area , count(*) "Project Count" from projects where release like :p200_release group

  • My iMac does not see the windows machines on the network (and vice versa)

    I'm runningOS X 10.8.2 on my iMac which attachs to the office network using Wi-Fi. It's on the right network (it's not attaching to the Wi-Fi router in the bulding next door) - I've checked the SSID and it's also being issued the right IP address by