Results 1 to 5 of 5

Thread: ExtJS 6.5.3 charts. How to change color of text under ticks.

  1. #1
    Sencha User
    Join Date
    Oct 2017
    Posts
    26
    Answers
    1

    Default Answered: ExtJS 6.5.3 charts. How to change color of text under ticks.

    Hi, i want to change color of text that comes along with ticks. I know that I can change color of ticks with strokeStyle parameter, but that doesn't changes color of text.

  2. If you mean metric one, two, three... text then so.
    Code:
    ...
    ...
    {
        type: 'category',
        position: 'bottom',
        fields: ['name'],
        title: {
            text: 'Sample Values',
            fontSize: 15,
        },
        style: {
            strokeStyle: 'red'
        },
        // USE THIS CONFIG
        label: {
            color: '#0000FF'
        }
    }]
    ...
    ...

  3. #2

    Default

    Can you share code snippets here ?

  4. #3
    Sencha User
    Join Date
    Oct 2017
    Posts
    26
    Answers
    1

    Default

    Here is fiddle



    As you can see, bottom axis is set to red color, but color of text along ticks('metric one', 'metric two', etc) is not changed. What i want is to change color of this text.

  5. #4
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    If you mean metric one, two, three... text then so.
    Code:
    ...
    ...
    {
        type: 'category',
        position: 'bottom',
        fields: ['name'],
        title: {
            text: 'Sample Values',
            fontSize: 15,
        },
        style: {
            strokeStyle: 'red'
        },
        // USE THIS CONFIG
        label: {
            color: '#0000FF'
        }
    }]
    ...
    ...
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  6. #5
    Sencha User
    Join Date
    Oct 2017
    Posts
    26
    Answers
    1

    Default

    yeghikyan, thank you!

Similar Threads

  1. Change text color in contianer in EXTJS 5
    By jamArk in forum Ext 5: Q&A
    Replies: 1
    Last Post: 28 Apr 2015, 12:54 PM
  2. Replies: 1
    Last Post: 13 May 2013, 9:37 AM
  3. [OPEN] [CHARTS-356] Sencha Touch Charts 'background' not working to change bg color
    By rafferty in forum Sencha Touch 2.x: Q&A
    Replies: 4
    Last Post: 12 Nov 2012, 10:00 AM
  4. Change row's text color (not background-color) in grid
    By khnle in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 5 Feb 2008, 6:47 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •