Modify

Opened 15 years ago

Closed 15 years ago

#4246 closed defect (worksforme)

Mult-line macro does not work

Reported by: peterA Owned by: Martin Aspeli
Priority: normal Component: GoogleChartPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

It would be nice to have multi-line working so a long query is readable. The following macro would not execute. Instead the macro is shown as text.

[[GChart(type="lc", chco="00cc00", chts="00cc00,36", chs="300x150", \
         chtt="The+Zen+of+Python", \
         query="SELECT id, (id*1.2) FROM ticket")]]

Attachments (0)

Change History (2)

comment:1 Changed 15 years ago by anonymous

Yep, it'd be nice. :)

I don't really have time to do that, but patches would be accepted.

comment:2 Changed 15 years ago by peterA

Resolution: worksforme
Status: newclosed

Turned out we can use another form of calling a macro with #!GChart. The above macro can be re-written:

{{{
#!GChart
    type  = "lc",                # chart type 'line chart'
    chs   = "300x150",           # chart size in HxV pixels
    chco  = "00cc00",            # chart color 
    chts  = "00cc00,36", 
    chtt  = "The+Zen+of+Python", # chart title

    query = "SELECT id, (id*1.2) FROM ticket"
}}}

I have added several similar macros to the example of the plugin page.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Martin Aspeli.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.