Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Modifying the colors of the data values displayed on the lines

Hi,

I have plotted a sparkline graph whose colors are imposed by QV. I want to change the colors of the data values displayed on the lines.

At present, out of 5 lines, 3 have the same color as one of the Y axes and 2 the same one as the other Y axis (double scale on the Y axes) according to the choices made in “Axes of the expression” and "left" or "right" in the "Position" ("Axes" tab). Of course, only 2 colors could be applied to the Y axes out of 5 selections corresponding to the 5 expressions.

In spite of multiple attempts, in particular through the options of the “Expressions” (“Text color” - > “Definition” - > “Edit expression” - > “Paste” - > “Parameters” - > “Font”…), and after reading many messages on the forum which seem to apply to other cases, I can't modify the colors of of the data values on the lines. It even happens that after such selections, the line disappears from the graph.

How can I modify the colors of the data values displayed on the lines ?

Regards.

14 Replies

Re: Modifying the colors of the data values displayed on the lines

Hi,

     Try like this

     Expresion->test color->

     =if(Sum(RentDayCounter) = 4, Blue(), if(Sum(RentDayCounter) = 6, red(), if(Sum(RentDayCounter) = 41, Yellow(), Green())))

Hope it helps..

If you not achieve your requirement, please post sample file.. that help to achieve it

Not applicable

Re: Modifying the colors of the data values displayed on the lines

Thanks a lot for your answer.


I suppose « RentDayCounter » stands for « name of the column/field ». But there is no addition of my data. And what do the figures « 4 », « 6 », « 41 », represent ? Calculation results ?

Could it then become =if (NameOfTheField) = InstantiatedNameOfTheFieldA, Blue(), if (NameOfTheField) = InstantiatedNameOfTheFieldB, red(), if(NameOfTheField) = InstantiatedNameOfTheFieldC, Yellow(), Green() ) ?

Regards

Re: Modifying the colors of the data values displayed on the lines

HI,

     Yes, suppose you've four values in NameoftheField means, for example,

=if (NameOfTheField) = 'A', Blue(), if (NameOfTheField) = 'B', red(), if(NameOfTheField) = 'C', Yellow(), Green() )

Gives different text color..

Can you post a sample file?

Not applicable

Re: Modifying the colors of the data values displayed on the lines

Thanks again but where should i insert this phrase (tab « Expressions », « Axes »....) ?

And is there the bold bracket at the end ?

Re: Modifying the colors of the data values displayed on the lines

Hi,

     Properties->Expression->Click:"+" sign.Choose text color and give expression..And use Text Format gives ='<B>' That helps for bold..

Hope it helps

Not applicable

Re: Modifying the colors of the data values displayed on the lines

tried this

if (NameOfTheField) = "NameOfTheFiedA", red()

but I suppose the program does not recognize (NameOfTheField) anyway.

I also tried this: "NameOfTheFied", int Red ([alpha=255]).

In both cases, the figures on the line were removed.

Re: Modifying the colors of the data values displayed on the lines

HI,

     For example.     

    

     Load * inline

     [

     NameOf TheField

     A

     B

     C

     D

     ];

     Then, Use like this

    

       Properties->Expression->Click:"+" sign.Choose text color and give expression..And use Text Format gives ='<B>' That helps for bold..

=if (NameOfTheField) = 'A', Blue(), if (NameOfTheField) = 'B', red(), if(NameOfTheField) = 'C', Yellow(), Green() )

     Can you post a sample for it?

     Hope it helps.

Not applicable

Re: Modifying the colors of the data values displayed on the lines

Thanks a lot for this new answer. It's very nice of you.

However, I am a bit uneasy about all the fieldnames within the same pair of brackets in the loading script. Is this the same as a pair of brackets for each field ?

I can't try it now but do you understand why the series of figures on the line disappear after I have entered a phrase like the former ones in the « Definition » box after selecting « Expressions » -> ....« Text color »... ?

Re: Modifying the colors of the data values displayed on the lines

Hi,

     Try like below attached .

     Hope it helps

Community Browser