We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10357
    • 573 Posts
    Hi,

    I have created a css bar chart, and i want every bar’s width (%) to be edited by a tv. I can do this, but i have to create a TV for each separate bar. Is there a way assign a tv to multiple bars?

    cheers,
    g
      • 7923
      • 4,213 Posts
      Probably, but I don’t understand your question.. please explain more.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 10357
        • 573 Posts
        sorry it quite hard to explain, basically I want to have lots of fields that all use the same TV, but changing one field does not effect any of the others.



          • 10487 MODX Staff
          • 1,535 Posts
          You could consider using a comma-separated list to specify the values, this would allow you to condense the width values down so they use only one TV.

          Something like:
          param1=value1,param2=value2 ...


          You would then need to have a snippet to get the TV value, separate the parameter values into individual variables and to parse the rendered CSS output.

          Just an idea ... smiley
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com