Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Markus,

On Friday, 2012-05-11 03:20:37 +0200, Markus Mohrhard wrote:

A possible way a color scale entry would look like is:

<colorScale range="$A$4:$D$10">
  <entry type="value" val="10" col="ff11ff">
  <entry type="max" col="ffffff">
</colorScale>
<colorScale range="$H3:$I$20">
  <entry type="min" col="ff11ff">
  <entry type="percent" val="30" col="aaaaaa">
  <entry type="percent" val="70" col="bbbbbb">
  <entry type="max" col="ffffff">
</colorScale>

Taking Michael's suggestion

<style:style style:name="ce1" style:family="table-cell">
  <style:color-scale style:color-scale-minimum="CCCCCC"
style:color-scale-minimum-value="3" style:color-scale-maximum="444444"
style:color-scale-maximum-value="42"/>
</style:style>

and applying your example this could be something like

<style:style style:name="ce1" style:family="table-cell">
    <style:color-scale>
        <style:color-scale-entry fo:background-color="#ff11ff" office:value="10"/>
        <style:color-scale-entry style:color-scale-maximum="#ffffff"/>
    </style:color-scale>
</style:style>
<style:style style:name="ce2" style:family="table-cell">
    <style:color-scale>
        <style:color-scale-entry style:color-scale-minimum="#ff11ff"/>
        <style:color-scale-entry style:color-scale-percent="30" fo:background-color="#aaaaaa"/>
        <style:color-scale-entry style:color-scale-percent="70" fo:background-color="#bbbbbb"/>
        <style:color-scale-entry style:color-scale-maximum="#ffffff"/>
    </style:color-scale>
</style:style>

For type="value" above, can also strings be colored differently? Then
we'd need to use office:value-type as well.


For color scales and data bars( that are more or less just another way
to represent the same information ) there are quite some differences
to normal conditional formatting. One important difference is that the
range the color scale is applied to is really important (min, max,
percent, percentile) don't make sense without a range.

I think that can be expressed in the specification saying that a style
containing <style:color-scale> needs to be applied on a contiguous
range. Not sure though. If not, then things get complicated.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

Attachment: pgp9F9DRpXEDE.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.