label_color on Multi Series Charts

(10 posts) (2 voices)

Tags:

No tags yet.

  1. jjr, Member

    Hi,
    Is there a way to get
    select 'dbr.chart.options', 'label_color', label, color
    working for Multi Series charts (specifically MSColumnLineDY) - or will it only work for single series charts like 'Column'?
    It would be useful to do this even if I have to specify the series it applies to as well.
    Thanks,
    Justin.

  2. myDBR Team, Key Master

    Justin,
    label_color-option should work just fine with MSColumnLineDY-chart. What is the syntax you are using?

    --
    myDBR Team

  3. jjr, Member

    Hi,

    I've tried a number of different syntaxes including the following:

    - select 'dbr.chart.options', 'label_color', in_par1, '0x00FF00';
    - select 'dbr.chart.options', 'label_color', (in_par1), '0x00FF00';
    - select 'dbr.chart.options', 'label_color', "Category1", '0x00FF00';
    - select 'dbr.chart.options', 'label_color', Category, '0x00FF00'
    from tmp_data
    where Category LIKE '%Category1%';
    - select 'dbr.chart.options', 'label_color', Category, if(Category='Category1', '0x00FF00', '0xFF0000')
    from tmp_data;

    For a query:
    SELECT cat AS 'Category',
    series AS 'Series',
    value AS 'Value'
    FROM tmp_data;

    But they only seem to work when I amend the chart back to type "Column" (and remove Series from the Select statement).
    Apologies if I'm missing something obvious.
    Thanks for your help,
    Justin.

  4. myDBR Team, Key Master

    See a demo.

    --
    myDBR Team

  5. jjr, Member

    Thanks but the "Show How This Report is Done" button is going to the wrong code. Please can you amend. Thanks.

  6. myDBR Team, Key Master

    Fixed.

    --
    myDBR Team

  7. jjr, Member

    Hi,

    Thanks for the demo.
    However, this logic changes the colour of the Series.
    Whereas when the "Column" type chart is used, the label_color logic is used to change the Category.
    What I am after is changing the colour of a specific Category - so in your demo that would be, for example the column for Amrak Q1 (or if not possible then all Amrak columns).

    The reason I want to do this is that I want to show one series of columns against one line and highlight a particular column. i.e. there are only 2 series (one which is for the columns and one for the line). If I am using the wrong chart to do this and that is what is causing my issues then please let me know.

    So, what I want to end up with is something like this:

    Please can you advise if this is possible?

    Thanks again for your help.

    Justin

  8. myDBR Team, Key Master

    If you just have a one series and a mark line, just use Column-chart and add a mark like using the mark-option. See updated sample.

    --
    myDBR Team

  9. jjr, Member

    Ok thanks, I have that working now (after updating MyDBR so I assume this was a recent additional feature - and it's also not in the documentation yet).

    That's solved my request (as yes, I only need a mark line, not a multi-value line, although it does seem that this might be a requirement for others in the future).

    As it's not in the documentation yet - please can you let me (and others) know what the syntax used for this command is (i.e. what the numbers are for/mean, etc)?

    Thanks again.
    Justin.

  10. myDBR Team, Key Master

    The mark-option is a new one. You will find it in the documentation under chart options (if you do not see it, check your browser cache).

    The option has syntax:

    select 'dbr.chart.options', 'mark', value, color, width, [, 'text' [, text_angle]]

    --
    myDBR Team


Reply

You must log in to post.